From 8c30ab913341adcc30297b3aa7fa2b92016ec7f3 Mon Sep 17 00:00:00 2001 From: ymstnt <21342713+ymstnt@users.noreply.github.com> Date: Mon, 24 Mar 2025 16:19:11 +0100 Subject: [PATCH 1/2] hifile: make overridable --- pkgs/by-name/hi/hifile/package.nix | 5 +++-- pkgs/by-name/hi/hifile/update.sh | 10 ++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/hi/hifile/package.nix b/pkgs/by-name/hi/hifile/package.nix index a57e4d65794f..6c07d6dbdfde 100644 --- a/pkgs/by-name/hi/hifile/package.nix +++ b/pkgs/by-name/hi/hifile/package.nix @@ -2,15 +2,16 @@ lib, appimageTools, fetchurl, + version ? "0.9.9.19", + hash ? "sha256-WrPNH7N8nYr/zd6RGsX3mL1P+nYUzXMPgIoBtC6tGo0=", }: let - version = "0.9.9.19"; pname = "hifile"; src = fetchurl { url = "https://www.hifile.app/files/HiFile-${version}.AppImage"; - hash = "sha256-WrPNH7N8nYr/zd6RGsX3mL1P+nYUzXMPgIoBtC6tGo0="; + inherit hash; }; appimageContents = appimageTools.extractType2 { diff --git a/pkgs/by-name/hi/hifile/update.sh b/pkgs/by-name/hi/hifile/update.sh index 95a0ae8440db..e65e3cb7f7f6 100755 --- a/pkgs/by-name/hi/hifile/update.sh +++ b/pkgs/by-name/hi/hifile/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=./. -i bash -p curl common-updater-scripts +#!nix-shell -I nixpkgs=./. -i bash -p curl nix-update latestVersion=$(curl -s "https://www.hifile.app/otherdownloads" | grep -A 10 '

All downloads

' | grep -m 1 '
  • .*AppImage.*' | sed -n 's/.*HiFile-\([0-9.]*\)\.AppImage.*/\1/p') currentVersion=$(nix-instantiate --eval -E "with import ./. {}; hifile.version" | tr -d '"') @@ -13,10 +13,4 @@ if [[ "$latestVersion" == "$currentVersion" ]]; then fi -prefetch=$(nix-prefetch-url "https://www.hifile.app/files/HiFile-$latestVersion.AppImage") -hash=$(nix-hash --type sha256 --to-sri "$prefetch") - -update-source-version hifile 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" --system="x86_64-linux" -update-source-version hifile "$latestVersion" "$hash" --system="x86_64-linux" - - +nix-update hifile --version $latestVersion From 856352f4ff400e864da935b24f6b5168aaa9ea97 Mon Sep 17 00:00:00 2001 From: ymstnt <21342713+ymstnt@users.noreply.github.com> Date: Mon, 24 Mar 2025 16:23:00 +0100 Subject: [PATCH 2/2] hifile: 0.9.9.19 -> 0.9.9.23 --- pkgs/by-name/hi/hifile/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/hi/hifile/package.nix b/pkgs/by-name/hi/hifile/package.nix index 6c07d6dbdfde..2feeef5c1829 100644 --- a/pkgs/by-name/hi/hifile/package.nix +++ b/pkgs/by-name/hi/hifile/package.nix @@ -2,8 +2,8 @@ lib, appimageTools, fetchurl, - version ? "0.9.9.19", - hash ? "sha256-WrPNH7N8nYr/zd6RGsX3mL1P+nYUzXMPgIoBtC6tGo0=", + version ? "0.9.9.23", + hash ? "sha256-BTHiLTgLqtUCuxnpPeI5nwe8tYMp+uxFKm01qHnC8A0=", }: let