Compare commits
5 Commits
7898f567a5
...
119d74c888
| Author | SHA1 | Date | |
|---|---|---|---|
| 119d74c888 | |||
| 7e31efd385 | |||
| 2b7a1bd25d | |||
| 67365bb3dd | |||
| 6e7d2ef0bb |
80
flake.lock
generated
80
flake.lock
generated
@@ -66,11 +66,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717931644,
|
"lastModified": 1718526747,
|
||||||
"narHash": "sha256-Sz8Wh9cAiD5FhL8UWvZxBfnvxETSCVZlqWSYWaCPyu0=",
|
"narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "3d65009effd77cb0d6e7520b68b039836a7606cf",
|
"rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -88,11 +88,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717557583,
|
"lastModified": 1718551485,
|
||||||
"narHash": "sha256-uvdrIyTx93YLSDBlq0E2JXUw5hVPbMVo2/9kAV7wzOU=",
|
"narHash": "sha256-rIAQivtFw0YN3i3xAeBEpCcErA1KGD/IxV7c2VaKIJ8=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "7fbdd0979f86c01258e9d4fc4bb27c1f6dde7951",
|
"rev": "3ac7b61c9f476746489938d708309b7e69eeafd4",
|
||||||
"revCount": 53,
|
"revCount": 61,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git"
|
"url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git"
|
||||||
},
|
},
|
||||||
@@ -108,11 +108,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717976995,
|
"lastModified": 1718662658,
|
||||||
"narHash": "sha256-u3HBinyIyUvL1+N816bODpJmSQdgn0Mbb8BprFw7kqo=",
|
"narHash": "sha256-AKG7BsqtVWDlefgzyKz7vjaKTLi4+bmTSBhowbQoZtM=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "315aa649ba307704db0b16c92f097a08a65ec955",
|
"rev": "29b3096a6e283d7e6779187244cb2a3942239fdf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -122,13 +122,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720158314,
|
||||||
|
"narHash": "sha256-QNEOk6xmw3ct7P70wKzkGoqeb5gyJWEFdw7AZIul9V4=",
|
||||||
|
"owner": "CyborgPotato",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "c905e5bf25f9eab4cd3e014d3157fa3a62c3a5b6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "CyborgPotato",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717786204,
|
"lastModified": 1718530797,
|
||||||
"narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=",
|
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "051f920625ab5aabe37c920346e3e69d7d34400e",
|
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -156,11 +172,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717880976,
|
"lastModified": 1720553833,
|
||||||
"narHash": "sha256-BRvSCsKtDUr83NEtbGfHLUOdDK0Cgbezj2PtcHnz+sQ=",
|
"narHash": "sha256-IXMiHQMtdShDXcBW95ctA+m5Oq2kLxnBt7WlMxvDQXA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4913a7c3d8b8d00cb9476a6bd730ff57777f740c",
|
"rev": "249fbde2a178a2ea2638b65b9ecebd531b338cf9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718478900,
|
||||||
|
"narHash": "sha256-v43N1gZLcGkhg3PdcrKUNIZ1L0FBzB2JqhIYEyKAHEs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c884223af91820615a6146af1ae1fea25c107005",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -172,11 +204,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717774105,
|
"lastModified": 1718276985,
|
||||||
"narHash": "sha256-HV97wqUQv9wvptiHCb3Y0/YH0lJ60uZ8FYfEOIzYEqI=",
|
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d226935fd75012939397c83f6c385e4d6d832288",
|
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -191,21 +223,23 @@
|
|||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"me-emacs": "me-emacs",
|
"me-emacs": "me-emacs",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718058322,
|
"lastModified": 1718506969,
|
||||||
"narHash": "sha256-d5jLlAwVi4NzT9yc5UrPiOpDxTRhu8GGh0IIfeFcdrM=",
|
"narHash": "sha256-Pm9I/BMQHbsucdWf6y9G3xBZh3TMlThGo4KBbeoeczg=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "d071c74a7de1e26d211b69b6fbae37ae2e31a87f",
|
"rev": "797ce4c1f45a85df6dd3d9abdc53f2691bea9251",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
24
flake.nix
24
flake.nix
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
|
nixos-hardware.url = "github:CyborgPotato/nixos-hardware/master";
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
me-emacs.url = "git+https://git.syzygial.cc/Syzygial/EmacsConfig.git";
|
me-emacs.url = "git+https://git.syzygial.cc/Syzygial/EmacsConfig.git";
|
||||||
me-emacs.inputs.nixpkgs.follows = "nixpkgs";
|
me-emacs.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -10,7 +12,7 @@
|
|||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager }@attrs: let
|
outputs = { self, nixpkgs, nixpkgs-stable, nixos-hardware, sops-nix, me-emacs, nix-darwin, home-manager }@attrs: let
|
||||||
hydraGitea = import ./overlays/hydra.nix;
|
hydraGitea = import ./overlays/hydra.nix;
|
||||||
nvidiaContainer = import ./overlays/nvidiacontainer.nix nixpkgs;
|
nvidiaContainer = import ./overlays/nvidiacontainer.nix nixpkgs;
|
||||||
me-emacs-overlay = me-emacs.overlays.default;
|
me-emacs-overlay = me-emacs.overlays.default;
|
||||||
@@ -48,6 +50,22 @@
|
|||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
ptv = let
|
||||||
|
patch-8gb = {
|
||||||
|
hardware.deviceTree.overlays = [{
|
||||||
|
name = "8GB-patch";
|
||||||
|
dtsFile = "${nixos-hardware}/pine64/pinetab-v/star64-8GB.dts";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
in nixpkgs-stable.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inputs = attrs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./machines/ptv/configuration.nix
|
||||||
|
patch-8gb
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
darwinConfigurations."UniverseAir" = nix-darwin.lib.darwinSystem {
|
darwinConfigurations."UniverseAir" = nix-darwin.lib.darwinSystem {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
@@ -77,5 +95,9 @@
|
|||||||
inputs = attrs;
|
inputs = attrs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hydraJobs = {
|
||||||
|
PinetabV = self.nixosConfigurations.ptv.config.system.build.toplevel;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
42
machines/ptv/ccache.nix
Normal file
42
machines/ptv/ccache.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
|
programs.ccache.enable = true;
|
||||||
|
programs.ccache.cacheDir = "/opt/ccache";
|
||||||
|
nix.settings.extra-sandbox-paths = [ "/opt/ccache" ];
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
ccacheWrapper = super.ccacheWrapper.override {
|
||||||
|
# TODO: Sloppiness random_seed apart of wrapper
|
||||||
|
extraConfig = ''
|
||||||
|
export CCACHE_COMPRESS=1
|
||||||
|
export CCACHE_DIR="${config.programs.ccache.cacheDir}"
|
||||||
|
export CCACHE_UMASK=007
|
||||||
|
if [ ! -d "$CCACHE_DIR" ]; then
|
||||||
|
echo "====="
|
||||||
|
echo "Directory '$CCACHE_DIR' does not exist"
|
||||||
|
echo "Please create it with:"
|
||||||
|
echo " sudo mkdir -m0770 '$CCACHE_DIR'"
|
||||||
|
echo " sudo chown root:nixbld '$CCACHE_DIR'"
|
||||||
|
echo "====="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -w "$CCACHE_DIR" ]; then
|
||||||
|
echo "====="
|
||||||
|
echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
|
||||||
|
echo "Please verify its access permissions"
|
||||||
|
echo "====="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
linux-ptv-ccache = pkgs.callPackage "${inputs.nixos-hardware}/pine64/pinetab-v/linux-5.15.nix" {
|
||||||
|
argsOverride = {
|
||||||
|
stdenv = self.ccacheStdenv;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.ccache.packageNames = [ "ffmpeg" "firefox-unwrapped" "tmux" ];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-ptv-ccache;
|
||||||
|
}
|
||||||
91
machines/ptv/configuration.nix
Normal file
91
machines/ptv/configuration.nix
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{ lib, pkgs, config, inputs, ... }: let
|
||||||
|
inherit (pkgs.checkpointBuildTools) prepareCheckpointBuild mkCheckpointBuild;
|
||||||
|
linux-cached = prepareCheckpointBuild pkgs.linux-ptv;
|
||||||
|
linux-changed = pkgs.linux-ptv;
|
||||||
|
linux-ptv = pkgs.checkpointBuildTools.mkCheckpointBuild linux-changed linux-cached;
|
||||||
|
in {
|
||||||
|
# boot.kernelPackages = pkgs.linuxPackagesFor linux-ptv;
|
||||||
|
boot.kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0" ];
|
||||||
|
|
||||||
|
systemd.services."getty@tty0".enable = lib.mkDefault true;
|
||||||
|
systemd.services."getty@tty0".wantedBy = lib.mkDefault [ "getty.target" ];
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
nixpkgs.hostPlatform = "riscv64-linux";
|
||||||
|
networking.hostName = "ptv";
|
||||||
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
# https://github.com/starfive-tech/soft_3rdpart/tree/JH7110_VisionFive2_devel
|
||||||
|
# Source of different firmware/3rd party sw and fw
|
||||||
|
img-rogue-firmware = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "img-gpu-powervr";
|
||||||
|
version = "36-working-on-it";
|
||||||
|
|
||||||
|
src = ./rgx-img-gpu-firmware.tar.gz;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
compressFirmware = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/lib/firmware
|
||||||
|
cp * $out/lib/firmware
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(import ./pkgs)
|
||||||
|
];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
"${inputs.nixos-hardware}/pine64/pinetab-v/sd-image.nix"
|
||||||
|
# ./ccache.nix
|
||||||
|
./native-bootstrap.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
pine64 = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
initialHashedPassword = "$y$j9T$cuXgVIPt3n1.v7GcoXiql1$4EBlHM7sYO.lL.DTDwQzTBqSYsD01WIDZQXleCeozl8";
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
initialHashedPassword = "$y$j9T$cuXgVIPt3n1.v7GcoXiql1$4EBlHM7sYO.lL.DTDwQzTBqSYsD01WIDZQXleCeozl8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.wireless.enable = true;
|
||||||
|
networking.wireless.userControlled.enable = true;
|
||||||
|
|
||||||
|
#programs.hyprland = {
|
||||||
|
# Install the packages from nixpkgs
|
||||||
|
# enable = true;
|
||||||
|
# Whether to enable XWayland
|
||||||
|
# xwayland.enable = true;
|
||||||
|
#};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dropbear
|
||||||
|
busybox
|
||||||
|
tmux
|
||||||
|
git
|
||||||
|
|
||||||
|
weston
|
||||||
|
|
||||||
|
# ffmpeg
|
||||||
|
# firefox
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.firmware = pkgs.lib.mkOrder 1000 [
|
||||||
|
pkgs.img-rogue-firmware
|
||||||
|
];
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
}
|
||||||
BIN
machines/ptv/img-gpu-powervr-bin-1.15.6052913.tar.gz
Normal file
BIN
machines/ptv/img-gpu-powervr-bin-1.15.6052913.tar.gz
Normal file
Binary file not shown.
BIN
machines/ptv/img-gpu-powervr-bin-1.17.6210866.tar.gz
Normal file
BIN
machines/ptv/img-gpu-powervr-bin-1.17.6210866.tar.gz
Normal file
Binary file not shown.
37
machines/ptv/native-bootstrap.nix
Normal file
37
machines/ptv/native-bootstrap.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{ config, pkgs, lib, ...}: let
|
||||||
|
stdenvStages = curStage:
|
||||||
|
[ curStage ]
|
||||||
|
++
|
||||||
|
(if curStage.hasCC
|
||||||
|
then [curStage.cc] ++ (stdenvStages curStage.__bootPackages.stdenv)
|
||||||
|
else []);
|
||||||
|
in {
|
||||||
|
system.includeBuildDependencies = true;
|
||||||
|
system.extraDependencies = with pkgs;
|
||||||
|
lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform)
|
||||||
|
((stdenvStages stdenv) ++ [
|
||||||
|
stdenvNoCC
|
||||||
|
clangStdenv
|
||||||
|
clangStdenv.cc
|
||||||
|
clang
|
||||||
|
libllvm
|
||||||
|
gcc
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
coreutils
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
python3
|
||||||
|
# Other common build tools
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
cmake
|
||||||
|
meson
|
||||||
|
bison
|
||||||
|
perl
|
||||||
|
zlib
|
||||||
|
busybox
|
||||||
|
xz
|
||||||
|
binutils
|
||||||
|
]);
|
||||||
|
}
|
||||||
17
machines/ptv/pkgs-cross/argyllcms/default.nix
Normal file
17
machines/ptv/pkgs-cross/argyllcms/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
final: prev: prev.argyllcms.overrideAttrs (old: {
|
||||||
|
postInstall = (prev.lib.optional (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) ''
|
||||||
|
cp imdi/imdi_make $out/bin
|
||||||
|
cp gamut/GenRMGam $out/bin
|
||||||
|
'');
|
||||||
|
patches = (prev.lib.optionals (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) [
|
||||||
|
./imdi_make.patch
|
||||||
|
]);
|
||||||
|
preBuild = (prev.lib.optional (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) ''
|
||||||
|
cd imdi; imdi_make; cd ..
|
||||||
|
cd gamut; GenRMGam; cd ..
|
||||||
|
'');
|
||||||
|
# Need to use build version of imdi_make && host version for output
|
||||||
|
depsBuildBuild = (prev.lib.optionals (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) [
|
||||||
|
prev.buildPackages.argyllcms
|
||||||
|
]);
|
||||||
|
})
|
||||||
39
machines/ptv/pkgs-cross/argyllcms/imdi_make.patch
Normal file
39
machines/ptv/pkgs-cross/argyllcms/imdi_make.patch
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
diff --git a/gamut/Jamfile b/gamut/Jamfile
|
||||||
|
index e97d0df..adc259f 100755
|
||||||
|
--- a/gamut/Jamfile
|
||||||
|
+++ b/gamut/Jamfile
|
||||||
|
@@ -47,7 +47,7 @@ Main GenRMGam : GenRMGam.c ;
|
||||||
|
# Generate referenec medium gamut the kernel files
|
||||||
|
# (NoUpdate so that Cross Compile Win64 hack works)
|
||||||
|
NNoUpdate RefMediumGamut.gam ;
|
||||||
|
-GenFile RefMediumGamut.gam : GenRMGam ;
|
||||||
|
+# GenFile RefMediumGamut.gam : GenRMGam ;
|
||||||
|
|
||||||
|
# Visual gamut
|
||||||
|
Main GenVisGam : GenVisGam.c ;
|
||||||
|
diff --git a/imdi/Jamfile b/imdi/Jamfile
|
||||||
|
index 79b27fb..64c3348 100755
|
||||||
|
--- a/imdi/Jamfile
|
||||||
|
+++ b/imdi/Jamfile
|
||||||
|
@@ -41,7 +41,7 @@ LINKLIBS = ../numlib/libnum ;
|
||||||
|
|
||||||
|
# GenFile source.c : program args ; make custom file
|
||||||
|
# Generate all the kernel files
|
||||||
|
-GenFileND imdi_k.h : imdi_make $(IMDI_MAKE_OPT) -d [ NormPaths $(DOT) ] ;
|
||||||
|
+# GenFileND imdi_k.h : imdi_make $(IMDI_MAKE_OPT) -d [ NormPaths $(DOT) ] ;
|
||||||
|
|
||||||
|
# imdi library
|
||||||
|
Library libimdi : imdi.c imdi_tab.c ;
|
||||||
|
diff --git a/imdi/Makefile b/imdi/Makefile
|
||||||
|
index 5523893..2048875 100755
|
||||||
|
--- a/imdi/Makefile
|
||||||
|
+++ b/imdi/Makefile
|
||||||
|
@@ -48,7 +48,7 @@ imdi_gen$(SUFOBJ): imdi_gen.c imdi_utl.h imdi_arch.h imdi_gen.h
|
||||||
|
|
||||||
|
# Generate the kernel files
|
||||||
|
imdi_k.h imdi_k.c : imdi_make$(SUFEXE)
|
||||||
|
- .$(SLASH)imdi_make$(SUFEXE)
|
||||||
|
+ imdi_make$(SUFEXE)
|
||||||
|
|
||||||
|
|
||||||
|
# imdi runtime library
|
||||||
4
machines/ptv/pkgs-cross/bundlerApp/default.nix
Normal file
4
machines/ptv/pkgs-cross/bundlerApp/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
final: prev: prev.bundlerApp.override (old: {
|
||||||
|
ruby = final.buildPackages.ruby;
|
||||||
|
callPackage = final.newScope { ruby = final.buildPackages.ruby; };
|
||||||
|
})
|
||||||
3
machines/ptv/pkgs-cross/cryptsetup/default.nix
Normal file
3
machines/ptv/pkgs-cross/cryptsetup/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
final: prev: prev.cryptsetup.overrideAttrs (old: {
|
||||||
|
doCheck = false;
|
||||||
|
})
|
||||||
19
machines/ptv/pkgs-cross/default.nix
Normal file
19
machines/ptv/pkgs-cross/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(final: prev: {
|
||||||
|
discount = (import ./discount) final prev;
|
||||||
|
fwupd-efi = (import ./fwupd-efi) final prev;
|
||||||
|
live555 = (import ./live555) final prev;
|
||||||
|
protobuf = (import ./protobuf) final prev;
|
||||||
|
bundlerApp = (import ./bundlerApp) final prev;
|
||||||
|
vulkan-tools = (import ./vulkan-tools) final prev;
|
||||||
|
libdrm = (import ./libdrm) final prev;
|
||||||
|
valgrind = (import ./valgrind) final prev;
|
||||||
|
valgrind-light = final.valgrind.override { gdb = null; };
|
||||||
|
argyllcms = (import ./argyllcms) final prev;
|
||||||
|
gn = (import ./gn) final prev;
|
||||||
|
openfortivpn = (import ./openfortivpn) final prev;
|
||||||
|
vpnc = (import ./vpnc) final prev;
|
||||||
|
# perl538Packages.Testutf8 = (import ./perlTestutf8) final prev;
|
||||||
|
diffutils = (import ./diffutils) final prev;
|
||||||
|
gnugrep = (import ./gnugrep) final prev;
|
||||||
|
cryptsetup = (import ./cryptsetup) final prev;
|
||||||
|
})
|
||||||
4
machines/ptv/pkgs-cross/diffutils/default.nix
Normal file
4
machines/ptv/pkgs-cross/diffutils/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
final: prev: prev.diffutils.overrideAttrs (old: {
|
||||||
|
doCheck = false; #prev.stdenv.hostPlatform != "riscv64-linux";
|
||||||
|
})
|
||||||
23
machines/ptv/pkgs-cross/discount/config-sed.c
Normal file
23
machines/ptv/pkgs-cross/discount/config-sed.c
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(argc, argv)
|
||||||
|
int argc;
|
||||||
|
char **argv;
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
if (argc != 3)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
printf("s;@%s@;", argv[1]);
|
||||||
|
|
||||||
|
for (p=argv[2]; *p; ++p) {
|
||||||
|
if ( *p == ';' )
|
||||||
|
putchar('\\');
|
||||||
|
putchar(*p);
|
||||||
|
}
|
||||||
|
|
||||||
|
puts(";g");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
67
machines/ptv/pkgs-cross/discount/config-sed.patch
Normal file
67
machines/ptv/pkgs-cross/discount/config-sed.patch
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
diff --git a/configure.inc b/configure.inc
|
||||||
|
index fd0c9ba..98066d5 100755
|
||||||
|
--- a/configure.inc
|
||||||
|
+++ b/configure.inc
|
||||||
|
@@ -1733,52 +1733,6 @@ AC_FAIL() {
|
||||||
|
$__fail 1
|
||||||
|
}
|
||||||
|
|
||||||
|
-#
|
||||||
|
-# __ac_config_sed; a C program to do escaping for AC_SUB
|
||||||
|
-__ac_config_sed() {
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- test -x config.sed && return
|
||||||
|
-
|
||||||
|
- echo "generating config.sed"
|
||||||
|
-
|
||||||
|
- AC_PROG_CC
|
||||||
|
-
|
||||||
|
-cat > ngc$$.c << \EOF
|
||||||
|
-#include <stdio.h>
|
||||||
|
-
|
||||||
|
-int
|
||||||
|
-main(argc, argv)
|
||||||
|
-int argc;
|
||||||
|
-char **argv;
|
||||||
|
-{
|
||||||
|
- char *p;
|
||||||
|
-
|
||||||
|
- if (argc != 3)
|
||||||
|
- return 1;
|
||||||
|
-
|
||||||
|
- printf("s;@%s@;", argv[1]);
|
||||||
|
-
|
||||||
|
- for (p=argv[2]; *p; ++p) {
|
||||||
|
- if ( *p == ';' )
|
||||||
|
- putchar('\\');
|
||||||
|
- putchar(*p);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- puts(";g");
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-EOF
|
||||||
|
-
|
||||||
|
- if $AC_CC -o config.sed ngc$$.c; then
|
||||||
|
- rm -f ngc$$.c
|
||||||
|
- __config_files="$__config_files config.sed"
|
||||||
|
- else
|
||||||
|
- rm -f ngc$$.c
|
||||||
|
- AC_FAIL "Cannot generate config.sed helper program"
|
||||||
|
- fi
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
#
|
||||||
|
# AC_SUB writes a substitution into config.sub
|
||||||
|
AC_SUB() {
|
||||||
|
@@ -1788,8 +1742,7 @@ AC_SUB() {
|
||||||
|
|
||||||
|
echo "target=$_target, rest=$*"
|
||||||
|
|
||||||
|
- __ac_config_sed
|
||||||
|
- ./config.sed "$_target" "$*" >> "$__cwd"/config.sub
|
||||||
|
+ config.sed "$_target" "$*" >> "$__cwd"/config.sub
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# AC_TEXT writes arbitrary text into config.h
|
||||||
47
machines/ptv/pkgs-cross/discount/default.nix
Normal file
47
machines/ptv/pkgs-cross/discount/default.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
final: prev: let
|
||||||
|
config-sed = prev.buildPackages.stdenv.mkDerivation {
|
||||||
|
name = "orc-discount-config-sed";
|
||||||
|
src = ./config-sed.c;
|
||||||
|
dontUnpack = true;
|
||||||
|
buildPhase = ''
|
||||||
|
$CC -o config.sed $src
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
chmod +x ./config.sed
|
||||||
|
mv config.sed $out/bin
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in prev.discount.overrideAttrs (old: let
|
||||||
|
patches = [
|
||||||
|
./config-sed.patch
|
||||||
|
./make-fix.patch
|
||||||
|
] ++ old.patches;
|
||||||
|
orc-tools = prev.buildPackages.stdenv.mkDerivation {
|
||||||
|
name = "orc-discount-tools";
|
||||||
|
src = old.src;
|
||||||
|
inherit patches;
|
||||||
|
configureScript = old.configureScript;
|
||||||
|
configureFlags = old.configureFlags;
|
||||||
|
buildPhase = ''
|
||||||
|
$CC -o mktags mktags.c
|
||||||
|
$CC -I ./ -o branch tools/branch.c
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mv mktags $out/bin
|
||||||
|
mv branch $out/bin
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# ./configure does not support autoconf-style --build=/--host=.
|
||||||
|
configurePlatforms = [ ];
|
||||||
|
depsBuildBuild = [
|
||||||
|
config-sed
|
||||||
|
orc-tools
|
||||||
|
prev.buildPackages.coreutils
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
];
|
||||||
|
inherit patches;
|
||||||
|
})
|
||||||
58
machines/ptv/pkgs-cross/discount/make-fix.patch
Normal file
58
machines/ptv/pkgs-cross/discount/make-fix.patch
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index 085fbd5..e59d769 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -29,7 +29,7 @@ OBJS=mkdio.o markdown.o dumptree.o generate.o \
|
||||||
|
xml.o Csio.o xmlpage.o basename.o emmatch.o \
|
||||||
|
github_flavoured.o setup.o tags.o html5.o \
|
||||||
|
@AMALLOC@ @H1TITLE@ flags.o
|
||||||
|
-TESTFRAMEWORK=echo cols branch pandoc_headers
|
||||||
|
+TESTFRAMEWORK=echo cols pandoc_headers
|
||||||
|
|
||||||
|
# modules that markdown, makepage, mkd2html, &tc use
|
||||||
|
COMMON=pgm_options.o gethopt.o notspecial.o
|
||||||
|
@@ -84,19 +84,16 @@ $(DESTDIR)$(LIBDIR):
|
||||||
|
@MK_PKGCONFIG@$(DESTDIR)$(PKGDIR):
|
||||||
|
@MK_PKGCONFIG@ $(INSTALL_DIR) $(DESTDIR)$(PKGDIR)
|
||||||
|
|
||||||
|
-version.o: version.c VERSION branch
|
||||||
|
- $(BUILD) -DBRANCH=`./branch` -DVERSION=\"`cat VERSION`\" -c version.c
|
||||||
|
+version.o: version.c VERSION
|
||||||
|
+ $(BUILD) -DBRANCH=`branch` -DVERSION=\"`cat VERSION`\" -c version.c
|
||||||
|
|
||||||
|
VERSION:
|
||||||
|
@true
|
||||||
|
|
||||||
|
tags.o: tags.c cstring.h tags.h blocktags
|
||||||
|
|
||||||
|
-blocktags: mktags
|
||||||
|
- ./mktags > blocktags
|
||||||
|
-
|
||||||
|
-mktags: mktags.o
|
||||||
|
- $(LINK) -o mktags mktags.o
|
||||||
|
+blocktags:
|
||||||
|
+ mktags > blocktags
|
||||||
|
|
||||||
|
# example programs
|
||||||
|
@THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h
|
||||||
|
@@ -143,11 +140,6 @@ pandoc_headers.o: tools/pandoc_headers.c config.h
|
||||||
|
pandoc_headers: pandoc_headers.o $(COMMON) $(MKDLIB)
|
||||||
|
$(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown
|
||||||
|
|
||||||
|
-branch.o: tools/branch.c config.h
|
||||||
|
- $(BUILD) -c -o branch.o tools/branch.c
|
||||||
|
-branch: branch.o
|
||||||
|
- $(LINK) -o branch branch.o
|
||||||
|
-
|
||||||
|
cols.o: tools/cols.c config.h
|
||||||
|
$(BUILD) -c -o cols.o tools/cols.c
|
||||||
|
cols: cols.o
|
||||||
|
@@ -163,7 +155,7 @@ clean:
|
||||||
|
rm -f $(MKDLIB) `./librarian.sh files $(MKDLIB) VERSION`
|
||||||
|
|
||||||
|
distclean spotless: clean
|
||||||
|
- @DISTCLEAN@ @GENERATED_FILES@ @CONFIGURE_FILES@ ./mktags ./blocktags
|
||||||
|
+ @DISTCLEAN@ @GENERATED_FILES@ @CONFIGURE_FILES@ ./blocktags
|
||||||
|
|
||||||
|
Csio.o: Csio.c cstring.h amalloc.h config.h markdown.h
|
||||||
|
amalloc.o: amalloc.c
|
||||||
13
machines/ptv/pkgs-cross/discount/where-tr.patch
Normal file
13
machines/ptv/pkgs-cross/discount/where-tr.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/configure.inc b/configure.inc
|
||||||
|
index fd0c9ba..7ea98e6 100755
|
||||||
|
--- a/configure.inc
|
||||||
|
+++ b/configure.inc
|
||||||
|
@@ -1830,7 +1830,7 @@ AC_QUIET() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-AC_TR=`acLookFor tr`
|
||||||
|
+AC_TR=`which tr`
|
||||||
|
if [ "$AC_TR" ]; then
|
||||||
|
# try posix-style tr
|
||||||
|
ABC=`echo abc | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||||
19
machines/ptv/pkgs-cross/fwupd-efi/default.nix
Normal file
19
machines/ptv/pkgs-cross/fwupd-efi/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(final: prev:
|
||||||
|
prev.fwupd-efi.overrideAttrs (old: {
|
||||||
|
mesonFlags = old.mesonFlags ++ [
|
||||||
|
# Use this instead of patch, however it points to proper binary
|
||||||
|
"-Defi-cc=${prev.stdenv.cc.targetPrefix}cc"
|
||||||
|
];
|
||||||
|
preBuild = ''
|
||||||
|
cp ${prev.gnu-efi}/lib/*.lds ../efi/lds
|
||||||
|
'';
|
||||||
|
patches = [
|
||||||
|
(prev.fetchurl {
|
||||||
|
url = "https://github.com/fwupd/fwupd-efi/commit/986a6e3beee6b951ca3622f47ed991e0e11c065c.diff";
|
||||||
|
hash = "sha256-UKerVzSn28QSoca6m2igVM6ai8i3B2jyB52B6e/HV5A=";
|
||||||
|
})
|
||||||
|
# ./efi-meson.patch
|
||||||
|
];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
13
machines/ptv/pkgs-cross/fwupd-efi/efi-meson.patch
Normal file
13
machines/ptv/pkgs-cross/fwupd-efi/efi-meson.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/efi/meson.build b/efi/meson.build
|
||||||
|
index 936ba3c..53687b1 100644
|
||||||
|
--- a/efi/meson.build
|
||||||
|
+++ b/efi/meson.build
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
generate_sbat = find_program('generate_sbat.py', native: true)
|
||||||
|
generate_binary = find_program('generate_binary.py', native: true)
|
||||||
|
|
||||||
|
-efi_cc = get_option('efi-cc')
|
||||||
|
+efi_cc = run_command('sh', '-c', 'echo $CC')
|
||||||
|
efi_ld = get_option('efi-ld')
|
||||||
|
efi_ldsdir = get_option('efi-ldsdir')
|
||||||
|
efi_incdir = get_option('efi-includedir')
|
||||||
14
machines/ptv/pkgs-cross/fwupd-efi/meson-rv64.patch
Normal file
14
machines/ptv/pkgs-cross/fwupd-efi/meson-rv64.patch
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 7d59695..b82bcdf 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -31,6 +31,9 @@ elif host_cpu == 'arm'
|
||||||
|
elif host_cpu == 'aarch64'
|
||||||
|
EFI_MACHINE_TYPE_NAME = 'aa64'
|
||||||
|
gnu_efi_arch = 'aarch64'
|
||||||
|
+elif host_cpu == 'riscv64'
|
||||||
|
+ EFI_MACHINE_TYPE_NAME = '.'
|
||||||
|
+ gnu_efi_arch = 'riscv64'
|
||||||
|
else
|
||||||
|
error('Unknown host_cpu ' + host_cpu)
|
||||||
|
endif
|
||||||
10
machines/ptv/pkgs-cross/gn/default.nix
Normal file
10
machines/ptv/pkgs-cross/gn/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# TODO: gn-unstable needs rev newer than 2021-01-28
|
||||||
|
# 713a1850957b919c876c924e43ef0ddc4d8a8144 for riscv64 support
|
||||||
|
|
||||||
|
final: prev: prev.gn.overrideAttrs (old: {
|
||||||
|
src = prev.fetchgit {
|
||||||
|
url = "https://gn.googlesource.com/gn";
|
||||||
|
rev = "713a1850957b919c876c924e43ef0ddc4d8a8144";
|
||||||
|
hash = "sha256-yzx7wPp/PEwGg4HZ99YntyHJ384nTVq6fyB6/vOOvOM=";
|
||||||
|
};
|
||||||
|
})
|
||||||
4
machines/ptv/pkgs-cross/gnugrep/default.nix
Normal file
4
machines/ptv/pkgs-cross/gnugrep/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
final: prev: prev.gnugrep.overrideAttrs (old: {
|
||||||
|
doCheck = false; #prev.stdenv.hostPlatform != "riscv64-linux";
|
||||||
|
})
|
||||||
5
machines/ptv/pkgs-cross/libdrm/default.nix
Normal file
5
machines/ptv/pkgs-cross/libdrm/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
final: prev: prev.libdrm.overrideAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [
|
||||||
|
final.libatomic_ops
|
||||||
|
];
|
||||||
|
})
|
||||||
8
machines/ptv/pkgs-cross/live555/default.nix
Normal file
8
machines/ptv/pkgs-cross/live555/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
final: prev: prev.live555.overrideAttrs (old: {
|
||||||
|
preConfigure = (prev.lib.optional (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) ''
|
||||||
|
sed -e 's/^C_COMPILER.*=.*$/C_COMPILER = $(CC)/g' -i config.*
|
||||||
|
sed -e 's/^CPLUSPLUS_COMPILER.*=.*$/CPLUSPLUS_COMPILER = $(CXX)/g' -i config.*
|
||||||
|
sed -e 's/^LINK.*=.*$/LINK = $(CXX) -o/g' -i config.*
|
||||||
|
sed -e 's/^LIBRARY_LINK.*=.*$/LIBRARY_LINK = $(AR) cr /g' -i config.*
|
||||||
|
'');
|
||||||
|
})
|
||||||
5
machines/ptv/pkgs-cross/openfortivpn/default.nix
Normal file
5
machines/ptv/pkgs-cross/openfortivpn/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
final: prev: prev.openfortivpn.overrideAttrs (old: {
|
||||||
|
configureFlags = old.configureFlags ++ prev.lib.optionals (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) [
|
||||||
|
"--disable-proc"
|
||||||
|
];
|
||||||
|
})
|
||||||
42
machines/ptv/pkgs-cross/perlTestutf8/default.nix
Normal file
42
machines/ptv/pkgs-cross/perlTestutf8/default.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
final: prev: prev.perl538Packages.Testutf8.overrideAttrs (old: let
|
||||||
|
perl = final.perl538;
|
||||||
|
in {
|
||||||
|
postInstall = prev.lib.optionalString (prev.stdenv.buildPlatform != prev.stdenv.hostPlatform) ''
|
||||||
|
mkdir -p $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI
|
||||||
|
cat > $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI.pm <<EOF
|
||||||
|
package DBI;
|
||||||
|
BEGIN {
|
||||||
|
our \$VERSION = "$version";
|
||||||
|
}
|
||||||
|
1;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
autodir=$(echo $out/${perl.libPrefix}/${perl.version}/*/auto/DBI)
|
||||||
|
cat > $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI/DBD.pm <<EOF
|
||||||
|
package DBI::DBD;
|
||||||
|
use Exporter ();
|
||||||
|
use vars qw (@ISA @EXPORT);
|
||||||
|
@ISA = qw(Exporter);
|
||||||
|
@EXPORT = qw(dbd_postamble);
|
||||||
|
sub dbd_postamble {
|
||||||
|
return '
|
||||||
|
# --- This section was generated by DBI::DBD::dbd_postamble()
|
||||||
|
DBI_INSTARCH_DIR=$autodir
|
||||||
|
DBI_DRIVER_XST=$autodir/Driver.xst
|
||||||
|
|
||||||
|
# The main dependency (technically correct but probably not used)
|
||||||
|
\$(BASEEXT).c: \$(BASEEXT).xsi
|
||||||
|
|
||||||
|
# This dependency is needed since MakeMaker uses the .xs.o rule
|
||||||
|
\$(BASEEXT)\$(OBJ_EXT): \$(BASEEXT).xsi
|
||||||
|
|
||||||
|
\$(BASEEXT).xsi: \$(DBI_DRIVER_XST) $autodir/Driver_xst.h
|
||||||
|
''\t\$(PERL) -p -e "s/~DRIVER~/\$(BASEEXT)/g" \$(DBI_DRIVER_XST) > \$(BASEEXT).xsi
|
||||||
|
|
||||||
|
# ---
|
||||||
|
';
|
||||||
|
}
|
||||||
|
1;
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
})
|
||||||
11
machines/ptv/pkgs-cross/protobuf/default.nix
Normal file
11
machines/ptv/pkgs-cross/protobuf/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
final: prev: prev.protobuf.overrideAttrs (old: {
|
||||||
|
# https://github.com/advancedtelematic/aktualizr/issues/1427
|
||||||
|
# atomics not supported, need either submit PR like suggested bove
|
||||||
|
# or, for now, use libatomic_ops
|
||||||
|
postPatch = old.postPatch + ''
|
||||||
|
sed -i -e 's/set(protobuf_LINK_LIBATOMIC false)/set(protobuf_LINK_LIBATOMIC true)/' CMakeLists.txt
|
||||||
|
'';
|
||||||
|
buildInputs = [
|
||||||
|
prev.libatomic_ops
|
||||||
|
] ++ old.buildInputs;
|
||||||
|
})
|
||||||
15
machines/ptv/pkgs-cross/valgrind/default.nix
Normal file
15
machines/ptv/pkgs-cross/valgrind/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
final: prev: prev.valgrind.overrideAttrs (old: {
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "petrpavlu";
|
||||||
|
repo = "valgrind-riscv64";
|
||||||
|
rev = "71272b252977fe52f03ea4fa8306b457b098cca5";
|
||||||
|
hash = "sha256-xD84dYSzq9eD35NfnmtI/zONVRjhDAEJkge26yFK034=";
|
||||||
|
};
|
||||||
|
outputs = [ "out" ];
|
||||||
|
patches = [
|
||||||
|
(prev.fetchpatch {
|
||||||
|
url = "https://bugsfiles.kde.org/attachment.cgi?id=149173";
|
||||||
|
sha256 = "sha256-jX9hD4utWRebbXMJYZ5mu9jecvdrNP05E5J+PnKRTyQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
3
machines/ptv/pkgs-cross/vpnc/default.nix
Normal file
3
machines/ptv/pkgs-cross/vpnc/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
final: prev: prev.vpnc.overrideAttrs (old: {
|
||||||
|
nativeBuildInputs = old.nativeBuildInputs ++ (prev.lib.optionals (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) [final.perl]);
|
||||||
|
})
|
||||||
7
machines/ptv/pkgs-cross/vulkan-tools/default.nix
Normal file
7
machines/ptv/pkgs-cross/vulkan-tools/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
final: prev: prev.vulkan-tools.overrideAttrs (old: {
|
||||||
|
cmakeFlags = old.cmakeFlags ++ (prev.lib.optionals (prev.stdenv.hostPlatform != prev.stdenv.buildPlatform) [
|
||||||
|
"-DBUILD_CUBE=OFF"
|
||||||
|
"-DPKG_CONFIG_EXECUTABLE=${prev.buildPackages.pkg-config}/bin/riscv64-unknown-linux-gnu-pkg-config"
|
||||||
|
]);
|
||||||
|
})
|
||||||
|
|
||||||
3
machines/ptv/pkgs/cryptsetup/default.nix
Normal file
3
machines/ptv/pkgs/cryptsetup/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
final: prev: prev.cryptsetup.overrideAttrs (old: {
|
||||||
|
doCheck = false;
|
||||||
|
})
|
||||||
66
machines/ptv/pkgs/default.nix
Normal file
66
machines/ptv/pkgs/default.nix
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
(final: prev: let
|
||||||
|
noCheck = p: p.overrideAttrs (old: {
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
valgrind = (import ./valgrind) final prev;
|
||||||
|
valgrind-light = final.valgrind.override { gdb = null; };
|
||||||
|
cryptsetup = (import ./cryptsetup) final prev;
|
||||||
|
libopus = noCheck prev.libopus;
|
||||||
|
gn = (import ./gn) final prev;
|
||||||
|
# Test Times out
|
||||||
|
openexr = noCheck prev.openexr;
|
||||||
|
ell = noCheck prev.ell;
|
||||||
|
# Checks timeout:
|
||||||
|
pixman = noCheck prev.pixman;
|
||||||
|
# Inspired by: https://github.com/systemd/systemd/issues/12534
|
||||||
|
# and https://github.com/systemd/systemd/issues/30448
|
||||||
|
# Seems RISC-V and the like with GCC don't play well with O3
|
||||||
|
systemd = prev.systemd.overrideAttrs (old: {
|
||||||
|
# https://github.com/mesonbuild/meson/issues/10487
|
||||||
|
mesonBuildType = "custom";
|
||||||
|
mesonFlags = old.mesonFlags ++ [ "-Doptimization=2" ];
|
||||||
|
});
|
||||||
|
# See https://github.com/catchorg/Catch2/issues/2808
|
||||||
|
# Fixed by https://github.com/NixOS/nixpkgs/pull/295243
|
||||||
|
catch2_3 = prev.catch2_3.overrideAttrs ({ NIX_CFLAGS_COMPILE ? "", ... }: {
|
||||||
|
NIX_CFLAGS_COMPILE = "${NIX_CFLAGS_COMPILE} -Wno-error=cast-align";
|
||||||
|
});
|
||||||
|
# One test times out
|
||||||
|
json-glib = noCheck prev.json-glib;
|
||||||
|
# Openh264 doesn't support RISC-V (yet)
|
||||||
|
# freerdp requires it by default: lets make that not true
|
||||||
|
freerdp = prev.freerdp.override {
|
||||||
|
openh264 = null;
|
||||||
|
};
|
||||||
|
tracker = noCheck prev.tracker;
|
||||||
|
openblas = prev.openblas.overrideAttrs (old: {
|
||||||
|
postPatch = (old.postPatch or "") + ''
|
||||||
|
sed -i 's/-static//g' Makefile.riscv64
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
python3 = prev.python3.override {
|
||||||
|
packageOverrides = final-py: prev-py: let
|
||||||
|
noCheck = p: p.overridePythonAttrs (old: {
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
dbus-python = prev-py.dbus-python.overridePythonAttrs (old: {
|
||||||
|
nativeBuildInputs = old.nativeBuildInputs ++ [ final.dbus ];
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
hypothesis = noCheck prev-py.hypothesis;
|
||||||
|
h2 = noCheck prev-py.h2;
|
||||||
|
numpy = prev-py.numpy.overridePythonAttrs (old: {
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
# https://github.com/pandas-dev/pandas/pull/50349 <-- This
|
||||||
|
# but for risc-v
|
||||||
|
pandas = noCheck prev-py.pandas;
|
||||||
|
sphinx = noCheck prev-py.sphinx;
|
||||||
|
#skia-pathops = prev.skia-pathops.overridePythonAttrs (old: {
|
||||||
|
# patches = old.patches or [] ++ [ ./skia-riscv.patch ];
|
||||||
|
#});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
10
machines/ptv/pkgs/gn/default.nix
Normal file
10
machines/ptv/pkgs/gn/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# TODO: gn-unstable needs rev newer than 2021-01-28
|
||||||
|
# 713a1850957b919c876c924e43ef0ddc4d8a8144 for riscv64 support
|
||||||
|
|
||||||
|
final: prev: prev.gn.overrideAttrs (old: {
|
||||||
|
src = prev.fetchgit {
|
||||||
|
url = "https://gn.googlesource.com/gn";
|
||||||
|
rev = "713a1850957b919c876c924e43ef0ddc4d8a8144";
|
||||||
|
hash = "sha256-yzx7wPp/PEwGg4HZ99YntyHJ384nTVq6fyB6/vOOvOM=";
|
||||||
|
};
|
||||||
|
})
|
||||||
15
machines/ptv/pkgs/valgrind/default.nix
Normal file
15
machines/ptv/pkgs/valgrind/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
final: prev: prev.valgrind.overrideAttrs (old: {
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "petrpavlu";
|
||||||
|
repo = "valgrind-riscv64";
|
||||||
|
rev = "71272b252977fe52f03ea4fa8306b457b098cca5";
|
||||||
|
hash = "sha256-xD84dYSzq9eD35NfnmtI/zONVRjhDAEJkge26yFK034=";
|
||||||
|
};
|
||||||
|
outputs = [ "out" ];
|
||||||
|
patches = [
|
||||||
|
(prev.fetchpatch {
|
||||||
|
url = "https://bugsfiles.kde.org/attachment.cgi?id=149173";
|
||||||
|
sha256 = "sha256-jX9hD4utWRebbXMJYZ5mu9jecvdrNP05E5J+PnKRTyQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
BIN
machines/ptv/rgx-img-gpu-firmware.tar.gz
Normal file
BIN
machines/ptv/rgx-img-gpu-firmware.tar.gz
Normal file
Binary file not shown.
@@ -60,7 +60,8 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
NIXOS_OZONE_WL=1;
|
# Breaks WebCord
|
||||||
|
# NIXOS_OZONE_WL=1;
|
||||||
WLR_NO_HARDWARE_CURSORS=1;
|
WLR_NO_HARDWARE_CURSORS=1;
|
||||||
SDL_VIDEODRIVER="wayland";
|
SDL_VIDEODRIVER="wayland";
|
||||||
QT_QPA_PLATFORM="wayland-egl";
|
QT_QPA_PLATFORM="wayland-egl";
|
||||||
@@ -72,6 +73,18 @@ in {
|
|||||||
MOZ_ENABLE_WAYLAND=0;
|
MOZ_ENABLE_WAYLAND=0;
|
||||||
GTK_THEME="Adwaita-dark";
|
GTK_THEME="Adwaita-dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.portal.wlr = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
screencast = {
|
||||||
|
output_name = "DP-2";
|
||||||
|
max_fps = 30;
|
||||||
|
chooser_type = "simple";
|
||||||
|
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
dwl
|
dwl
|
||||||
|
|||||||
@@ -24,14 +24,20 @@
|
|||||||
nextcloud-client
|
nextcloud-client
|
||||||
libsForQt5.kdeconnect-kde
|
libsForQt5.kdeconnect-kde
|
||||||
|
|
||||||
discord-canary
|
|
||||||
discord
|
|
||||||
vesktop
|
vesktop
|
||||||
betterdiscordctl
|
|
||||||
slack
|
slack
|
||||||
signal-desktop
|
signal-desktop
|
||||||
zoom-us
|
zoom-us
|
||||||
|
|
||||||
anki
|
anki
|
||||||
|
(pkgs.wrapOBS {
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
wlrobs
|
||||||
|
obs-backgroundremoval
|
||||||
|
obs-vkcapture
|
||||||
|
input-overlay
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user