diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-02-12 13:40:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-12 14:40:29 +0100 |
commit | d381e51fb567e23039f17fdf28576dd6b341911d (patch) | |
tree | a1ce4573baf6fdf31c1169fbf8604ed37eb85b65 | |
parent | b5ace1ffc029c4fea5ab2344c0a77e459b3df4ed (diff) | |
download | nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar.gz nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar.bz2 nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar.lz nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar.xz nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.tar.zst nixpkgs-d381e51fb567e23039f17fdf28576dd6b341911d.zip |
binutils: try to move headers around only when --host/--target differ (#215989)
Without the change `pkgsMusl.pkgsStatic.buildPackages.binutils.bintools` build fails as: $ ln: failed to create symbolic link './include': File exists This happens because both host and target are `x86_64-unknown-linux-musl`. But `hostPlatform` differs from `targetPlatform` by `isStatic` value. By `./configure`'s standard it's not yet a cross-compilation. The change tries to move things around only when tuples change.
-rw-r--r-- | pkgs/development/tools/misc/binutils/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 0d7e12a51fb..208b404f1ea 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -234,7 +234,7 @@ stdenv.mkDerivation (finalAttrs: { # $out/$host/$target/include/* to $dev/include/* # TODO(trofi): fix installation paths upstream so we could remove this # code and have "lib" output unconditionally. - postInstall = lib.optionalString (hostPlatform != targetPlatform) '' + postInstall = lib.optionalString (hostPlatform.config != targetPlatform.config) '' ln -s $out/${hostPlatform.config}/${targetPlatform.config}/lib/* $out/lib/ ln -s $out/${hostPlatform.config}/${targetPlatform.config}/include/* $dev/include/ ''; |