2021-01-22 00:00:13 +07:00
|
|
|
{ lib, stdenv, buildPackages
|
2020-12-20 06:11:26 +00:00
|
|
|
, staticBuild ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2018-02-20 21:27:57 -05:00
|
|
|
|
|
|
|
let inherit (buildPackages.buildPackages) gcc; in
|
2014-10-17 03:06:57 +04:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2020-05-06 23:20:18 -07:00
|
|
|
pname = "libiberty";
|
|
|
|
version = "${gcc.cc.version}";
|
2014-10-17 03:06:57 +04:00
|
|
|
|
2016-04-30 03:01:32 +03:00
|
|
|
inherit (gcc.cc) src;
|
2014-10-17 03:06:57 +04:00
|
|
|
|
2017-10-14 11:30:59 -04:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2014-10-17 03:06:57 +04:00
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
|
|
|
|
2017-10-14 11:30:59 -04:00
|
|
|
configureFlags = [ "--enable-install-libiberty" ]
|
2021-01-22 00:00:13 +07:00
|
|
|
++ lib.optional (!staticBuild) "--enable-shared";
|
2014-10-17 03:06:57 +04:00
|
|
|
|
2021-01-22 00:00:13 +07:00
|
|
|
postInstall = lib.optionalString (!staticBuild) ''
|
2016-04-30 03:01:32 +03:00
|
|
|
cp pic/libiberty.a $out/lib*/libiberty.a
|
2014-10-17 03:06:57 +04:00
|
|
|
'';
|
|
|
|
|
2021-01-22 00:00:13 +07:00
|
|
|
meta = with lib; {
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://gcc.gnu.org/";
|
2014-10-17 03:06:57 +04:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
description = "Collection of subroutines used by various GNU programs";
|
2017-10-14 11:30:59 -04:00
|
|
|
maintainers = with maintainers; [ abbradar ericson2314 ];
|
2014-10-17 03:06:57 +04:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|