From cd9b4e02d0be7d215cb3a8bd383d52fd66b29d97 Mon Sep 17 00:00:00 2001 From: Terje Larsen Date: Sun, 31 May 2020 18:18:15 +0200 Subject: [PATCH] nodePackages.tsun: add typescript to NODE_PATH This package has typescript as dependency, but it is specified as peer dependency which is not reflected via the nodePackages generation script which is using node2nix which is requiring `--include-peer-dependencies` to include such dependencies. In order to be able to run this package stand alone, it needs to add the typescript module to the NODE_PATH. Fix #88046 --- pkgs/development/node-packages/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index 2ceef0f477f2..6768c6834dc3 100644 --- a/pkgs/development/node-packages/default.nix +++ b/pkgs/development/node-packages/default.nix @@ -131,6 +131,14 @@ let ''; }; + tsun = super.tsun.overrideAttrs (oldAttrs: { + buildInputs = oldAttrs.buildInputs ++ [ pkgs.makeWrapper ]; + postInstall = '' + wrapProgram "$out/bin/tsun" \ + --prefix NODE_PATH : ${self.typescript}/lib/node_modules + ''; + }); + stf = super.stf.override { meta.broken = since "10"; };