From 7351656b82e59e46610c7e9edee023615b153e0e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 29 Jun 2021 21:46:54 -0500 Subject: [PATCH 1/2] Only cross compile from x86_64-linux This is broken on aarch64-linux / x86_64-darwin, so might as well just disable it for now. --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 999028ec2..7d41947a7 100644 --- a/flake.nix +++ b/flake.nix @@ -385,7 +385,7 @@ buildStatic = nixpkgs.lib.genAttrs linux64BitSystems (system: self.packages.${system}.nix-static); buildCross = nixpkgs.lib.genAttrs crossSystems (crossSystem: - nixpkgs.lib.genAttrs linux64BitSystems (system: self.packages.${system}."nix-${crossSystem}")); + nixpkgs.lib.genAttrs ["x86_64-linux"] (system: self.packages.${system}."nix-${crossSystem}")); # Perl bindings for various platforms. perlBindings = nixpkgs.lib.genAttrs systems (system: self.packages.${system}.nix.perl-bindings); @@ -395,7 +395,7 @@ # the installation script. binaryTarball = nixpkgs.lib.genAttrs systems (system: binaryTarball nixpkgsFor.${system} nixpkgsFor.${system}.nix nixpkgsFor.${system}); - binaryTarballCross = nixpkgs.lib.genAttrs systems (system: builtins.listToAttrs (map (crossSystem: { + binaryTarballCross = nixpkgs.lib.genAttrs ["x86_64-linux"] (system: builtins.listToAttrs (map (crossSystem: { name = crossSystem; value = let nixpkgsCross = import nixpkgs { From 2200f315daff989a974ed4fac445f90a06d55e81 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 29 Jun 2021 21:48:07 -0500 Subject: [PATCH 2/2] Disable -pie on static nix This should resolve the failing build. See https://github.com/NixOS/nixpkgs/pull/128674 for a better fix. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 7d41947a7..5430d3904 100644 --- a/flake.nix +++ b/flake.nix @@ -549,6 +549,8 @@ stripAllList = ["bin"]; strictDeps = true; + + hardeningDisable = [ "pie" ]; }; } // builtins.listToAttrs (map (crossSystem: { name = "nix-${crossSystem}";