summary refs log tree commit diff
path: root/pkgs/development/libraries/libiberty
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libiberty')
-rw-r--r--pkgs/development/libraries/libiberty/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libiberty/default.nix b/pkgs/development/libraries/libiberty/default.nix
index ff26c1029ef..2040ef3bee0 100644
--- a/pkgs/development/libraries/libiberty/default.nix
+++ b/pkgs/development/libraries/libiberty/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, buildPackages, staticBuild ? false }:
+{ lib, stdenv, buildPackages
+, staticBuild ? stdenv.hostPlatform.isStatic
+}:
 
 let inherit (buildPackages.buildPackages) gcc; in
 
@@ -13,13 +15,13 @@ stdenv.mkDerivation {
   postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
 
   configureFlags = [ "--enable-install-libiberty" ]
-    ++ stdenv.lib.optional (!staticBuild) "--enable-shared";
+    ++ lib.optional (!staticBuild) "--enable-shared";
 
-  postInstall = stdenv.lib.optionalString (!staticBuild) ''
+  postInstall = lib.optionalString (!staticBuild) ''
     cp pic/libiberty.a $out/lib*/libiberty.a
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://gcc.gnu.org/";
     license = licenses.lgpl2;
     description = "Collection of subroutines used by various GNU programs";