git.iko.soy/typeable/nixpkgs
on master help sign in
nss_3_44: drop
commit36d2488cb67e9c76b7f7dfbcdadccf703ba3d332 authorajs124 <git@ajs124.de> dateSat 15 May 2021, 17:59 (6 years ago) parentdd95252
3 files changed−226
pkgs/development/libraries/nss/3.44.nix−144 pkgs/development/libraries/nss/85_security_load-3.44.patch−81 pkgs/top-level/all-packages.nix−1
pkgs/development/libraries/nss/3.44.nixdeleted−144
@@ -1,144 +0,0 @@
1−{ lib, stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages }:
2−
3−let
4− nssPEM = fetchurl {
5− url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz";
6− sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
7− };
8− version = "3.44.4";
9− underscoreVersion = builtins.replaceStrings ["."] ["_"] version;
10−
11−in stdenv.mkDerivation rec {
12− pname = "nss";
13− inherit version;
14−
15− src = fetchurl {
16− url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
17− sha256 = "7ec1a52e20fd9a23e1907eeba8f4f2ecd619dac5d20fa023ec5b4faa1843e847";
18− };
19−
20− depsBuildBuild = [ buildPackages.stdenv.cc ];
21−
22− nativeBuildInputs = [ perl ]
23− ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
24−
25− buildInputs = [ zlib sqlite ];
26−
27− propagatedBuildInputs = [ nspr ];
28−
29− prePatch = ''
30− xz -d < ${nssPEM} | patch -p1
31− '';
32−
33− patches =
34− [
35− # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
36− ./85_security_load-3.44.patch
37− ./ckpem.patch
38− ];
39−
40− patchFlags = [ "-p0" ];
41−
42− postPatch = lib.optionalString stdenv.isDarwin ''
43− substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
44− '';
45−
46− outputs = [ "out" "dev" "tools" ];
47−
48− preConfigure = "cd nss";
49−
50− makeFlags = let
51− # NSS's build systems expects aarch32 to be called arm; if we pass in armv6l/armv7l, it
52− # fails with a linker error
53− cpu = if stdenv.hostPlatform.isAarch32 then "arm" else stdenv.hostPlatform.parsed.cpu.name;
54− in [
55− "NSPR_INCLUDE_DIR=${nspr.dev}/include"
56− "NSPR_LIB_DIR=${nspr.out}/lib"
57− "NSDISTMODE=copy"
58− "BUILD_OPT=1"
59− "SOURCE_PREFIX=\$(out)"
60− "NSS_ENABLE_ECC=1"
61− "USE_SYSTEM_ZLIB=1"
62− "NSS_USE_SYSTEM_SQLITE=1"
63− "NATIVE_CC=${buildPackages.stdenv.cc}/bin/cc"
64− ] ++ lib.optionals (!stdenv.isDarwin) [
65− # Pass in CPU even if we're not cross compiling, because otherwise it tries to guess with
66− # uname, which can be wrong if e.g. we're compiling for aarch32 on aarch64
67− "OS_TEST=${cpu}"
68− "CPU_ARCH=${cpu}"
69− ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
70− "CROSS_COMPILE=1"
71− "NSS_DISABLE_GTESTS=1" # don't want to build tests when cross-compiling
72− ] ++ lib.optional stdenv.is64bit "USE_64=1"
73− ++ lib.optional stdenv.isDarwin "CCC=clang++";
74−
75− NIX_CFLAGS_COMPILE = "-Wno-error";
76−
77− # TODO(@oxij): investigate this: `make -n check` works but `make
78− # check` fails with "no rule", same for "installcheck".
79− doCheck = false;
80− doInstallCheck = false;
81−
82− postInstall = ''
83− rm -rf $out/private
84− mv $out/public $out/include
85− mv $out/*.OBJ/* $out/
86− rmdir $out/*.OBJ
87−
88− ln -s lib $out/lib64
89−
90− # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
91− # https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.32-gentoo-fixups.patch?id=af1acce6c6d2c3adb17689261dfe2c2b6771ab8a
92− NSS_MAJOR_VERSION=`grep "NSS_VMAJOR" lib/nss/nss.h | awk '{print $3}'`
93− NSS_MINOR_VERSION=`grep "NSS_VMINOR" lib/nss/nss.h | awk '{print $3}'`
94− NSS_PATCH_VERSION=`grep "NSS_VPATCH" lib/nss/nss.h | awk '{print $3}'`
95− PREFIX="$out"
96−
97− mkdir -p $out/lib/pkgconfig
98− sed -e "s,%prefix%,$PREFIX," \
99− -e "s,%exec_prefix%,$PREFIX," \
100− -e "s,%libdir%,$PREFIX/lib64," \
101− -e "s,%includedir%,$dev/include/nss," \
102− -e "s,%NSS_VERSION%,$NSS_MAJOR_VERSION.$NSS_MINOR_VERSION.$NSS_PATCH_VERSION,g" \
103− -e "s,%NSPR_VERSION%,4.16,g" \
104− pkg/pkg-config/nss.pc.in > $out/lib/pkgconfig/nss.pc
105− chmod 0644 $out/lib/pkgconfig/nss.pc
106−
107− sed -e "s,@prefix@,$PREFIX," \
108− -e "s,@MOD_MAJOR_VERSION@,$NSS_MAJOR_VERSION," \
109− -e "s,@MOD_MINOR_VERSION@,$NSS_MINOR_VERSION," \
110− -e "s,@MOD_PATCH_VERSION@,$NSS_PATCH_VERSION," \
111− pkg/pkg-config/nss-config.in > $out/bin/nss-config
112− chmod 0755 $out/bin/nss-config
113− '';
114−
115− postFixup = let
116− isCross = stdenv.hostPlatform != stdenv.buildPlatform;
117− nss = if isCross then buildPackages.nss.tools else "$out";
118− in ''
119− for libname in freebl3 nssdbm3 softokn3
120− do '' +
121− (if stdenv.isDarwin
122− then ''
123− libfile="$out/lib/lib$libname.dylib"
124− DYLD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
125− '' else ''
126− libfile="$out/lib/lib$libname.so"
127− LD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
128− '') + ''
129− ${nss}/bin/shlibsign -v -i "$libfile"
130− done
131−
132− moveToOutput bin "$tools"
133− moveToOutput bin/nss-config "$dev"
134− moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
135− rm -f "$out"/lib/*.a
136− '';
137−
138− meta = with lib; {
139− homepage = "https://developer.mozilla.org/en-US/docs/NSS";
140− description = "A set of libraries for development of security-enabled client and server applications";
141− license = licenses.mpl20;
142− platforms = platforms.all;
143− };
144−}
pkgs/development/libraries/nss/85_security_load-3.44.patchdeleted−81
@@ -1,81 +0,0 @@
1−diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
2−--- nss/cmd/shlibsign/shlibsign.c 2017-01-04 15:24:24.000000000 +0100
3−+++ nss/cmd/shlibsign/shlibsign.c 2017-01-24 14:43:31.030420852 +0100
4−@@ -875,6 +875,8 @@
5− goto cleanup;
6− }
7− lib = PR_LoadLibrary(libname);
8−+ if (!lib)
9−+ lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
10− assert(lib != NULL);
11− if (!lib) {
12− PR_fprintf(PR_STDERR, "loading softokn3 failed");
13−diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk
14−--- nss/coreconf/config.mk 2017-01-04 15:24:24.000000000 +0100
15−+++ nss/coreconf/config.mk 2017-01-24 14:43:47.989432372 +0100
16−@@ -202,3 +202,6 @@
17−
18− # Hide old, deprecated, TLS cipher suite names when building NSS
19− DEFINES += -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES
20−+
21−+# Nix specific stuff.
22−+DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\"
23−diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
24−--- nss/lib/pk11wrap/pk11load.c 2017-01-04 15:24:24.000000000 +0100
25−+++ nss/lib/pk11wrap/pk11load.c 2017-01-24 14:45:06.883485652 +0100
26−@@ -440,6 +440,13 @@
27− * unload the library if anything goes wrong from here on out...
28− */
29− library = PR_LoadLibrary(mod->dllName);
30−+ if ((library == NULL) &&
31−+ !rindex(mod->dllName, PR_GetDirectorySeparator())) {
32−+ library = PORT_LoadLibraryFromOrigin(my_shlib_name,
33−+ (PRFuncPtr) &softoken_LoadDSO,
34−+ mod->dllName);
35−+ }
36−+
37− mod->library = (void *)library;
38−
39− if (library == NULL) {
40−diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c
41−--- nss/lib/util/secload.c 2017-01-04 15:24:24.000000000 +0100
42−+++ nss/lib/util/secload.c 2017-01-24 14:43:31.030420852 +0100
43−@@ -70,9 +70,14 @@
44−
45− /* Remove the trailing filename from referencePath and add the new one */
46− c = strrchr(referencePath, PR_GetDirectorySeparator());
47−+ if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0]
48−+ * and program was called from $PATH. Hack to get libs from NIX_NSS_LIBDIR */
49−+ referencePath = NIX_NSS_LIBDIR;
50−+ c = (char*) &referencePath[sizeof(NIX_NSS_LIBDIR) - 1]; /* last / */
51−+ }
52− if (c) {
53− size_t referencePathSize = 1 + c - referencePath;
54−- fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1);
55−+ fullName = (char*) PORT_Alloc(strlen(name) + referencePathSize + 5);
56− if (fullName) {
57− memcpy(fullName, referencePath, referencePathSize);
58− strcpy(fullName + referencePathSize, name);
59−@@ -82,6 +87,11 @@
60− #endif
61− libSpec.type = PR_LibSpec_Pathname;
62− libSpec.value.pathname = fullName;
63−+ if ((referencePathSize >= 4) &&
64−+ (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) {
65−+ memcpy(fullName + referencePathSize -4, "lib", 3);
66−+ }
67−+ strcpy(fullName + referencePathSize, name);
68− dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL
69− #ifdef PR_LD_ALT_SEARCH_PATH
70− /* allow library's dependencies to be found in the same directory
71−@@ -89,6 +99,10 @@
72− | PR_LD_ALT_SEARCH_PATH
73− #endif
74− );
75−+ if (! dlh) {
76−+ strcpy(fullName + referencePathSize, name);
77−+ dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
78−+ }
79− PORT_Free(fullName);
80− }
81− }
pkgs/top-level/all-packages.nix−1
@@ -16927,7 +16927,6 @@ in
1692716927 };
1692816928
1692916929 nss = lowPrio (callPackage ../development/libraries/nss { });
16930− nss_3_44 = lowPrio (callPackage ../development/libraries/nss/3.44.nix { });
1693116930 nssTools = nss.tools;
1693216931
1693316932 # required for stable thunderbird and firefox-esr-78