mastodon: easier build patching

This commit is contained in:
Vladimir Pouzanov 2023-11-19 18:35:55 +00:00
parent 2cc73b2b7c
commit 1d47cfbf65
3 changed files with 6 additions and 5 deletions
pkgs/servers/mastodon

View file

@ -6,8 +6,9 @@
# Allow building a fork or custom version of Mastodon: # Allow building a fork or custom version of Mastodon:
, pname ? "mastodon" , pname ? "mastodon"
, version ? srcOverride.version , version ? srcOverride.version
, patches ? []
# src is a package # src is a package
, srcOverride ? callPackage ./source.nix {} , srcOverride ? callPackage ./source.nix { inherit patches; }
, gemset ? ./. + "/gemset.nix" , gemset ? ./. + "/gemset.nix"
, yarnHash ? srcOverride.yarnHash , yarnHash ? srcOverride.yarnHash
}: }:

View file

@ -1,5 +1,5 @@
# This file was generated by pkgs.mastodon.updateScript. # This file was generated by pkgs.mastodon.updateScript.
{ fetchFromGitHub, applyPatches }: { fetchFromGitHub, applyPatches, patches ? [] }:
let let
version = "4.2.1"; version = "4.2.1";
in in
@ -11,7 +11,7 @@ in
rev = "v${version}"; rev = "v${version}";
hash = "sha256-SM9WdD+xpxo+gfBft9DARV6QjwNbF2Y9McVrrdDT3fw="; hash = "sha256-SM9WdD+xpxo+gfBft9DARV6QjwNbF2Y9McVrrdDT3fw=";
}; };
patches = []; patches = patches ++ [];
}) // { }) // {
inherit version; inherit version;
yarnHash = "sha256-qoLesubmSvRsXhKwMEWHHXcpcqRszqcdZgHQqnTpNPE="; yarnHash = "sha256-qoLesubmSvRsXhKwMEWHHXcpcqRszqcdZgHQqnTpNPE=";

View file

@ -82,7 +82,7 @@ HASH=$(echo "$JSON" | jq -r .hash)
cat > source.nix << EOF cat > source.nix << EOF
# This file was generated by pkgs.mastodon.updateScript. # This file was generated by pkgs.mastodon.updateScript.
{ fetchFromGitHub, applyPatches }: { fetchFromGitHub, applyPatches, patches ? [] }:
let let
version = "$VERSION"; version = "$VERSION";
in in
@ -94,7 +94,7 @@ in
rev = "v\${version}"; rev = "v\${version}";
hash = "$HASH"; hash = "$HASH";
}; };
patches = [$PATCHES]; patches = patches ++ [$PATCHES];
}) // { }) // {
inherit version; inherit version;
yarnHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; yarnHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";