pkgs/development/libraries: stdenv.lib -> lib
This commit is contained in:
committed by
Jonathan Ringer
parent
046d24424e
commit
66e44425c6
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, darwin, fixDarwinDylibNames, buildPackages, ninja
|
||||
{ lib, stdenv, fetchurl, nspr, perl, zlib, sqlite, darwin, fixDarwinDylibNames, buildPackages, ninja
|
||||
, # allow FIPS mode. Note that this makes the output non-reproducible.
|
||||
# https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Tech_Notes/nss_tech_note6
|
||||
enableFIPS ? false
|
||||
@@ -30,7 +30,7 @@ in stdenv.mkDerivation rec {
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ]
|
||||
++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ darwin.cctools fixDarwinDylibNames ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.cctools fixDarwinDylibNames ];
|
||||
|
||||
buildInputs = [ zlib sqlite ];
|
||||
|
||||
@@ -63,7 +63,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
patchFlags = [ "-p0" ];
|
||||
|
||||
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
|
||||
substituteInPlace nss/coreconf/config.gypi --replace "'DYLIB_INSTALL_NAME_BASE': '@executable_path'" "'DYLIB_INSTALL_NAME_BASE': '$out/lib'"
|
||||
'';
|
||||
@@ -96,9 +96,9 @@ in stdenv.mkDerivation rec {
|
||||
-Dhost_arch=${host} \
|
||||
-Duse_system_zlib=1 \
|
||||
--enable-libpkix \
|
||||
${stdenv.lib.optionalString enableFIPS "--enable-fips"} \
|
||||
${stdenv.lib.optionalString stdenv.isDarwin "--clang"} \
|
||||
${stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-tests"}
|
||||
${lib.optionalString enableFIPS "--enable-fips"} \
|
||||
${lib.optionalString stdenv.isDarwin "--clang"} \
|
||||
${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-tests"}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
@@ -143,7 +143,7 @@ in stdenv.mkDerivation rec {
|
||||
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
nss = if isCross then buildPackages.nss.tools else "$out";
|
||||
in
|
||||
(stdenv.lib.optionalString enableFIPS (''
|
||||
(lib.optionalString enableFIPS (''
|
||||
for libname in freebl3 nssdbm3 softokn3
|
||||
do '' +
|
||||
(if stdenv.isDarwin
|
||||
@@ -166,7 +166,7 @@ in stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://developer.mozilla.org/en-US/docs/NSS";
|
||||
description = "A set of libraries for development of security-enabled client and server applications";
|
||||
license = licenses.mpl20;
|
||||
|
||||
Reference in New Issue
Block a user