2023-04-30 10:49:28 +00:00
|
|
|
# This file was generated by pkgs.mastodon.updateScript.
|
2024-09-05 16:24:40 +00:00
|
|
|
{ lib, fetchFromGitHub, applyPatches, postPatch ? "", patches ? [ ], gawk
|
|
|
|
, gnused, yarn-berry }:
|
2024-02-26 18:08:26 +00:00
|
|
|
let version = "f571dbe35dbc4876f9ca76b3f6d459839c67a2ef";
|
2024-01-30 22:20:45 +00:00
|
|
|
in (applyPatches {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AgathaSorceress";
|
|
|
|
repo = "mastodon";
|
|
|
|
rev = "${version}";
|
2024-02-26 18:08:26 +00:00
|
|
|
sha256 = "3ZJMiciV0muv5j468hEKJUZGDhKcNCJnDFn6ZqKM1F4=";
|
2024-01-30 22:20:45 +00:00
|
|
|
};
|
2024-09-05 16:24:40 +00:00
|
|
|
inherit patches;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gawk gnused ];
|
|
|
|
postPatch = postPatch
|
|
|
|
+ lib.optionalString (lib.versionAtLeast yarn-berry.version "4.1.0") ''
|
|
|
|
# this is for yarn starting with 4.1.0 because fuck everything amirite
|
|
|
|
# see also https://github.com/yarnpkg/berry/pull/6083
|
|
|
|
echo "patching cachekey in yarn.lock"
|
|
|
|
cacheKey="$(awk -e '/cacheKey:/ {print $2}' yarn.lock)"
|
|
|
|
sed -i -Ee 's|^ checksum: ([^/]*)$| checksum: '$cacheKey'/\1|g;' yarn.lock
|
|
|
|
'';
|
|
|
|
|
2024-01-30 22:20:45 +00:00
|
|
|
}) // {
|
2023-12-17 20:05:44 +00:00
|
|
|
inherit version;
|
2024-09-05 16:24:40 +00:00
|
|
|
yarnHash = "sha256-wdEunwUsV/IaJvNq+YIqRXNKLBrqPeeL5Ig+33dT/AY=";
|
2023-04-30 10:49:28 +00:00
|
|
|
}
|