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