From 011c890a62fe4db4d4bb239ce232442bfc541715 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 1 Dec 2018 22:25:55 -0600 Subject: [PATCH] nss: generate url from version (doesn't change derivation hash) Makes future upgrades easier... --- pkgs/development/libraries/nss/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index e559b9a076ac..4e6911058de3 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -5,13 +5,15 @@ let url = http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz; sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw"; }; + version = "3.40"; + underscoreVersion = builtins.replaceStrings ["."] ["_"] version; in stdenv.mkDerivation rec { name = "nss-${version}"; - version = "3.40"; + inherit version; src = fetchurl { - url = "mirror://mozilla/security/nss/releases/NSS_3_40_RTM/src/${name}.tar.gz"; + url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${name}.tar.gz"; sha256 = "1p9jidi3nysirf3lhkrqkjjrf2cw3y2wz2jgjvsjn1ysidxhhqh5"; };