Nix: fix cross-compilation

This commit is contained in:
Mihai Fufezan 2024-07-27 18:06:47 +03:00
parent f95d150937
commit 864f527058
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
2 changed files with 8 additions and 4 deletions

View file

@ -31,6 +31,12 @@
localSystem.system = system;
overlays = with self.overlays; [aquamarine];
});
pkgsCrossFor = eachSystem (system: crossSystem:
import nixpkgs {
localSystem = system;
crossSystem = crossSystem;
overlays = with self.overlays; [aquamarine];
});
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
@ -72,6 +78,7 @@
packages = eachSystem (system: {
default = self.packages.${system}.aquamarine;
inherit (pkgsFor.${system}) aquamarine aquamarine-with-tests;
aquamarine-cross = (pkgsCrossFor.${system} "aarch64-linux").aquamarine;
});
formatter = eachSystem (system: pkgsFor.${system}.alejandra);

View file

@ -32,6 +32,7 @@ stdenv.mkDerivation {
];
buildInputs = [
hwdata
hyprutils
libdisplay-info
libdrm
@ -46,10 +47,6 @@ stdenv.mkDerivation {
wayland-protocols
];
depsBuildBuild = [
hwdata
];
outputs = ["out" "dev"];
cmakeBuildType = "RelWithDebInfo";