mastodont

This commit is contained in:
Agatha Lovelace 2025-05-21 00:42:38 +02:00
parent 7034c44fdb
commit 376144b298
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
4 changed files with 41 additions and 33 deletions

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
services.mastodon = {
enable = true;
@ -26,6 +27,8 @@
};
};
systemd.services.mastodon-web.path = [ pkgs.imagemagick ];
users.groups.mastodon.members = [ config.services.nginx.user ];
services.elasticsearch = {

View File

@ -484,20 +484,20 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0511idr8xps9625nh3kxr68sdy6l3xy2kcz7r57g47fxb1v18jj3";
sha256 = "1dsf9gjc2cj79vrnz2vgq573biqjw7ad4b0idm05xg6rb3y9gq4y";
type = "gem";
};
version = "0.5.9.6";
version = "0.5.9.8";
};
charlock_holmes = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0hybw8jw9ryvz5zrki3gc9r88jqy373m6v46ynxsdzv1ysiyr40p";
sha256 = "0cym7a0mrgf8wr27x07ka7fsjz3l7l9qiiyqra34f5k5ghira0c0";
type = "gem";
};
version = "0.7.7";
version = "0.7.8";
};
chewy = {
dependencies = ["activesupport" "elasticsearch" "elasticsearch-dsl"];
@ -505,10 +505,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ip56hy2k1g908cm1ccyrbv16n31jg2qkc5s021bqxajsscjiy75";
sha256 = "0kgqj7hcs09ln7i1rds1xify08rzjk02ryzvjdvnllg1fkh3vm2b";
type = "gem";
};
version = "7.4.0";
version = "7.6.0";
};
chunky_png = {
groups = ["default"];
@ -1843,15 +1843,25 @@
};
version = "0.4.0";
};
net-ssh = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0yx0pb5fmziz92bw8qzbh8vf20lr56nd3s6q8h0gsgr307lki687";
type = "gem";
};
version = "7.1.0";
};
nio4r = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0w9978zwjf1qhy3amkivab0f9syz6a7k0xgydjidaf7xc831d78f";
sha256 = "017nbw87dpr4wyk81cgj8kxkxqgsgblrkxnmmadc77cg9gflrfal";
type = "gem";
};
version = "2.5.9";
version = "2.7.3";
};
nokogiri = {
dependencies = ["mini_portile2" "racc"];
@ -1859,10 +1869,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "173zavvxlwyi48lfskk48wcrdbkvjlhjhvy4jpcrfx72rpjjx4k8";
sha256 = "1vz1ychq2fhfqjgqdrx8bqkaxg5dzcgwnah00m57ydylczfy8pwk";
type = "gem";
};
version = "1.16.2";
version = "1.16.6";
};
nsa = {
dependencies = ["activesupport" "concurrent-ruby" "sidekiq" "statsd-ruby"];
@ -3374,10 +3384,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1gir0if4nryl1jhwi28669gjwhxb7gzrm1fcc8xzsch3bnbi47jn";
sha256 = "08cfb35232p9s1r4jqv8wacv38vxh699mgbr9y03ga89gx9lipqp";
type = "gem";
};
version = "2.6.12";
version = "2.6.16";
};
}

View File

@ -1,27 +1,22 @@
# This file was generated by pkgs.mastodon.updateScript.
{ lib, fetchFromGitHub, applyPatches, postPatch ? "", patches ? [ ], gawk
, gnused, yarn-berry }:
let version = "f571dbe35dbc4876f9ca76b3f6d459839c67a2ef";
in (applyPatches {
{
fetchFromGitHub,
applyPatches,
patches ? [ ],
}:
let
version = "0529f742ecbcf902ffa4ab9283579f72eae78361";
in
(applyPatches {
src = fetchFromGitHub {
owner = "AgathaSorceress";
repo = "mastodon";
rev = "${version}";
sha256 = "3ZJMiciV0muv5j468hEKJUZGDhKcNCJnDFn6ZqKM1F4=";
hash = "sha256-rAHCQHVv4tZqbRhx43T3YEnsR/THR6gzzjv5yUO4GIU=";
};
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
'';
}) // {
patches = patches ++ [ ];
})
// {
inherit version;
yarnHash = "sha256-wdEunwUsV/IaJvNq+YIqRXNKLBrqPeeL5Ig+33dT/AY=";
}

View File

@ -66,7 +66,7 @@ trap cleanup EXIT
echo "Fetching source code $REVISION"
JSON=$(nix-prefetch-github "$OWNER" "$REPO" --rev "$REVISION" 2> $WORK_DIR/nix-prefetch-git.out)
HASH=$(echo "$JSON" | jq -r .sha256)
HASH=$(echo "$JSON" | jq -r .hash)
cat > source.nix << EOF
# This file was generated by pkgs.mastodon.updateScript.
@ -80,7 +80,7 @@ in
owner = "$OWNER";
repo = "$REPO";
rev = "\${version}";
sha256 = "$HASH";
hash = "$HASH";
};
patches = patches ++ [$PATCHES];
}) // {