| 21 May 2023 |
hexa | No worries, this is a hobby after all | 20:47:25 |
Lily Foster | In reply to @hexa:lossy.network https://github.com/NixOS/nixpkgs/pull/230991#issuecomment-1552133508 I cannot replicate this by cherry-picking your commit from #229953 on top of #230991 and adding this diff:
diff --git a/pkgs/servers/misc/navidrome/default.nix b/pkgs/servers/misc/navidrome/default.nix
index 7c121e82210..309601e059f 100644
--- a/pkgs/servers/misc/navidrome/default.nix
+++ b/pkgs/servers/misc/navidrome/default.nix
@@ -28,22 +28,14 @@ buildGoModule rec {
vendorHash = "sha256-C8w/qCts8VqNDTQVXtykjmSbo5uDrvS9NOu3SHpAlDE=";
+ npmRoot = "ui";
+
npmDeps = fetchNpmDeps {
inherit src;
sourceRoot = "source/ui";
hash = "sha256-qxwTiXLmZnTnmTSBmWPjeFCP7qzvTFN0xXp5lFkWFog=";
};
- prePatch = ''
- postPatchHooks=("''${postPatchHooks[@]/npmConfigHook}")
- '';
-
- postPatch = ''
- pushd ui
- npmConfigHook
- popd
- '';
-
nativeBuildInputs = [
makeWrapper
nodejs
| 21:31:44 |
Lily Foster | Instead I just get a successfully built /nix/store/0qjbbmqfvgn9x4g9rgyvbqsfzj9bda91-navidrome-0.49.3 | 21:32:36 |
Lily Foster | Also the navidrome update script fails because building .go-modules in general on the derivation fails due to buildGoModule propagating nativeBuildInputs to the fetcher (???) which obviously adds the npm hook which when run, expects to be building npm stuff, not fetching go modules | 21:38:51 |
Lily Foster | I would say this is a bug in buildGoModule and not npmConfigHook because I imagine the same would happen with, e.g., the rust hooks | 21:39:12 |
Lily Foster | * I would say this is a bug in buildGoModule and not npmConfigHook because I imagine the same would happen with, e.g., the cargo/rust hooks | 21:39:16 |
hexa | hm ok | 21:39:38 |
Lily Foster | Now for what to do about it, idk | 21:39:46 |
Lily Foster | There's no comment in the buildGoModule code about why it propagates nativeBuildInputs to the fetcher -- do you know why it would be doing that? | 21:40:20 |
Lily Foster | That seems... counterintuitive. Stuff like buildRustPackage don't do that | 21:41:11 |