nodePackages.postcss-cli: fix execution of binary

Without this change, executing the postcss binary results in the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'postcss'

Thanks to https://github.com/NixOS/nixpkgs/issues/145618#issuecomment-1051347961 I finally managed to fix this. For some reason `wrapProgram` is still needed though.
Fixes https://github.com/NixOS/nixpkgs/issues/145618.
main
Luflosi 2 years ago
parent 9dc7fafa42
commit 757affafd3
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0
  1. 1
      pkgs/development/node-packages/default.nix

@ -343,6 +343,7 @@ let
wrapProgram "$out/bin/postcss" \
--prefix NODE_PATH : ${self.postcss}/lib/node_modules \
--prefix NODE_PATH : ${self.autoprefixer}/lib/node_modules
ln -s '${self.postcss}/lib/node_modules/postcss' "$out/lib/node_modules/postcss"
'';
passthru.tests = {
simple-execution = pkgs.callPackage ./package-tests/postcss-cli.nix {

Loading…
Cancel
Save