From 1368fd86636f1d682ed56a8365237e14edbc462b Mon Sep 17 00:00:00 2001 From: fi Date: Wed, 12 Feb 2025 01:54:38 +0100 Subject: [PATCH] Don't check for broken symlinks when building mastodon Mastodon ships with broken symlinks. When building mastodon the check for that needs to be disabled. --- config/hosts/mastodon/mastodon.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/hosts/mastodon/mastodon.nix b/config/hosts/mastodon/mastodon.nix index e7a3024..5aa22ad 100644 --- a/config/hosts/mastodon/mastodon.nix +++ b/config/hosts/mastodon/mastodon.nix @@ -25,6 +25,8 @@ let rev = "v${version}"; sha256 = "sha256-6FyLhRy+/uW+RYt+IRHpkTABjKGTQYjR/4GSPN+GlGY="; }; + # mastodon ships with broken symlinks, disable the check for that for now + dontCheckForBrokenSymlinks = true; installPhase = '' cp -r ./ $out/ cp -r ${tangerineUI}/mastodon/app/javascript/styles/* $out/app/javascript/styles/ @@ -48,6 +50,14 @@ let ]; }; yarnHash = "sha256-e5c04M6XplAgaVyldU5HmYMYtY3MAWs+a8Z/BGSyGBg="; + }).overrideAttrs (old: { + mastodonModules = old.mastodonModules.overrideAttrs (old: { + # FIXME: Remove once fixed in nixpkgs. See https://github.com/NixOS/nixpkgs/issues/380366 + postBuild = '' + # Remove workspace "package" as it contains broken symlinks + rm -r ~/node_modules/@mastodon + ''; + }); }); }; pkgs-overlay = pkgs.extend mastodonNekoverseOverlay;