mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
1c00a8afd7
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.
29 lines
784 B
Nix
29 lines
784 B
Nix
{ stdenv, buildPackages, fetchurl, staticBuild ? false }:
|
|
|
|
let inherit (buildPackages.buildPackages) gcc; in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "libiberty-${gcc.cc.version}";
|
|
|
|
inherit (gcc.cc) src;
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
|
|
|
configureFlags = [ "--enable-install-libiberty" ]
|
|
++ stdenv.lib.optional (!staticBuild) "--enable-shared";
|
|
|
|
postInstall = stdenv.lib.optionalString (!staticBuild) ''
|
|
cp pic/libiberty.a $out/lib*/libiberty.a
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = http://gcc.gnu.org/;
|
|
license = licenses.lgpl2;
|
|
description = "Collection of subroutines used by various GNU programs";
|
|
maintainers = with maintainers; [ abbradar ericson2314 ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|