Unverified Commit bf42cf82 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge #269071: nss_latest: 3.94 -> 3.95

...into staging-23.11
parents 778695e1 65a2e39b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
import ./generic.nix {
  version = "3.90";
  hash = "sha256-ms1lNMQdjq0Z/Kb8s//+0vnwnEN8PXn+5qTuZoqqk7Y=";
  hash = "sha256-ZEG6ZcEymQ8Yw02ziT2LFWuvwZ1rRuT93rRHGYM22yQ=";
}
+11 −13
Original line number Diff line number Diff line
{ version, hash }:
{ version, hash, github ? false }:
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, nspr
, perl
, zlib
@@ -26,8 +26,10 @@ stdenv.mkDerivation rec {
  pname = "nss";
  inherit version;

  src = fetchurl {
    url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
  src = fetchFromGitHub {
    owner = "nss-dev";
    repo = "nss";
    rev = "NSS_${lib.replaceStrings ["."] ["_"] version}_RTM";
    inherit hash;
  };

@@ -50,25 +52,21 @@ stdenv.mkDerivation rec {
    ./remove-c25519-support.patch
  ];

  patchFlags = [ "-p0" ];

  postPatch = ''
    patchShebangs nss
    patchShebangs .

    for f in nss/coreconf/config.gypi nss/build.sh; do
    for f in coreconf/config.gypi build.sh; do
      substituteInPlace "$f" --replace "/usr/bin/env" "${buildPackages.coreutils}/bin/env"
    done

    substituteInPlace nss/coreconf/config.gypi --replace "/usr/bin/grep" "${buildPackages.coreutils}/bin/env grep"
    substituteInPlace coreconf/config.gypi --replace "/usr/bin/grep" "${buildPackages.coreutils}/bin/env grep"
  '' + 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'"
    substituteInPlace coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
    substituteInPlace coreconf/config.gypi --replace "'DYLIB_INSTALL_NAME_BASE': '@executable_path'" "'DYLIB_INSTALL_NAME_BASE': '$out/lib'"
  '';

  outputs = [ "out" "dev" "tools" ];

  preConfigure = "cd nss";

  buildPhase =
    let
      getArch = platform:
+2 −2
Original line number Diff line number Diff line
@@ -5,6 +5,6 @@
#       Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert

import ./generic.nix {
  version = "3.94";
  hash = "sha256-RjrhgO6eXunjrU9ikyZlfiNngMyGVXKpMKFlIKutndg=";
  version = "3.95";
  hash = "sha256-qgSbzlRbU+gElC2ae3FEGRUFSM1JHd/lNGNXC0x4xt4=";
}