2016-03-30 16:51:00 +01:00
|
|
|
{ stdenv, fetchurl, staticBuild ? false }:
|
2014-10-17 00:06:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-28 09:53:09 +01:00
|
|
|
version = "4.9.3";
|
2014-10-17 00:06:57 +01:00
|
|
|
name = "libiberty-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
2015-07-28 09:53:09 +01:00
|
|
|
sha256 = "0zmnm00d2a1hsd41g34bhvxzvxisa2l584q3p447bd91lfjv4ci3";
|
2014-10-17 00:06:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
|
|
|
|
2016-03-30 16:51:00 +01:00
|
|
|
enable_shared = !staticBuild;
|
2014-10-17 00:06:57 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-03-30 16:51:00 +01:00
|
|
|
mkdir -p $out/lib $out/include
|
|
|
|
cp ../include/libiberty.h $out/include/
|
|
|
|
if [ -z "$enabled_shared" ]; then
|
|
|
|
cp libiberty.a $out/lib/libiberty.a
|
|
|
|
else
|
|
|
|
cp pic/libiberty.a $out/lib/libiberty_pic.a
|
|
|
|
fi
|
2014-10-17 00:06:57 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://gcc.gnu.org/;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
description = "Collection of subroutines used by various GNU programs";
|
2015-05-14 18:09:10 +01:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2014-10-17 00:06:57 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|