Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / nss / update.sh
blob600dbdff004c750b6bd24b44e39750ba97d19ef5
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl gnugrep gnused coreutils common-updater-scripts
4 set -x
6 base_url="https://ftp.mozilla.org/pub/security/nss/releases/"
8 version="$(curl -sSL ${base_url} | grep 'RTM' | grep -v WITH_CKBI | sed 's|.*>\(NSS_[0-9]*_[0-9]*_*[0-9]*_*[0-9]*_RTM\)/.*|\1|g' | sed 's|NSS_||g' | sed 's|_RTM||g' | sed 's|_|.|g' | sort -V | tail -1)"
9 hash="$(nix-hash --type sha256 --base32 ${base_url}/NSS_${version/\./_}_RTM/src/nss-${version}.tar.gz)"
10 update-source-version nss "${version}" "${hash}"