diff --git a/pkgs/fawltydeps/default.nix b/pkgs/fawltydeps/default.nix index 82627c9..3a0033c 100644 --- a/pkgs/fawltydeps/default.nix +++ b/pkgs/fawltydeps/default.nix @@ -36,12 +36,12 @@ let src = fetchFromGitHub { owner = "tweag"; repo = "FawltyDeps"; - rev = "0201e74a158c5774db9150e1e70f01e76bad34e7"; - sha256 = "sha256-kSAy6IOS+G+e7hG4ZseglhOsnJ7Tg87MaMRCWUoSJdA="; + rev = "f8b156756b1de47c578935c4d6f6a7a8f2975c63"; + sha256 = "sha256-3oQX0oX1+jZAC+vTRd7dUGNfioc6ADFmF+GSbvVyYsQ="; }; in poetry2nix.mkPoetryApplication { - version = "2023-03-14"; + version = "2023-03-16"; python = python39; projectDir = "${src}"; overrides = poetryOverrides; diff --git a/pkgs/fawltydeps/update.sh b/pkgs/fawltydeps/update.sh new file mode 100755 index 0000000..5fd8364 --- /dev/null +++ b/pkgs/fawltydeps/update.sh @@ -0,0 +1,32 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p nix-prefetch-github gnused jq + +function help() { + echo "Regenerates packaging data for the fawltydeps package." + echo "Usage: $0 " + exit 1 +} + +if [[ $# -gt 1 || $1 == -* ]]; then + help +fi + +set -x + +cd "$(dirname "$0")" +version="$1" + +set -euo pipefail + +if [ -z "$version" ]; then + help +fi + +src_hash=$(nix-prefetch-github tweag FawltyDeps --rev "${version}" | jq -r .sha256) +src_hash=$(nix hash to-sri --type sha256 "$src_hash") + +sed -i -E -e "s#rev = \".*\"#rev = \"$version\"#" default.nix +sed -i -E -e "s#sha256 = \".*\"#sha256 = \"$src_hash\"#" default.nix +sed -i -E -e "s#version = \".*\"#version = \"$(date +%Y-%m-%d)\"#" default.nix + +