From 13f2e60293758a7c1f8277d0e85c66b6e41d19d1 Mon Sep 17 00:00:00 2001 From: YMSTNT <21342713+YMSTNT@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:01:44 +0200 Subject: [PATCH 1/3] hifile: 0.9.9.13 -> 0.9.9.15 --- pkgs/by-name/hi/hifile/package.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/hi/hifile/package.nix b/pkgs/by-name/hi/hifile/package.nix index 8b9099bf55e1..88a1d420247b 100644 --- a/pkgs/by-name/hi/hifile/package.nix +++ b/pkgs/by-name/hi/hifile/package.nix @@ -1,19 +1,24 @@ -{ lib, appimageTools, fetchurl }: +{ + lib, + appimageTools, + fetchurl, +}: let - version = "0.9.9.13"; + version = "0.9.9.15"; pname = "hifile"; src = fetchurl { url = "https://www.hifile.app/files/HiFile-${version}.AppImage"; - hash = "sha256-nZlPdl7D0UWtm8mFz4IDqmvGeBVc7mbeUpzyHrdDQtk="; + hash = "sha256-Q0clcmBLWt8qDzHYjRRbwyZBSWW//yBTbRcnRjrSlzM="; }; appimageContents = appimageTools.extractType2 { inherit pname version src; }; -in appimageTools.wrapType2 rec { +in +appimageTools.wrapType2 rec { inherit pname version src; extraInstallCommands = '' From 3ff2adbb80da6648ce46b1122ebe02c68c5c57e4 Mon Sep 17 00:00:00 2001 From: YMSTNT <21342713+YMSTNT@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:58:44 +0200 Subject: [PATCH 2/3] hifile: add update script --- pkgs/by-name/hi/hifile/package.nix | 2 ++ pkgs/by-name/hi/hifile/update.sh | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 pkgs/by-name/hi/hifile/update.sh diff --git a/pkgs/by-name/hi/hifile/package.nix b/pkgs/by-name/hi/hifile/package.nix index 88a1d420247b..9a565f74f10c 100644 --- a/pkgs/by-name/hi/hifile/package.nix +++ b/pkgs/by-name/hi/hifile/package.nix @@ -28,6 +28,8 @@ appimageTools.wrapType2 rec { --replace-fail 'Exec=HiFile' 'Exec=${pname}' ''; + passthru.updateScript = ./update.sh; + meta = with lib; { description = "Dual-pane graphical file manager for Windows, macOS and Linux"; longDescription = '' diff --git a/pkgs/by-name/hi/hifile/update.sh b/pkgs/by-name/hi/hifile/update.sh new file mode 100755 index 000000000000..95a0ae8440db --- /dev/null +++ b/pkgs/by-name/hi/hifile/update.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env nix-shell +#!nix-shell -I nixpkgs=./. -i bash -p curl common-updater-scripts + +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 '"') + +echo "latest version: $latestVersion" +echo "current version: $currentVersion" + +if [[ "$latestVersion" == "$currentVersion" ]]; then + echo "package is up-to-date" + exit 0 +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" + + From 99dba1471d8ac2528b6c72db9dc46735adbb4f82 Mon Sep 17 00:00:00 2001 From: YMSTNT <21342713+YMSTNT@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:59:51 +0200 Subject: [PATCH 3/3] maintainers/ymstnt: update name --- maintainers/maintainer-list.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 723f7611268b..8dfa94da8f1a 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -23532,7 +23532,7 @@ githubId = 47071325; }; ymstnt = { - name = "YMSTNT"; + name = "ymstnt"; github = "ymstnt"; githubId = 21342713; };