Unverified Commit 3816cc10 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

hifile: 0.9.9.19 -> 0.9.9.23, make overridable (#392759)

parents 01d907ea 856352f4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2,15 +2,16 @@
  lib,
  appimageTools,
  fetchurl,
  version ? "0.9.9.23",
  hash ? "sha256-BTHiLTgLqtUCuxnpPeI5nwe8tYMp+uxFKm01qHnC8A0=",
}:

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 {
+2 −8
Original line number Diff line number Diff line
#!/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 '<h1>All downloads</h1>' | grep -m 1 '<li>.*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