From 85cecf033416b2efc8426c46c05bb2d182336c75 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 17 Jun 2025 17:33:53 +0200 Subject: [PATCH 1/2] mastodon: refactor passthru on source Any attribute concatenation onto the result of mkDerivation will break *some* overrideability. This case is rather obscure. You'd have to do something like this to get an eval failure: ``` (mastodon.override { srcOverride = mastodon.src.overrideAttrs { }; }) ``` This is not what I'am actually doing: I am calling `overrideAttrs` on every `callPackage` call for an experiment - and this break with it. --- pkgs/servers/mastodon/source.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/mastodon/source.nix b/pkgs/servers/mastodon/source.nix index 4dcc524f01b3..63f408e1f81e 100644 --- a/pkgs/servers/mastodon/source.nix +++ b/pkgs/servers/mastodon/source.nix @@ -7,17 +7,18 @@ let version = "4.3.8"; in -(applyPatches { +applyPatches { src = fetchFromGitHub { owner = "mastodon"; repo = "mastodon"; rev = "v${version}"; hash = "sha256-08AApylDOz8oExZ0cRaZTgNAuP+1wiLkx0SDhkO2fMM="; + + passthru = { + inherit version; + yarnHash = "sha256-IC4d/skIHEzJPuKlq4rMAqV+ydqquA6toq4WWCfuDxo="; + yarnMissingHashes = null; + }; }; patches = patches ++ [ ]; -}) -// { - inherit version; - yarnHash = "sha256-IC4d/skIHEzJPuKlq4rMAqV+ydqquA6toq4WWCfuDxo="; - yarnMissingHashes = null; } From f5d5b9b2a0e53783d688a633323b5191820f9a37 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 17 Jun 2025 17:36:24 +0200 Subject: [PATCH 2/2] applyPatches: fix type in comment --- pkgs/build-support/trivial-builders/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index ca2f33afa7b3..05c6cbecc6b5 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -1062,7 +1062,7 @@ rec { // (optionalAttrs (extraPassthru != { } || src ? passthru) { passthru = extraPassthru // src.passthru or { }; }) - # Forward any additional arguments to the derviation + # Forward any additional arguments to the derivation // (removeAttrs args [ "src" "name"