summary refs log tree commit diff
path: root/pkgs/stdenv/adapters.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-21 21:42:17 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-21 21:42:17 +0000
commited3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57 (patch)
treee75cb624cffaf4230d3ce0d6753ad16eef1dc437 /pkgs/stdenv/adapters.nix
parent8b4f33ac7690d3dcf02618898dc81f6723a7269e (diff)
downloadnixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar.gz
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar.bz2
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar.lz
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar.xz
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.tar.zst
nixlib-ed3ebb7c2cae0a1f5ebc411ce553f5ce3a3c6e57.zip
* libjpeg updated to version 8.
* libpng updated to 1.4.0.
* For libjpegStatic, use a stdenv adapter to build a static library.

svn path=/nixpkgs/branches/stdenv-updates/; revision=19605
Diffstat (limited to 'pkgs/stdenv/adapters.nix')
-rw-r--r--pkgs/stdenv/adapters.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 5b37f9908c24..ac9e807801c6 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -107,6 +107,19 @@ rec {
       isStatic = true;
     } // {inherit fetchurl;};
 
+    
+  # Return a modified stdenv that disables building shared libraries.
+  # However, executables will still be dynamically linked.
+  disableSharedLibraries = stdenv: stdenv //
+    { mkDerivation = args: stdenv.mkDerivation (args // {
+        dontDisableStatic = true;
+        configureFlags =
+          (if args ? configureFlags then args.configureFlags else "")
+          + " --disable-shared"; # brrr...
+      });
+    } // {inherit fetchurl;};
+
+    
   # Return a modified stdenv that adds a cross compiler to the
   # builds.
   makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv //
@@ -164,6 +177,7 @@ rec {
         };
     } // { inherit cross; };
 
+    
   /* Modify a stdenv so that the specified attributes are added to
      every derivation returned by its mkDerivation function.
 
@@ -267,7 +281,6 @@ rec {
 
   /* Use the trace output to report all processed derivations with their
      license name.
- 
   */
   traceDrvLicenses = stdenv: stdenv //
     { mkDerivation = args:
@@ -289,6 +302,7 @@ rec {
         };
     };
 
+    
   /* Abort if the license predicate is not verified for a derivation
      declared with mkDerivation.