mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
libiberty: add static variant
This commit is contained in:
parent
e2e56a902f
commit
088231fe9f
2 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, staticBuild ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.9.3";
|
||||
|
@ -11,11 +11,16 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
|
||||
|
||||
enable_shared = 1;
|
||||
enable_shared = !staticBuild;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp pic/libiberty.a $out/lib/libiberty_pic.a
|
||||
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
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -2206,6 +2206,8 @@ in
|
|||
|
||||
libiberty = callPackage ../development/libraries/libiberty { };
|
||||
|
||||
libiberty_static = callPackage ../development/libraries/libiberty { staticBuild = true; };
|
||||
|
||||
libibverbs = callPackage ../development/libraries/libibverbs { };
|
||||
|
||||
libxcomp = callPackage ../development/libraries/libxcomp { };
|
||||
|
|
Loading…
Reference in a new issue