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, fixDarwinDylibNames, buildPackages }:
|
||||
{ lib, stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages }:
|
||||
|
||||
let
|
||||
nssPEM = fetchurl {
|
||||
@@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
nativeBuildInputs = [ perl ]
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
|
||||
buildInputs = [ zlib sqlite ];
|
||||
|
||||
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
patchFlags = [ "-p0" ];
|
||||
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
|
||||
'';
|
||||
|
||||
@@ -61,16 +61,16 @@ in stdenv.mkDerivation rec {
|
||||
"USE_SYSTEM_ZLIB=1"
|
||||
"NSS_USE_SYSTEM_SQLITE=1"
|
||||
"NATIVE_CC=${buildPackages.stdenv.cc}/bin/cc"
|
||||
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
# Pass in CPU even if we're not cross compiling, because otherwise it tries to guess with
|
||||
# uname, which can be wrong if e.g. we're compiling for aarch32 on aarch64
|
||||
"OS_TEST=${cpu}"
|
||||
"CPU_ARCH=${cpu}"
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"CROSS_COMPILE=1"
|
||||
"NSS_DISABLE_GTESTS=1" # don't want to build tests when cross-compiling
|
||||
] ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"
|
||||
++ stdenv.lib.optional stdenv.isDarwin "CCC=clang++";
|
||||
] ++ lib.optional stdenv.is64bit "USE_64=1"
|
||||
++ lib.optional stdenv.isDarwin "CCC=clang++";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
@@ -135,7 +135,7 @@ in stdenv.mkDerivation rec {
|
||||
rm -f "$out"/lib/*.a
|
||||
'';
|
||||
|
||||
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;
|
||||
|
||||
@@ -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
|
||||
@@ -24,7 +24,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 ];
|
||||
|
||||
@@ -57,7 +57,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'"
|
||||
'';
|
||||
@@ -90,9 +90,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
|
||||
'';
|
||||
@@ -137,7 +137,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
|
||||
@@ -160,7 +160,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;
|
||||
|
||||
@@ -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