summary refs log tree commit diff
path: root/pkgs/servers/memos
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2023-07-07 23:03:01 -0700
committerTheodore Ni <3806110+tjni@users.noreply.github.com>2023-07-18 18:16:16 -0700
commit412b28f7b2b45370d393c55ec27ce8e7bc780083 (patch)
tree2376d1889e64a6331229c378b9876053fba9dc39 /pkgs/servers/memos
parent68d6f72e5977ef9c379af35d45bae4034ab8f8a8 (diff)
memos: adapt update script to new nix-prefetch-github
Diffstat (limited to 'pkgs/servers/memos')
-rw-r--r--pkgs/servers/memos/default.nix4
-rwxr-xr-xpkgs/servers/memos/update.sh6
2 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/servers/memos/default.nix b/pkgs/servers/memos/default.nix
index dd7366e8a64a0..191db93583299 100644
--- a/pkgs/servers/memos/default.nix
+++ b/pkgs/servers/memos/default.nix
@@ -6,7 +6,7 @@ let
     owner = "usememos";
     repo = "memos";
     rev = "v${version}";
-    sha256 = "lcOZg5mlFPp04ZCm5GDhQfSwE2ahSmGhmdAw+pygK0A=";
+    hash = "sha256-lcOZg5mlFPp04ZCm5GDhQfSwE2ahSmGhmdAw+pygK0A=";
   };
 
   frontend = buildNpmPackage {
@@ -32,7 +32,7 @@ buildGoModule rec {
 
   # check will unable to access network in sandbox
   doCheck = false;
-  vendorSha256 = "sha256-UM/xeRvfvlq+jGzWpc3EU5GJ6Dt7RmTbSt9h3da6f8w=";
+  vendorHash = "sha256-UM/xeRvfvlq+jGzWpc3EU5GJ6Dt7RmTbSt9h3da6f8w=";
 
   # Inject frontend assets into go embed
   prePatch = ''
diff --git a/pkgs/servers/memos/update.sh b/pkgs/servers/memos/update.sh
index f925f75bcd70e..cc600e2f0281e 100755
--- a/pkgs/servers/memos/update.sh
+++ b/pkgs/servers/memos/update.sh
@@ -34,12 +34,12 @@ sed -e "s/version =.*;/version = \"$TARGET_VERSION\";/g" \
 
 # update hash
 SRC_HASH="$(nix-instantiate --eval -A memos.src.outputHash | tr -d '"')"
-NEW_HASH="$(nix-prefetch-github usememos memos --rev v$TARGET_VERSION | jq -r .sha256)"
+NEW_HASH="$(nix-prefetch-github usememos memos --rev v$TARGET_VERSION | jq -r .hash)"
 
 replaceHash "$SRC_HASH" "$NEW_HASH"
 
-GO_HASH="$(nix-instantiate --eval -A memos.vendorSha256 | tr -d '"')"
-EMPTY_HASH="$(nix-instantiate --eval -A lib.fakeSha256 | tr -d '"')"
+GO_HASH="$(nix-instantiate --eval -A memos.vendorHash | tr -d '"')"
+EMPTY_HASH="$(nix-instantiate --eval -A lib.fakeHash | tr -d '"')"
 replaceHash "$GO_HASH" "$EMPTY_HASH"
 replaceHash "$EMPTY_HASH" "$(extractVendorHash "$GO_HASH")"