|
2 | 2 | lib, |
3 | 3 | stdenv, |
4 | 4 | writeText, |
5 | | - fetchFromGitHub, |
| 5 | + fetchurl, |
6 | 6 | buildcatrust, |
7 | 7 | blacklist ? [ ], |
8 | 8 | extraCertificateFiles ? [ ], |
9 | 9 | extraCertificateStrings ? [ ], |
10 | 10 |
|
11 | | - # Used by update.sh |
12 | | - nssOverride ? null, |
13 | | - |
14 | 11 | # Used for tests only |
15 | 12 | runCommand, |
16 | 13 | cacert, |
|
23 | 20 | lib.concatStringsSep "\n\n" extraCertificateStrings |
24 | 21 | ); |
25 | 22 |
|
26 | | - srcVersion = "3.117"; |
27 | | - version = if nssOverride != null then nssOverride.version else srcVersion; |
| 23 | + version = "3.121"; |
28 | 24 | meta = { |
29 | | - homepage = "https://curl.haxx.se/docs/caextract.html"; |
| 25 | + homepage = "https://firefox-source-docs.mozilla.org/security/nss/runbooks/rootstore.html#root-store-consumers"; |
30 | 26 | description = "Bundle of X.509 certificates of public Certificate Authorities (CA)"; |
31 | 27 | platforms = lib.platforms.all; |
32 | 28 | maintainers = with lib.maintainers; [ |
|
35 | 31 | ]; |
36 | 32 | license = lib.licenses.mpl20; |
37 | 33 | }; |
38 | | - certdata = stdenv.mkDerivation { |
39 | | - pname = "nss-cacert-certdata"; |
40 | | - inherit version; |
41 | | - |
42 | | - src = |
43 | | - if nssOverride != null then |
44 | | - nssOverride.src |
45 | | - else |
46 | | - fetchFromGitHub { |
47 | | - owner = "nss-dev"; |
48 | | - repo = "nss"; |
49 | | - rev = "NSS_${lib.replaceStrings [ "." ] [ "_" ] version}_RTM"; |
50 | | - hash = "sha256-sAs0TiV3TK/WtgHvEjl2KFAgebyWZYmcRcmxjpn2AME="; |
51 | | - }; |
52 | | - |
53 | | - dontBuild = true; |
54 | | - |
55 | | - installPhase = '' |
56 | | - runHook preInstall |
57 | | -
|
58 | | - mkdir $out |
59 | | - cp lib/ckfw/builtins/certdata.txt $out |
60 | | -
|
61 | | - runHook postInstall |
62 | | - ''; |
63 | | - |
64 | | - inherit meta; |
65 | | - }; |
66 | 34 | in |
67 | 35 | stdenv.mkDerivation { |
68 | 36 | pname = "nss-cacert"; |
69 | 37 | inherit version; |
70 | 38 |
|
71 | | - src = certdata; |
| 39 | + src = fetchurl { |
| 40 | + urls = |
| 41 | + let |
| 42 | + # This file is effectively a public interface, see the homepage link |
| 43 | + file = "lib/ckfw/builtins/certdata.txt"; |
| 44 | + tag = "NSS_${lib.replaceStrings [ "." ] [ "_" ] version}_RTM"; |
| 45 | + in |
| 46 | + [ |
| 47 | + # Prefer mercurial as the canonical source, while github is just a mirror |
| 48 | + "https://hg-edge.mozilla.org/projects/nss/raw-file/${tag}/${file}" |
| 49 | + "https://raw.githubusercontent.com/nss-dev/nss/refs/tags/${tag}/${file}" |
| 50 | + ]; |
| 51 | + hash = "sha256-O5jU4/9XoybZWHwzYzA5yMOpzwtV98pYHXWY/zKesfM="; |
| 52 | + }; |
| 53 | + |
| 54 | + unpackPhase = '' |
| 55 | + runHook preUnpack |
| 56 | + cp "$src" "$(stripHash "$src")" |
| 57 | + runHook postUnpack |
| 58 | + ''; |
72 | 59 |
|
73 | 60 | outputs = [ |
74 | 61 | "out" |
|
0 commit comments