update fileshare

This commit is contained in:
Kopatz
2026-03-07 15:02:13 +01:00
parent 698947999d
commit de789776b4
2 changed files with 22 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ buildGoModule rec {
src = fetchGit {
url = "git@github.com:kropatz/kop-fileshare.git";
ref = "master";
rev = "211c9654ee76404136dcaec5141d7a885666e823";
rev = "3b703425684efce51692a05c3f77f0ad9e4a7eb7";
};
vendorHash = "sha256-OQ6rNgOQHrrhE7DT+ulwpWJCDJ4DeJiDzriAu3mfS7I=";

21
pkgs/kop-fileshare/update.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq nix-prefetch-git
set -e
PACKAGE_FILE="default.nix" # Replace with your package file path
REPO_URL="git@github.com:kropatz/kop-fileshare.git" # Replace with the repository URL
SCRIPT_DIR=$(dirname $(realpath $0))
echo "Fetching latest revision from $REPO_URL..."
# Get the latest revision and sha256
latest_rev=$(nix-prefetch-git $REPO_URL | jq -r '.rev')
echo "Latest revision: $latest_rev"
# Update the package file with the new revision and sha256
sed -i "s|rev = \".*\";|rev = \"$latest_rev\";|" "$SCRIPT_DIR"/$PACKAGE_FILE
echo "Package file $SCRIPT_DIR $PACKAGE_FILE updated successfully."