Skip to content

Commit

Permalink
Nix: fix cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Jul 27, 2024
1 parent f95d150 commit 864f527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ stdenv.mkDerivation {
];

buildInputs = [
hwdata
hyprutils
libdisplay-info
libdrm
Expand All @@ -46,10 +47,6 @@ stdenv.mkDerivation {
wayland-protocols
];

depsBuildBuild = [
hwdata
];

outputs = ["out" "dev"];

cmakeBuildType = "RelWithDebInfo";
Expand Down

0 comments on commit 864f527

Please sign in to comment.