libcpucycles: add update script (#339585)

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

View File

@ -31,6 +31,8 @@ stdenv.mkDerivation (finalAttrs: {
install_name_tool -change "libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" "$out/bin/cpucycles-info"
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://cpucycles.cr.yp.to/";
description = "Microlibrary for counting CPU cycles";

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://cpucycles.cr.yp.to/libcpucycles-latest-version.txt)"
update-source-version libcpucycles "$version"