From 0bea6470742a5d28c4705c1cbbc75c2e7d02b18a Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Mon, 17 Nov 2025 21:13:56 +0100 Subject: [PATCH] conventional-changelog-cli: wrap with nodejs --- pkgs/by-name/co/conventional-changelog-cli/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/co/conventional-changelog-cli/package.nix b/pkgs/by-name/co/conventional-changelog-cli/package.nix index f4620912cbb5..a27847b739c5 100644 --- a/pkgs/by-name/co/conventional-changelog-cli/package.nix +++ b/pkgs/by-name/co/conventional-changelog-cli/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, nodejs, pnpm, + makeBinaryWrapper, nix-update-script, }: @@ -27,6 +28,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ nodejs pnpm.configHook + makeBinaryWrapper ]; buildPhase = '' @@ -43,9 +45,10 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p $out/lib/node_modules/conventional-changelog/ mkdir $out/bin mv * $out/lib/node_modules/conventional-changelog/ - chmod +x $out/lib/node_modules/conventional-changelog/packages/conventional-changelog/dist/cli/index.js - ln -s $out/lib/node_modules/conventional-changelog/packages/conventional-changelog/dist/cli/index.js $out/bin/conventional-changelog - patchShebangs $out/bin/conventional-changelog + + makeBinaryWrapper ${lib.getExe nodejs} $out/bin/conventional-changelog \ + --add-flags "$out/lib/node_modules/conventional-changelog/packages/conventional-changelog/dist/cli/index.js" \ + --set NODE_PATH "$out/lib/node_modules/conventional-changelog/node_modules" runHook postInstall '';