From 2069f62abca9f42d9f72825adf38115054246ef9 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 14 Dec 2021 19:51:16 +0100 Subject: [PATCH] krops: -> 1.26.2 Includes https://github.com/krebs/krops/commit/9fc8cbf8e826d4c8a118f37202ab3f335341082a Add krops/fetch-release.sh --- pkgs/krops/default.nix | 4 ++-- pkgs/krops/fetch-release.sh | 17 +++++++++++++++++ pkgs/krops/get-sha256.sh | 14 -------------- 3 files changed, 19 insertions(+), 16 deletions(-) create mode 100755 pkgs/krops/fetch-release.sh delete mode 100755 pkgs/krops/get-sha256.sh diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index a80ceba..a198095 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -3,8 +3,8 @@ let src = pkgs.fetchgit { url = "https://cgit.krebsco.de/krops"; - rev = "804c79a14dc8f81a602d31d5a1eed5f82b3f2457"; - sha256 = "1k20l7zqprsrm9s38xslr7190vssf4sjdprd9gh146hxlvln2qrf"; + rev = "1.26.2"; + sha256 = "0mzn213dh3pklvdzfpwi4nin4lncdap447zvl11j81r809jll76j"; }; in { lib = import "${src}/lib"; diff --git a/pkgs/krops/fetch-release.sh b/pkgs/krops/fetch-release.sh new file mode 100755 index 0000000..cf414c6 --- /dev/null +++ b/pkgs/krops/fetch-release.sh @@ -0,0 +1,17 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p git +set -euo pipefail + +archive_hash () { + repo=$1 + rev=$2 + nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null +} + +echo "Fetching latest version" +version=$( + git ls-remote --tags https://github.com/krebs/krops | cut -f 2 \ + | sed -E 's|refs/tags/||g; s|((v)?(.*))|\1 \3|g' | sort -k 2 -V | tail -1 | cut -f 1 -d' ' +) +echo "rev: ${version}" +echo "sha256: $(archive_hash krebs/krops $version)" diff --git a/pkgs/krops/get-sha256.sh b/pkgs/krops/get-sha256.sh deleted file mode 100755 index d7cd792..0000000 --- a/pkgs/krops/get-sha256.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i bash -p git -set -euo pipefail - -archive_hash () { - repo=$1 - rev=$2 - nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null -} - -echo "Fetching latest krops commit" -latest=$(git ls-remote https://github.com/krebs/krops master | cut -f 1) -echo "rev: ${latest}" -echo "sha256: $(archive_hash krebs/krops $latest)"