Describe the bug
I tried to build rmfakecloud (a go app, with since the latest version a pnpm web ui component) in #358324 in a single derivation but that didn't go so well.
Steps To Reproduce
Steps to reproduce the behavior:
- checkout https://github.com/martinetd/nixpkgs/commits/rmfakecloud_gopnpm/
- fail to build rmfakecloud:
nix -L build -f . rmfakecloud
...
Error: 'pnpmDeps' must be set when using pnpmConfigHook
...
Additional context
It fails because the pnpmDeps / pnpmRoot attributes defined in buildGoModule arguments aren't present in the final derivation.
I could build by patching go module like this:
diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix
index 3a3ae71de508..3e063f5f7126 100644
--- a/pkgs/build-support/go/module.nix
+++ b/pkgs/build-support/go/module.nix
@@ -81,7 +81,7 @@ in
nativeBuildInputs = (finalAttrs.nativeBuildInputs or [ ]) ++ [ go git cacert ];
- inherit (finalAttrs) src modRoot;
+ inherit (finalAttrs) src modRoot pnpmDeps pnpmRoot;
inherit (go) GOOS GOARCH;
inherit GO111MODULE GOTOOLCHAIN;
But it's rather unsightly 😅
Perhaps there is a way to inherit all attributes from the argument?
Notify maintainers
buildGoModules itself has no maintainer... @NixOS/golang ?
For the pnpm side, @Scrumplex @gepbird
Thanks!
Describe the bug
I tried to build rmfakecloud (a go app, with since the latest version a pnpm web ui component) in #358324 in a single derivation but that didn't go so well.
Steps To Reproduce
Steps to reproduce the behavior:
nix -L build -f . rmfakecloudAdditional context
It fails because the pnpmDeps / pnpmRoot attributes defined in buildGoModule arguments aren't present in the final derivation.
I could build by patching go module like this:
But it's rather unsightly 😅
Perhaps there is a way to inherit all attributes from the argument?
Notify maintainers
buildGoModules itself has no maintainer... @NixOS/golang ?
For the pnpm side, @Scrumplex @gepbird
Thanks!