From 4918e57979bbdbd05aabb20f63e1cb5dc289bcbd Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 27 Jul 2024 20:21:53 +0300 Subject: [PATCH] Nix: fix cross-compilation --- flake.nix | 7 +++++++ nix/default.nix | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 50cee2e..f3674bf 100644 --- a/flake.nix +++ b/flake.nix @@ -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); diff --git a/nix/default.nix b/nix/default.nix index c2f9254..1b1e73e 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation { inherit version doCheck; src = ../.; + strictDeps = true; + nativeBuildInputs = [ cmake hyprwayland-scanner @@ -32,6 +34,7 @@ stdenv.mkDerivation { ]; buildInputs = [ + hwdata hyprutils libdisplay-info libdrm @@ -46,10 +49,6 @@ stdenv.mkDerivation { wayland-protocols ]; - depsBuildBuild = [ - hwdata - ]; - outputs = ["out" "dev"]; cmakeBuildType = "RelWithDebInfo";