66604c92c1
GitOrigin-RevId: 32b8ed738096bafb4cdb7f70347a0f63f9f40151
29 lines
789 B
Nix
29 lines
789 B
Nix
{ stdenv, buildPackages, staticBuild ? false }:
|
|
|
|
let inherit (buildPackages.buildPackages) gcc; in
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "libiberty";
|
|
version = "${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 = "https://gcc.gnu.org/";
|
|
license = licenses.lgpl2;
|
|
description = "Collection of subroutines used by various GNU programs";
|
|
maintainers = with maintainers; [ abbradar ericson2314 ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|