Merge pull request #268551 from farcaller/mastodon

mastodon: easier build patching

authored by Rick van Schijndel and committed by GitHub b805e6d7 08b4f838

+6 -5
+2 -1
pkgs/servers/mastodon/default.nix
··· 6 6 # Allow building a fork or custom version of Mastodon: 7 7 , pname ? "mastodon" 8 8 , version ? srcOverride.version 9 + , patches ? [] 9 10 # src is a package 10 - , srcOverride ? callPackage ./source.nix {} 11 + , srcOverride ? callPackage ./source.nix { inherit patches; } 11 12 , gemset ? ./. + "/gemset.nix" 12 13 , yarnHash ? srcOverride.yarnHash 13 14 }:
+2 -2
pkgs/servers/mastodon/source.nix
··· 1 1 # This file was generated by pkgs.mastodon.updateScript. 2 - { fetchFromGitHub, applyPatches }: 2 + { fetchFromGitHub, applyPatches, patches ? [] }: 3 3 let 4 4 version = "4.2.1"; 5 5 in ··· 11 11 rev = "v${version}"; 12 12 hash = "sha256-SM9WdD+xpxo+gfBft9DARV6QjwNbF2Y9McVrrdDT3fw="; 13 13 }; 14 - patches = []; 14 + patches = patches ++ []; 15 15 }) // { 16 16 inherit version; 17 17 yarnHash = "sha256-qoLesubmSvRsXhKwMEWHHXcpcqRszqcdZgHQqnTpNPE=";
+2 -2
pkgs/servers/mastodon/update.sh
··· 82 82 83 83 cat > source.nix << EOF 84 84 # This file was generated by pkgs.mastodon.updateScript. 85 - { fetchFromGitHub, applyPatches }: 85 + { fetchFromGitHub, applyPatches, patches ? [] }: 86 86 let 87 87 version = "$VERSION"; 88 88 in ··· 94 94 rev = "v\${version}"; 95 95 hash = "$HASH"; 96 96 }; 97 - patches = [$PATCHES]; 97 + patches = patches ++ [$PATCHES]; 98 98 }) // { 99 99 inherit version; 100 100 yarnHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";