From 2d399f3cae5ad4933e2a32b1c8ae8e4c0d30b021 Mon Sep 17 00:00:00 2001 From: Alexandru Tocar Date: Sat, 12 Apr 2025 20:59:39 +0200 Subject: [PATCH] creek: add update script --- pkgs/by-name/cr/creek/package.nix | 2 ++ pkgs/by-name/cr/creek/update.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 pkgs/by-name/cr/creek/update.sh diff --git a/pkgs/by-name/cr/creek/package.nix b/pkgs/by-name/cr/creek/package.nix index 5eb2069a21ad..710c8dc2e1e8 100644 --- a/pkgs/by-name/cr/creek/package.nix +++ b/pkgs/by-name/cr/creek/package.nix @@ -47,6 +47,8 @@ stdenv.mkDerivation (finalAttrs: { "${finalAttrs.deps}" ]; + passthru.updateScript = ./update.sh; + meta = { homepage = "https://git.8pit.net/creek"; description = "Malleable and minimalist status bar for the River compositor"; diff --git a/pkgs/by-name/cr/creek/update.sh b/pkgs/by-name/cr/creek/update.sh new file mode 100755 index 000000000000..a346ab54c950 --- /dev/null +++ b/pkgs/by-name/cr/creek/update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p bash common-updater-scripts gnused nixfmt-rfc-style + +latest_tag=$(list-git-tags --url=https://github.com/nmeum/creek | sed 's/^v//' | tail -n 1) + +update-source-version creek "$latest_tag" + +wget "https://raw.githubusercontent.com/nmeum/creek/v${latest_tag}/build.zig.zon" +nix --extra-experimental-features 'nix-command flakes' run github:nix-community/zon2nix# -- build.zig.zon >pkgs/by-name/cr/creek/build.zig.zon.nix + +nixfmt pkgs/by-name/cr/creek/build.zig.zon.nix + +rm -rf build.zig.zon