From 757affafd3f357ebb94db66b773fe7466cb5433f Mon Sep 17 00:00:00 2001 From: Luflosi Date: Fri, 1 Apr 2022 12:19:25 +0200 Subject: [PATCH] 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. --- pkgs/development/node-packages/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index ec995bad5ae6..23f41b7b4d2a 100644 --- a/pkgs/development/node-packages/default.nix +++ b/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 {