summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-28 22:29:04 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-28 22:29:04 +0200
commit300a6fda7724be412f55c286cd209bb6b0301ac3 (patch)
treeece9ddc6586ad92bf0efe116f7d7191095cdb3f6
parent591d32cdb14b34e4a4bf5b5bbff3ddc96aadbfb0 (diff)
downloadnixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar.gz
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar.bz2
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar.lz
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar.xz
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.tar.zst
nixpkgs-300a6fda7724be412f55c286cd209bb6b0301ac3.zip
mastodon: apply suggestion
-rw-r--r--pkgs/servers/mastodon/source.nix7
-rwxr-xr-xpkgs/servers/mastodon/update.sh7
2 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/servers/mastodon/source.nix b/pkgs/servers/mastodon/source.nix
index 5ab10795882..995b58476d7 100644
--- a/pkgs/servers/mastodon/source.nix
+++ b/pkgs/servers/mastodon/source.nix
@@ -1,11 +1,14 @@
 # This file was generated by pkgs.mastodon.updateScript.
 { fetchFromGitHub, applyPatches }:
-applyPatches {
+let
   version = "4.1.9";
+in
+applyPatches {
+  inherit version;
   src = fetchFromGitHub {
     owner = "mastodon";
     repo = "mastodon";
-    rev = "v4.1.9";
+    rev = "${version}";
     hash = "sha256-xpE/mg2AeioW6NThUjLS+SBxGavG4w1xtp3BOMADfYo=";
   };
   patches = [];
diff --git a/pkgs/servers/mastodon/update.sh b/pkgs/servers/mastodon/update.sh
index b30aee1ec06..6955f9e6180 100755
--- a/pkgs/servers/mastodon/update.sh
+++ b/pkgs/servers/mastodon/update.sh
@@ -82,12 +82,15 @@ HASH=$(echo "$JSON" | jq -r .hash)
 cat > source.nix << EOF
 # This file was generated by pkgs.mastodon.updateScript.
 { fetchFromGitHub, applyPatches }:
-applyPatches {
+let
   version = "$VERSION";
+in
+applyPatches {
+  inherit version;
   src = fetchFromGitHub {
     owner = "$OWNER";
     repo = "$REPO";
-    rev = "$REVISION";
+    rev = "\${version}";
     hash = "$HASH";
   };
   patches = [$PATCHES];