-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pnpm.configHook
/ npmHooks.npm{Install,Build}Hook
: Support pnpm-workspace.yaml
projects
#316908
Comments
I did a test for workspaces using the existing tooling and linked it the other week: #290715 (comment). Repo here: https://github.com/nathanscully/pnpm-monorepo-test/blob/pnpm-nixpkgs/flake.nix - note it probably needs a rebase. It's probably non-ideal as its using the inbuilt pnpm filter spread syntax ( |
For
And all of them gave me:
Which is peculiar... Running without a |
This seems to work for me. Can you try it? Might need to move around the out folders but it builds. {
lib,
stdenv,
fetchFromGitHub,
pnpm_9,
nodejs,
npmHooks,
writeScriptBin,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bash-language-server";
version = "5.3.3";
src = fetchFromGitHub {
owner = "bash-lsp";
repo = "bash-language-server";
rev = "server-${finalAttrs.version}";
hash = "sha256-4+imeVjosEspFhWzjtUp2IZx7aZIx56g8M03V3dEGVs=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
];
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-W7BrUh0tGoG5vTuR3hXDbUTJFDiKET+QvIvCwewfZ2I=";
};
preBuild = ''
rm -r vscode-client
substituteInPlace tsconfig.json \
--replace '{ "path": "./vscode-client" },' ""
'';
postBuild = ''
pnpm run compile
pnpm --offline deploy --frozen-lockfile --ignore-script --filter=bash-language-server server-deploy
'';
installPhase = ''
cp -r server-deploy $out
'';
})
|
Wow Thanks @nathanscully ! The main insight you bring, is that the argument I conclude that we need a |
No worries. I ran into the same issue earlier when I picked up using pnpm. Glad I could help. |
…nfiguration commands Solves NixOS#316908
…nfiguration commands Solves NixOS#316908 (cherry picked from commit 875c9f0)
Pinging people subscribed to this issue about #323493 being merged. I myself was waiting for pnpm workspaces support and had no idea that it was already added a month ago. Unsure if this issue includes additions other than workspaces support, but if not, should probably be closed. |
Thanks @GetPsyched for writing here, indeed I forgot to close this! |
Per the issue mentioned here:
#290715 (comment)
And the docs (link will be correct once #290715 reaches the channels).
We need to think about a way to support projects that use
pnpm-workspace.yaml
.cc @Scrumplex .
The text was updated successfully, but these errors were encountered: