From 1c00a8afd710beb2800945252ebd4001850d691a Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 20 Feb 2018 21:27:57 -0500 Subject: [PATCH] libiberty, libbfd: Make hash less fickle These shouldn't respond to targetPlatform, but previously did. The reason is somewhat complex: they would rely on the sources of gcc and binutils, respectively, which *do* depend on the target platform. Obviously the source is the same in all cases, but when those packages are no longer preserved from bootstrapping stages their `src` attributes use a different fetchurl resulting in a changed hash. --- pkgs/development/libraries/libbfd/default.nix | 6 ++++-- pkgs/development/libraries/libiberty/default.nix | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libbfd/default.nix b/pkgs/development/libraries/libbfd/default.nix index 018239a3e778..ac508908e8f2 100644 --- a/pkgs/development/libraries/libbfd/default.nix +++ b/pkgs/development/libraries/libbfd/default.nix @@ -1,8 +1,10 @@ -{ stdenv -, fetchurl, fetchpatch, gnu-config, autoreconfHook264, bison, binutils-raw +{ stdenv, buildPackages +, fetchurl, fetchpatch, gnu-config, autoreconfHook264, bison , libiberty, zlib }: +let inherit (buildPackages.buildPackages) binutils-raw; in + stdenv.mkDerivation rec { name = "libbfd-${version}"; inherit (binutils-raw.bintools) version src; diff --git a/pkgs/development/libraries/libiberty/default.nix b/pkgs/development/libraries/libiberty/default.nix index 6608a3393b12..516e6bbbe88c 100644 --- a/pkgs/development/libraries/libiberty/default.nix +++ b/pkgs/development/libraries/libiberty/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, gcc, staticBuild ? false }: +{ stdenv, buildPackages, fetchurl, staticBuild ? false }: + +let inherit (buildPackages.buildPackages) gcc; in stdenv.mkDerivation rec { name = "libiberty-${gcc.cc.version}";