update mastodon

This commit is contained in:
Vivian 2025-05-29 13:53:41 +02:00
parent 2fe6723d1d
commit 82f22fb7e7
9 changed files with 164 additions and 176 deletions

View file

@ -5,9 +5,6 @@ let
base_url = "https://chat.meowy.tech";
server_name = "meowy.tech";
};
# "org.matrix.msc3575.proxy" = {
# "url" = "https://sliding-chat.meowy.tech";
# };
};
serverConfig."m.server" = "chat.meowy.tech:443";
mkWellKnown = data: ''
@ -18,7 +15,7 @@ let
website = builtins.fetchGit {
url = "https://git.0x76.dev/v/0x76.dev.git";
rev = "740738370596f2ac89bac83082b638fcc827dc7c";
rev = "27baf03cdcd41a9ea4bd591071baf826f6950233";
};
in
{
@ -98,16 +95,6 @@ in
locations."/".proxyWebsockets = true;
};
"blog.xirion.net" = {
enableACME = true;
forceSSL = true;
locations."/".extraConfig = ''
add_header Content-Type 'text/html; charset=UTF-8';
return 200 '<h1>Under Construction</h1>';
'';
};
# Meow
"meowy.tech" = {
enableACME = true;
@ -129,7 +116,6 @@ in
return 303 https://element.chat.meowy.tech;
'';
"= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
# "= /_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass = "http://synapse.olympus:8009";
"/_matrix".proxyPass = "http://synapse.olympus:8008";
"/_synapse/client".proxyPass = "http://synapse.olympus:8008";
"/_synapse/admin" = {
@ -138,9 +124,7 @@ in
allow 127.0.0.1;
allow 10.42.42.0/23;
allow 192.168.0.0/23;
allow 80.60.83.220;
allow 83.128.154.23;
allow 62.45.26.248;
allow 62.45.180.183;
allow 195.85.167.32/29;
deny all;
'';
@ -148,11 +132,6 @@ in
};
};
};
# "sliding-chat.meowy.tech" = {
# enableACME = true;
# forceSSL = true;
# locations."/".proxyPass = "http://synapse.olympus:8009";
# };
"element.chat.meowy.tech" = {
enableACME = true;
forceSSL = true;
@ -165,31 +144,19 @@ in
};
};
};
"es.0x76.dev" = {
"cinny.chat.meowy.tech" = {
enableACME = true;
forceSSL = true;
locations."/".extraConfig = ''
return 303 https://bear.0x76.dev;
'';
};
"bear.0x76.dev" = {
enableACME = true;
forceSSL = true;
root = inputs.essentials.packages.${pkgs.system}.default;
};
# "cinny.chat.meowy.tech" = {
# enableACME = true;
# forceSSL = true;
# root = pkgs.cinny.override {
# conf = {
# defaultHomeserver = 0;
# allowCustomHomeservers = false;
# homeserverList = [ "chat.meowy.tech" ];
# };
# };
root = pkgs.cinny.override {
conf = {
defaultHomeserver = 0;
allowCustomHomeservers = false;
homeserverList = [ "chat.meowy.tech" ];
};
};
};
# };
"admin.chat.meowy.tech" = {
enableACME = true;
forceSSL = true;

View file

@ -1,6 +1,6 @@
{ stdenv, stdenvNoCC, nodejs-slim, bundlerEnv
, yarn-berry, callPackage, ruby_3_4, writeShellScript
, brotli, cacert
{ stdenv, nodejs-slim, bundlerEnv
, yarn-berry, callPackage, ruby, writeShellScript
, brotli
}:
let
@ -18,40 +18,16 @@ let
mastodonGems = bundlerEnv {
name = "glitch-soc-gems-${version}"; # bundlerEnv breaks when pname is set instead
inherit version;
ruby = ruby_3_4;
ruby = ruby;
gemset = ./gemset.nix;
gemdir = src;
};
# fetches JS dependencies via yarn based on the lockfile in the source
mastodonYarnDeps = stdenvNoCC.mkDerivation {
pname = "glitch-soc-yarn-deps";
inherit version src;
nativeBuildInputs = [ yarn-berry cacert ];
dontInstall = true;
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
mkdir -p $out
export HOME=$(mktemp -d)
echo $HOME
export YARN_ENABLE_TELEMETRY=0
export YARN_COMPRESSION_LEVEL=0
cache="$(yarn config get cacheFolder)"
yarn install --immutable --mode skip-build
cp -r $cache/* $out/
'';
outputHashAlgo = "sha256";
outputHash = versionData.yarnHash;
outputHashMode = "recursive";
mastodonYarnDeps = yarn-berry.fetchYarnBerryDeps {
inherit src;
hash = versionData.yarnHash;
missingHashes = ./missing-hashes.json;
};
# builds the node modules for mastodon using the previously fetched yarn deps
@ -60,8 +36,16 @@ let
inherit version src;
yarnOfflineCache = mastodonYarnDeps;
missingHashes = ./missing-hashes.json;
nativeBuildInputs = [ nodejs-slim yarn-berry brotli mastodonGems mastodonGems.wrappedRuby ];
nativeBuildInputs = [
nodejs-slim
yarn-berry
yarn-berry.yarnBerryConfigHook
brotli
mastodonGems
mastodonGems.wrappedRuby
];
RAILS_ENV = "production";
NODE_ENV = "production";
@ -80,42 +64,28 @@ let
buildPhase = ''
runHook preBuild
export HOME=$PWD
# This option is needed for openssl-3 compatibility
# Otherwise we encounter this upstream issue: https://github.com/mastodon/mastodon/issues/17924
export NODE_OPTIONS=--openssl-legacy-provider
export SECRET_KEY_BASE_DUMMY=1
export YARN_ENABLE_TELEMETRY=0
mkdir -p ~/.yarn/berry
ln -sf $yarnOfflineCache ~/.yarn/berry/cache
patchShebangs bin
# --inline-builds prints build logs inline so they can be inspected with nix log
yarn install --immutable --immutable-cache --inline-builds
bundle exec rails assets:precompile
patchShebangs ~/bin
patchShebangs ~/node_modules
rm -rf node_modules/.cache
# skip running yarn install
rm -rf ~/bin/yarn
# Remove workspace "package" as it contains broken symlinks
# See https://github.com/NixOS/nixpkgs/issues/380366
rm -rf node_modules/@mastodon
OTP_SECRET=precompile_placeholder \
SECRET_KEY_BASE=precompile_placeholder \
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=precompile_placeholder \
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=precompile_placeholder \
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=precompile_placeholder \
rails assets:precompile
yarn cache clean
rm -rf ~/node_modules/.cache
# Remove execute permissions
find public/assets -type f ! -perm 0555 \
-exec chmod 0444 {} ';'
# Create missing static gzip and brotli files
gzip --best --keep ~/public/assets/500.html
gzip --best --keep ~/public/packs/report.html
find ~/public/assets -maxdepth 1 -type f -name '.*.json' \
-exec gzip --best --keep --force {} ';'
brotli --best --keep ~/public/packs/report.html
find ~/public/assets -type f -regextype posix-extended -iregex '.*\.(css|js|json|html)' \
find public/assets -type f -regextype posix-extended -iregex '.*\.(css|html|js|json|svg)' \
-exec gzip --best --keep --force {} ';' \
-exec brotli --best --keep {} ';'
gzip --best --keep public/packs/report.html
brotli --best --keep public/packs/report.html
runHook postBuild
'';

View file

@ -365,10 +365,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0mdgj9yw1hmx3xh2qxyjc31y8igmxzd9h0c245ay2zkz76pl4k5c";
sha256 = "0s9gj7l460vi9h18i5rx8lip23l57c7yy8pmkq9msg60rihgilwj";
type = "gem";
};
version = "1.18.4";
version = "1.18.5";
};
brakeman = {
dependencies = ["racc"];
@ -606,10 +606,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1iz1hv2b1z7509dxvxdwzay1hhs24glxls5ldbyh688zxkcdca1j";
sha256 = "1jxzgg3yccp3gjncl5ih0y13dcappmy0y8pq85wgjj0yx5fh0ixy";
type = "gem";
};
version = "2.2.0";
version = "2.2.1";
};
database_cleaner-core = {
groups = ["default" "test"];
@ -1637,20 +1637,20 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1bv08jvx1g9ifjdyrp5hgalxkv7qxwfmfx0ba43ncrbfda7182b1";
sha256 = "0mjyxl7c0xzyqdqa8r45hqg7jcw2prp3hkp39mdf223g4hfgdsyw";
type = "gem";
};
version = "3.6.2";
version = "3.7.0";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0m3gn6l6c2gm9angaghwzrhbks8pap5d5vljyh3vqi72av81xppv";
sha256 = "1n9vlqa5bkaj8wald4vhsm5yav4nd4azxi1aplwhimihrs5pnwqf";
type = "gem";
};
version = "3.2025.0408";
version = "3.2025.0507";
};
mini_mime = {
groups = ["default" "development" "test"];
@ -2388,10 +2388,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0vqcw3iwby3yc6avs1vb3gfd0vcp2v7q310665dvxfswmcf4xm31";
sha256 = "1543ap9w3ydhx39ljcd675cdz9cr948x9mp00ab8qvq6118wv9xz";
type = "gem";
};
version = "6.0.1";
version = "6.0.2";
};
puma = {
dependencies = ["nio4r"];
@ -2440,10 +2440,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1yzhcwvfkrlb8l79w24yjclv636jn6rnznp95shmssk934bi1vnc";
sha256 = "0lzd5skqw31k3cg3cvgbqfj42rm4llym2bwb74l7y224ldk5s6bn";
type = "gem";
};
version = "2.2.13";
version = "2.2.14";
};
rack-attack = {
dependencies = ["rack"];
@ -2880,10 +2880,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ihqdpa3v0rr127hwks4yc2hy36qr3b4xgfhyr0bn4889ps6lrg0";
sha256 = "0zg97d12pwqk12iwphs9glkmlibklpis2ga5rvd82g826n37rnka";
type = "gem";
};
version = "1.75.4";
version = "1.75.5";
};
rubocop-ast = {
dependencies = ["parser" "prism"];
@ -3074,10 +3074,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1s80s7mgpwpfj4df2f43f5im37ks884xkbcxd9fxpk93xs7dicnx";
sha256 = "1zlamvlgszczfx2f2v1b34q0lka15cqj46krwb4ymgl6nlkxznr0";
type = "gem";
};
version = "4.31.0";
version = "4.32.0";
};
semantic_range = {
groups = ["default"];

View file

@ -0,0 +1,75 @@
{
"@esbuild/aix-ppc64@npm:0.25.2": "e25252d47d27d5e15a09ba7e7e906fe35d90a363e1eec7bc1e054c066bea6f89364139385008f78e8b4523ebaecb1f7a678213c8fcc2cd0309d539bbc455fd05",
"@esbuild/android-arm64@npm:0.25.2": "b387ab30ec70902c81ca1231a7838ccc993ad8dff9561a5ec7d7d4e5f03426153d42e496985a02539bce55f6d1048156f36e24a29f61fa5fd8e0587f62696703",
"@esbuild/android-arm@npm:0.25.2": "8e7efb22407ad9a985ff5a09dc0d2b895126c6ccca470db671ca0a3e3026f79666af20ce5d296311f5d056e95ca71e743feeae526f94dcaacb5a6969f9963283",
"@esbuild/android-x64@npm:0.25.2": "66256eee6168c2f903c45c82863f1377f525dc7de0fc902fca412a44d0abbb8a25761fb9e10c8663b25b0f816d86b7e353d2b77ab39eae95234333f9d233ddc4",
"@esbuild/darwin-arm64@npm:0.25.2": "36a568a779000133d077e2272181232f52939c3e0b0b986ad3f3fd6ab29628c148e88cd857f6de41a16e22e6a252bb16680f91c00c7d813690fa9bc060f58386",
"@esbuild/darwin-x64@npm:0.25.2": "b761a20f8db7bf0499f6cba51c72104e733d9186d6f34a7f5e4590c02ecc2f9b84cd02c4e7bd3dade4156b7f92015cdbddc516dd1e4859233e3155cb0fecda58",
"@esbuild/freebsd-arm64@npm:0.25.2": "8f869d6200dba388ac4c008c7a5b6522f44797370a12f94fd19e37b6cd76bdbdf48d0fa893b5ce200a538a151281e9f71e985f82ec8b8c96f16075e45266c718",
"@esbuild/freebsd-x64@npm:0.25.2": "6cdfb6c6d6f6ead324a9ee75ab1068305672207cf1d3189bcf5599ec158e0eb07d74ff63597e389777163b4399da1cc6164b918a7ea9e798e7fd45eee6aad9bb",
"@esbuild/linux-arm64@npm:0.25.2": "a0d51ec6e91e97461916eb6c25b12a8ea6b58ec2f3d91199c0c3f02ec569e98ff1389700250d4664d8394d3d5b5a051d695b34bfe77ab4a12985dfc18f315b73",
"@esbuild/linux-arm@npm:0.25.2": "5a4cf4045a2a5949dc8875dbad9a82fde7333d3f59b66d8cb614b34b76a7fb715a8d74e41f0788104bcef0436108ca548d71a543f582073e0458e20370dbb802",
"@esbuild/linux-ia32@npm:0.25.2": "535c1755ed95a47b05b865361d2efbef3490f05815743c0d2372f55a2e14f0cc1d5ed6e5dd6f91c7aea871ea2f64cea021eea6e714027148489c54edc6e2b19f",
"@esbuild/linux-loong64@npm:0.25.2": "8ff82f5cdd7a9490dfb3be64c990841d2a8e1a0ce83d76fa8d5e9b0ba7aa91ca725f338ff43b4d69a18744905f1730adf87a7f8359ae839030663e0bbe2807e2",
"@esbuild/linux-mips64el@npm:0.25.2": "382520bf655329d04f65e041f9bf774d11a2232bdf5125934732db915c179b1172ec3429722d9f02f46ee5bad7b70372872bfd003d7c1cc5ec95b7ca6ec8a983",
"@esbuild/linux-ppc64@npm:0.25.2": "c5736195867e9c441cabd0a2cbaa62f91c4e4963ed7490018d09a932d549e1d281411ddf9dbd4a4b68f0c0298c1321ba15fd4e493cdc3dea3e14b7a6207b12f8",
"@esbuild/linux-riscv64@npm:0.25.2": "c72879775daded232fb2e36a6fe26058ec1ccd1f5dd6a76b4e8da700c6dd20cb15b684bce34569cadd41f25a0a53bd2037994279856bb3148f8c16055adcaf68",
"@esbuild/linux-s390x@npm:0.25.2": "d8810561312c4c7705f3c580ef8cd38e2768feb19ebf2899595a227f59dfb6ca35182f8ad7ca65d503cc5d9c688fe742002243387aa09b98b8c32aabc522ac4e",
"@esbuild/linux-x64@npm:0.25.2": "32c8a5f7d0640655ebf60f379ee2b037fe83f3f0edad911a9098505e6ac589c5f2873ff441017183626a19d334e3bb59f58411f2d5474eb7222917575593abea",
"@esbuild/netbsd-arm64@npm:0.25.2": "0b7f77ec46163feac839b17b94e7db87edf61441bd9a67115722bf72781021c8220576a2e2c70bbca45b89a1e69a6b132f5489b59e84241b197272c1ee080304",
"@esbuild/netbsd-x64@npm:0.25.2": "6d6686f5d2eb79b042bd4f38dc95e73a8e290a057be1b6afc42867830c9cf2313600b4fd53287f2f418c9f454bf5df02154b16dcfbfc33a6eb2ce9722a4eecc1",
"@esbuild/openbsd-arm64@npm:0.25.2": "8a08c16440c6389623bbacb717412635aff61a1552c917e707d71da1dc92c618eea9a9aa1606a4a4f322216f100ede658523baec2e82b1f11b4efd523d491173",
"@esbuild/openbsd-x64@npm:0.25.2": "43baf3248bb460e169cb1b5f26f5eb720088fa0d467c77f4f72c6cfa8e6d7b7794c52ed5e4a9a2113db53313c5fec86e352c94939abf601ab22d5e6e9addc4e5",
"@esbuild/sunos-x64@npm:0.25.2": "0babbb99d3bc3ed818b2b01fbf65ebbf5930defb850e5a5a94a3ba5fc7bc2463d561c07af0d3ac6d6d0197c86682750ceb47abf7d293dd3222b1bd33da9f8aa5",
"@esbuild/win32-arm64@npm:0.25.2": "205aab6fc7b0ca7ee992cd24d73550110c1f79dc2ca724384bb52aa95111248df022375cd648314bd7eeb42083d576c55572f3d39d4ddcd82fc7372f1e7688b0",
"@esbuild/win32-ia32@npm:0.25.2": "aa38c0e082e3111e84929a64638cce1c3e1114218726e41c99bf239f2c05be94fb6fe1083366aa342bbd8e75fd449a6a3bcae9b6b3b84066a3a3882dcbaa0090",
"@esbuild/win32-x64@npm:0.25.2": "2f2d147c610a3c3ab0f0f97132e4421464d3d38b835d989e8c324b7397e2592cd05485ec1998ae352f06d3191dd1d71c24f94f63f7c70cd8ea8a4c85441502a9",
"@parcel/watcher-android-arm64@npm:2.5.0": "2d5d66f4e904546cff638d0b27a871d695dda1205e32902f917723dc1b09a5edef4ed8064fc5c85192a4e5e5b531eb4a2d3b349015ff6170c8228e3c098d5376",
"@parcel/watcher-darwin-arm64@npm:2.5.0": "bbdbaeb31ccea5ec172adab2bb2b1a5f4b2e18ed31054d7f6b1db718238f5880e3b8bc8ac1b55c00048c7a1973e75c0c86fa04c02679f99c0bb355145c8b685b",
"@parcel/watcher-darwin-x64@npm:2.5.0": "85089bf1c0f7fb0b4007d54f97e890bf2173d1a11166e9e601b9afe6e260e9cff2eed150ea80f51aae358436376c36af75a70523f53711f16a773987422cf93b",
"@parcel/watcher-freebsd-x64@npm:2.5.0": "1355a42a68beb177f9d15b8e379b63dd2e633494e0f09a7e28a778c6a5eb082206d6690e3776e79da5263ecc8791be047c33943cfd2d09019f8f545800ed583b",
"@parcel/watcher-linux-arm-glibc@npm:2.5.0": "3c78f9ab9e9d52745f3d44200e290a64843a9346bbe6628485cc6d777a1d329fd0345a5c919daad05fb436fda59143ec2f1810789c8e594a51c7f5d8099ac682",
"@parcel/watcher-linux-arm-musl@npm:2.5.0": "80f7f97115e4d98d95735149c6b210ed1902dbf0020d20b245801272a1459f3cef75307c124c1a947450dff9d7d62440ad85e46a98e06523523170fdffab5bf1",
"@parcel/watcher-linux-arm64-glibc@npm:2.5.0": "f82fb66b301754f9bf67c7abfe41b18c987ed47f8de05750395ac7453a2c396104d44090b20450d90d5af3e9de54e06aed1520e8401343b824f3c19747cf0aa1",
"@parcel/watcher-linux-arm64-musl@npm:2.5.0": "914ebc3387884a8948594fa91520726ef9a7dfbbf7663fd00e7c0de13e08a4e7a525c9132b5439b64b9deb9b62fdfb8c5e02148013cd2383d171334ea76641c0",
"@parcel/watcher-linux-x64-glibc@npm:2.5.0": "5db33f6a134d20e8bfd8bed6d13107e7d30947e832a4f677136abee8e1c2855ea19629ccf220e95056dbff753b55fe2b698dd936f31e492b095cc6434451e9d4",
"@parcel/watcher-linux-x64-musl@npm:2.5.0": "dbf3f903c4eb6014660f4c3c0d44dcef0e21ee16908288ad0149d6c1a5c9fd7f0405d8d0e91a2493fbeef83df5784bd43f7d1426a0150e00a415b6c0eab38c98",
"@parcel/watcher-win32-arm64@npm:2.5.0": "cff6516b1dad597ca1ec8c385cf8251f5050b32ab46fc15360f2eff3a40b61b7107eee56df73764007d9bd6b826960d2f3589c8e0ce270bb5b2a292313bd7a1b",
"@parcel/watcher-win32-ia32@npm:2.5.0": "ad9d2c9ae3a7031105fc90418050a910d4b679ead36e5fdcbb1b3e4afbaf56aec6566863e3a374c645c82f57073d8f643183f19c67c8c48b0aa62224c05fdb9d",
"@parcel/watcher-win32-x64@npm:2.5.0": "aa9660bdb2fe70de5163f9f8419e263711fd30612244fb7feb58fce49a653b88ac0e1e29646fb1fc76b86fd8215e62eea5ded0616725987dfca5372041925bd2",
"@rollup/rollup-android-arm-eabi@npm:4.40.2": "cb502d6933de94860f9d49a4b4e849a206d10d9b1a424847cb2545667f8937ac891a37854e2934992b39521dc8b8daa2ec6b683da6bb47ef893ab24f9424c887",
"@rollup/rollup-android-arm64@npm:4.40.2": "42e04ae6605f8a31cc7daf484f9104e6d2174a99e39d829c24d77780cd257a6dab67f5c6a38e84e5a967ad4a64a042f1e6dfbe75444aa03517e83d8436179726",
"@rollup/rollup-darwin-arm64@npm:4.40.2": "8e641fd8a888504c516e76e525a7fcc099d363a82ce8569a1a5bb2fdcf632fa262e1a73b47932a922d132e0c46fab6ba04490053f63e6e4fb30c313a499b139f",
"@rollup/rollup-darwin-x64@npm:4.40.2": "9dca62986fa2afef8c5addcb1eb4ee08afbd3aa03ece3c5372a82a785af67ae441b9782dd542018fa5bb39a6de34ea53f10795d6f6f801a0469ce7979c52c729",
"@rollup/rollup-freebsd-arm64@npm:4.40.2": "f21c73712c4cb74a797998e8adfa83bb7ff0d6cc3e7353eae5b213b4bb3f9f481e025d37dd67aeee7488b9fc9ecd0bc8f85a61469cfa6592ed9292d14ba868d0",
"@rollup/rollup-freebsd-x64@npm:4.40.2": "9f8b6abb5be2527e6cffdaf0dd95a8bbb6f4aa5599be2bfe919e8252f57558f0a06b66748d29cb1e42d0b65e1d2ef0ec2d6a429d3c8a1a85352269d88ffbda17",
"@rollup/rollup-linux-arm-gnueabihf@npm:4.40.2": "fc205b61c54ddaac7bb45768c3b4bbd79632df3f7bbe65532f5453d54e1a31c1d3f1e4508a00323cf0656d6c5a69f0793989d11fd0805dc2621053c8c6fbcaa3",
"@rollup/rollup-linux-arm-musleabihf@npm:4.40.2": "14fde6bac72d734462b9c2fa3594934454069d01422fe12e650ae6fc9e998daac3d43d1726a0aa040cac9d4de43cf75ca34d82932e0a2c3f564f49f0b6fba4af",
"@rollup/rollup-linux-arm64-gnu@npm:4.40.2": "1a7c361022d74025076d322cdeb741923f1d3e0d5e1a12fd4dcc678a7c3dc8a07002f6ec4d537b6f089c75b90273cd700580b9ac1b1d45fa68908eadb524f1c7",
"@rollup/rollup-linux-arm64-musl@npm:4.40.2": "2fbf7f6f28bfe5148b1a82b04569574bc865b65f6e8f874aa8b175ad3c3ee9197a9a22bc3693153f0d55ff2bd78938b15e162cafa4b77756d1933036b0520bf0",
"@rollup/rollup-linux-loongarch64-gnu@npm:4.40.2": "ae77d9e7a797868fbd6887b8b4a8a26bcd96ea632022ddc47c570d90ad6e47b2ac0b3a933885c06a0af5ad57b5f818f4531ff6961b351e9705f5af6dd26b2427",
"@rollup/rollup-linux-powerpc64le-gnu@npm:4.40.2": "867b6bc576e07110181f41c588b1a7ee22a6571bf5a3ceff0527c1e7c4540b5122d34b99f0c56c00d5c33a2e517fbb16c3e269cc4c08110e69dc0f0e4b2fbf26",
"@rollup/rollup-linux-riscv64-gnu@npm:4.40.2": "52f07f3e5e008cd0d277d5290524682c8ec5c03e08659b07a800fddc00b450dbf8df08612921b9fe6e4e16d60d5e282027d9b260ff520c40bf3e7c5e1efabb60",
"@rollup/rollup-linux-riscv64-musl@npm:4.40.2": "6483ab13ac5626c5b94d72aad3ffafe63a3572899824b1d37e59bc071b147f3d498864a0e19942e013a4488aa9262a92817232ca6c38339e3de62c3c4aca87e3",
"@rollup/rollup-linux-s390x-gnu@npm:4.40.2": "842ad92a20ff994091d4ba4c16f87e2f8a57e1eb9e3004c20aaeeb692bc2061619dd43ba4dd246712f8904fe1480e6211b43e9fd2e11a5faebbeebea0c79da63",
"@rollup/rollup-linux-x64-gnu@npm:4.40.2": "c440df4beca32d238b0a0f0b1017fb30da52c0f705946177c01a08d7d214ae190b2070885d93e15ff5fb5741e0964e1370bdd45f8a94e9a4689816f06f18c5a0",
"@rollup/rollup-linux-x64-musl@npm:4.40.2": "9874b4cce42573d460634443ddb730d348360089bf93667309e660301e4e389d8ae80abe7f33fa9a20db5e67984e107e17d1479bdfee278d74bc60dde6ab5f83",
"@rollup/rollup-win32-arm64-msvc@npm:4.40.2": "b61552ab831efde1ca4823cab1982d3d681e1be269d67d60558cd2ac86fe3802f6d569300d9ada084acebae27257b00c68f9d858261a579b5d8686956aa92ba0",
"@rollup/rollup-win32-ia32-msvc@npm:4.40.2": "13ad059483b26bbf12af5108207d66a98ae2aef7599f27a506b998c781921b653dacc63ee0db57bb6f37c920163fd8bc40072e0be0ec6b1e5f52eb3f1455efeb",
"@rollup/rollup-win32-x64-msvc@npm:4.40.2": "98ab8600ecbeab358c53ed563a7b586da0c5cdf26c03456a982a016b2f8eff6e2ec07055d15fe039b982a18a970744390d85a05970c9a8b1533c54702026f8df",
"@unrs/resolver-binding-darwin-arm64@npm:1.3.2": "c8c61120e2bead2e0fec054399107e1ebd39455a2b7d59a5446cafad86cca376e0010e65644c41da0958a065869dcbe0509a29394b52a469a48990d32bf7a6e8",
"@unrs/resolver-binding-darwin-x64@npm:1.3.2": "ee67a4043d2e297cb1362b7aa25be3f5defef9eb13f4e80358c3f22ffdef043ef905ac661fc9e70359383bafed5837a52bd001b49a8ea4f70372051d89ee6eff",
"@unrs/resolver-binding-freebsd-x64@npm:1.3.2": "5f19ef3991435a96e682d427a8d9b28886b4afc9ea5b723e51c4bca51f25bb24add8819ed91c9f228bd39e139d51625cc127ddd35efd6c3f6e1d88106808fad1",
"@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.3.2": "f77b2345c2b572b569089092fa6c08b5a55fdb08d26e1db3cdfa0d195511a0efbe109c558e77bfd78d7aed4ffe47b6542890c9cad032cc00bb0fcd5f373f5090",
"@unrs/resolver-binding-linux-arm-musleabihf@npm:1.3.2": "8b7156d8c641994c39626522ba42e69eef8d868a69b319c9ea5f7584ef0c4ea98bc698c1a4417d209dd3a786630be404d459680cf5b5b2500d3c4b0eb1be894f",
"@unrs/resolver-binding-linux-arm64-gnu@npm:1.3.2": "93b28c2ea0dae2d452659e0afde6099107b70362043e19800e35b7ae86350856dfa0a4d6ba2be566c225965b458b5fba78a10219cf78e6fc0c581373cd2e2a52",
"@unrs/resolver-binding-linux-arm64-musl@npm:1.3.2": "49ed9f24838e876eb1bba9b5f3e283af0716ee23f7d11a799a6376a47fa59a2e28b724431ca165a3874d60b1ed5a6b6c7650fe207f0610a788c88baa7862688f",
"@unrs/resolver-binding-linux-ppc64-gnu@npm:1.3.2": "9fad22ffbf7aadf471a6d054c833a9b4cea74e2c38be40d546e6ba71058a6be10fa4e28947425ef33d42dc77de1c81b631fbff5a96a637c3a7652910f3e27d76",
"@unrs/resolver-binding-linux-s390x-gnu@npm:1.3.2": "dd28e351f19268c4735da984e96301d8433603cf109b2b6880aab9bb8f448242699b7f84c36c536ca4a9443f944153098a3d3e78fce26d0c56fe3406d73d4b55",
"@unrs/resolver-binding-linux-x64-gnu@npm:1.3.2": "e1cc70d8e012bc61bf5af85c2e9905aa1953c06daaab9b3857d780424c62807ccd0c5a20acb919e3accec7152badee426b1514ab9a4256b77945c3e7c8df3496",
"@unrs/resolver-binding-linux-x64-musl@npm:1.3.2": "e97b95e53d029e4ccaf7cf32072e644c495d8e1f097b6fdeb417860db4db4b752d84f5fa6310b9f170a1fbf0562696f0145005dda4a95d658ea0857fac6c51dd",
"@unrs/resolver-binding-wasm32-wasi@npm:1.3.2": "d3f16f36ba5dd714ef3eaf7bc57597e9f9a1fab7c6b5fb5dc5bf688d81a1bd4a574da16bd3e2b383181032a71001583b6534c21e5ffde1ee43fcfa95bc292f3b",
"@unrs/resolver-binding-win32-arm64-msvc@npm:1.3.2": "de65010d133e99a062827f698a7e50c30db15d9f6b9011d351762cc8809497e97c4617b7d6ca3052583ca3f6b8c3cb1f2857fd0c9afd944c7ebb65d5e1da74f6",
"@unrs/resolver-binding-win32-ia32-msvc@npm:1.3.2": "f214a8950e823c60656d2d113584c3cd20c6e92668f43f73c13c3ddfe38a7063615e42537645e2aa52a0652ace9c82e8fd5d9411043a6985ccb49d8dc8bb2595",
"@unrs/resolver-binding-win32-x64-msvc@npm:1.3.2": "38ca5f5912d7cddd3f3e1983ad8e79d084ab3f5990189ce8cdfcfc3b58d97cc0dd7b543cc78ff43eb1769d15a8c235339a5942c688ab680192caa4c97116a511"
}

View file

@ -1,28 +0,0 @@
--- a/yarn.lock
+++ b/yarn.lock
@@ -17707,23 +17707,21 @@
linkType: hard
"typescript@patch:typescript@npm%3A5#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin<compat/typescript>":
version: 5.7.3
- resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin<compat/typescript>::version=5.7.3&hash=5786d5"
+ resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin<compat/typescript>::version=5.7.3&hash=8c6c40"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A^5.6.0#optional!builtin<compat/typescript>":
version: 5.8.2
- resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin<compat/typescript>::version=5.8.2&hash=5786d5"
+ resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin<compat/typescript>::version=5.8.2&hash=8c6c40"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/5448a08e595cc558ab321e49d4cac64fb43d1fa106584f6ff9a8d8e592111b373a995a1d5c7f3046211c8a37201eb6d0f1566f15cdb7a62a5e3be01d087848e2
languageName: node
linkType: hard
"unbox-primitive@npm:^1.1.0":

View file

@ -1,8 +1,8 @@
/*
This fetches the glitch-soc source from GitHub and patches it.
This fetches the glitch-soc source from GitHub and patches it.
This needs to be a separately buildable package so that update.sh can build it during upgrading,
because it needs it for generating `gemset.nix` from the Gemfile in the source.
This needs to be a separately buildable package so that update.sh can build it during upgrading,
because it needs it for generating `gemset.nix` from the Gemfile in the source.
*/
{
@ -13,13 +13,11 @@
let
versionData = import ./version_data.nix;
in
applyPatches {
in applyPatches {
src = fetchFromGitHub {
owner = "glitch-soc";
repo = "mastodon";
inherit (versionData) rev hash;
};
# patches = lib.filesystem.listFilesRecursive ./patches;
patches = [ ];
patches = lib.filesystem.listFilesRecursive ./patches;
}

View file

@ -1,28 +1,18 @@
#!/usr/bin/env -S nix shell nixpkgs#coreutils nixpkgs#bundix nixpkgs#nix-prefetch-github nixpkgs#jq -c bash
#!/usr/bin/env -S nix shell nixpkgs#coreutils nixpkgs#bundix nixpkgs#nix-prefetch-github nixpkgs#jq nixpkgs-unstable#yarn-berry_4.yarn-berry-fetcher -c bash
set -e
cd "$(dirname "$0")" # cd to the script's directory
echo "Retrieving latest glitch-soc commit..."
echo "Retrieving latest glitch-soc/mastodon commit..."
commit="$(curl -SsL 'https://api.github.com/repos/glitch-soc/mastodon/branches/main')"
rev="$(jq -r '.commit.sha' <<<"$commit")"
echo "Latest commit is $rev."
echo
echo "Prefetching source..."
hash="$(nix-prefetch-github glitch-soc mastodon --rev "$rev" | jq -r '.hash')"
echo
echo "Generating version_data.nix..."
cat > version_data.nix << EOF
# This file was generated with update.sh.
{
rev = "$rev";
hash = "$hash";
yarnHash = "";
}
EOF
echo "Prefetching glitch-soc/mastodon source..."
hash="$(nix-prefetch-github glitch-soc mastodon --rev $rev | jq -r '.hash')"
echo "Source hash is $hash."
echo
echo "Building source derivation..."
@ -36,7 +26,23 @@ bundix --quiet --lockfile $srcdir/Gemfile.lock --gemfile $srcdir/Gemfile
echo "" >> gemset.nix
echo
echo "Done."
echo "Generating missing yarn hashes file..."
yarn-berry-fetcher missing-hashes $srcdir/yarn.lock 2>/dev/null > ./missing-hashes.json
echo
echo "You'll have to manually enter the commit hash for the yarn deps from the error message when first trying to build the package."
echo "Prefetching yarn deps..."
yarn_hash="$(yarn-berry-fetcher prefetch "$srcdir/yarn.lock" ./missing-hashes.json 2>/dev/null)"
echo
echo "Generating version_data.nix..."
cat > version_data.nix << EOF
# This file was generated with update.sh.
{
rev = "$rev";
hash = "$hash";
yarnHash = "$yarn_hash";
}
EOF
echo
echo "Done."

View file

@ -1,6 +1,6 @@
# This file was generated with update.sh.
{
rev = "8b42ec1cfb5d741864bce27aaf6e5449e2fab895";
hash = "sha256-kc6dj0qitPcdRoRklK89mkeXUVZ/kd3Hv4KdlMm12c8=";
yarnHash = "sha256-rpLSIoujSjpGymWb8snGQFEtTbkoU4m5bD14MZnopbs=";
rev = "a8ed67876148dc349a26431dcba55850a7f49df8";
hash = "sha256-rVYHPHRnw0EhSPydxSJzwJCM/Te6uCSdVZwAUZ+H0YA=";
yarnHash = "sha256-mBU/Ts35QOJMLUmhgrxLWf0EMEkGSSAHXFhmKwBbd5A=";
}