libcpucycles: add update script (#339585)

authored by Colin and committed by GitHub 6cda5aeb 62594298

+13
+2
pkgs/by-name/li/libcpucycles/package.nix
··· 31 install_name_tool -change "libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" "$out/bin/cpucycles-info" 32 ''; 33 34 meta = { 35 homepage = "https://cpucycles.cr.yp.to/"; 36 description = "Microlibrary for counting CPU cycles";
··· 31 install_name_tool -change "libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" "$out/bin/cpucycles-info" 32 ''; 33 34 + passthru.updateScript = ./update.sh; 35 + 36 meta = { 37 homepage = "https://cpucycles.cr.yp.to/"; 38 description = "Microlibrary for counting CPU cycles";
+11
pkgs/by-name/li/libcpucycles/update.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl cacert nix common-updater-scripts --pure 3 + #shellcheck shell=bash 4 + 5 + set -eu -o pipefail 6 + 7 + # upstream doesn't use git, but has this file specifically for versioning 8 + version="$(curl https://cpucycles.cr.yp.to/libcpucycles-latest-version.txt)" 9 + 10 + update-source-version libcpucycles "$version" 11 +