librandombytes: added update script (#339583)

This commit is contained in:
Colin 2024-11-15 06:51:55 +00:00 committed by GitHub
commit 62594298c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -51,6 +51,8 @@ stdenv.mkDerivation (finalAttrs: {
install_name_tool -change "librandombytes-kernel.1.dylib" "$out/lib/librandombytes-kernel.1.dylib" "$out/bin/randombytes-info"
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://randombytes.cr.yp.to/";
description = "A simple API for applications generating fresh randomness";

View File

@ -0,0 +1,11 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl cacert nix common-updater-scripts --pure
#shellcheck shell=bash
set -eu -o pipefail
# upstream doesn't use git, but has this file specifically for versioning
version="$(curl https://randombytes.cr.yp.to/librandombytes-latest-version.txt)"
update-source-version librandombytes "$version"