about summary refs log tree commit diff
path: root/pkgs/applications/misc/tandoor-recipes
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2023-07-07 23:02:18 -0700
committerTheodore Ni <3806110+tjni@users.noreply.github.com>2023-07-18 16:55:34 -0700
commitaab2097d2d6c3440debb3fa06ae6b7e6643c782f (patch)
treec7d672939237010ecb69a0f0247b72800555e073 /pkgs/applications/misc/tandoor-recipes
parentfab2d4d0b466aaab87a7a71a83b8185f36d403c7 (diff)
tandoor-recipes, tandoor-recipes.frontend: adapt update script to new nix-prefetch-github
We also take the opportunity also to migrate from "sha256" and
"yarnSha256" attributes to "hash" and "yarnHash" attributes.
Diffstat (limited to 'pkgs/applications/misc/tandoor-recipes')
-rw-r--r--pkgs/applications/misc/tandoor-recipes/common.nix4
-rw-r--r--pkgs/applications/misc/tandoor-recipes/frontend.nix2
-rwxr-xr-xpkgs/applications/misc/tandoor-recipes/update.sh7
3 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/applications/misc/tandoor-recipes/common.nix b/pkgs/applications/misc/tandoor-recipes/common.nix
index 6ae3ede11b1a6..7a280285ac5d1 100644
--- a/pkgs/applications/misc/tandoor-recipes/common.nix
+++ b/pkgs/applications/misc/tandoor-recipes/common.nix
@@ -6,10 +6,10 @@ rec {
     owner = "TandoorRecipes";
     repo = "recipes";
     rev = version;
-    sha256 = "sha256-cVrgmRDzuLzl2+4UcrLRdrP6ZFWMkavu9OEogNas2fA=";
+    hash = "sha256-cVrgmRDzuLzl2+4UcrLRdrP6ZFWMkavu9OEogNas2fA=";
   };
 
-  yarnSha256 = "sha256-0u9P/OsoThP8gonrzcnO5zhIboWMI1mTsXHlbt7l9oE=";
+  yarnHash = "sha256-0u9P/OsoThP8gonrzcnO5zhIboWMI1mTsXHlbt7l9oE=";
 
   meta = with lib; {
     homepage = "https://tandoor.dev/";
diff --git a/pkgs/applications/misc/tandoor-recipes/frontend.nix b/pkgs/applications/misc/tandoor-recipes/frontend.nix
index 98da59a1d2996..dd6380449d950 100644
--- a/pkgs/applications/misc/tandoor-recipes/frontend.nix
+++ b/pkgs/applications/misc/tandoor-recipes/frontend.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
 
   yarnOfflineCache = fetchYarnDeps {
     yarnLock = "${common.src}/vue/yarn.lock";
-    sha256 = common.yarnSha256;
+    hash = common.yarnHash;
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/misc/tandoor-recipes/update.sh b/pkgs/applications/misc/tandoor-recipes/update.sh
index 49b6d5f98ae95..63021d76f6b73 100755
--- a/pkgs/applications/misc/tandoor-recipes/update.sh
+++ b/pkgs/applications/misc/tandoor-recipes/update.sh
@@ -23,7 +23,7 @@ fi
 
 package_src="https://raw.githubusercontent.com/TandoorRecipes/recipes/$version"
 
-src_hash=$(nix-prefetch-github TandoorRecipes recipes --rev "${version}" | jq -r .sha256)
+src_hash=$(nix-prefetch-github TandoorRecipes recipes --rev "${version}" | jq -r .hash)
 
 tmpdir=$(mktemp -d)
 trap 'rm -rf "$tmpdir"' EXIT
@@ -34,9 +34,8 @@ yarn_hash=$(prefetch-yarn-deps yarn.lock)
 popd
 
 # Use friendlier hashes
-src_hash=$(nix hash to-sri --type sha256 "$src_hash")
 yarn_hash=$(nix hash to-sri --type sha256 "$yarn_hash")
 
 sed -i -E -e "s#version = \".*\"#version = \"$version\"#" common.nix
-sed -i -E -e "s#sha256 = \".*\"#sha256 = \"$src_hash\"#" common.nix
-sed -i -E -e "s#yarnSha256 = \".*\"#yarnSha256 = \"$yarn_hash\"#" common.nix
+sed -i -E -e "s#hash = \".*\"#hash = \"$src_hash\"#" common.nix
+sed -i -E -e "s#yarnHash = \".*\"#yarnHash = \"$yarn_hash\"#" common.nix