commitlint: wrap with nodejs
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
fetchYarnDeps,
|
fetchYarnDeps,
|
||||||
yarnConfigHook,
|
yarnConfigHook,
|
||||||
nodejs,
|
nodejs,
|
||||||
|
makeBinaryWrapper,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
yarnConfigHook
|
yarnConfigHook
|
||||||
nodejs
|
nodejs
|
||||||
|
makeBinaryWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
@@ -50,7 +52,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mkdir -p $out/lib/node_modules/@commitlint/root
|
mkdir -p $out/lib/node_modules/@commitlint/root
|
||||||
mv * $out/lib/node_modules/@commitlint/root/
|
mv * $out/lib/node_modules/@commitlint/root/
|
||||||
ln -s $out/lib/node_modules/@commitlint/root/@commitlint/cli/cli.js $out/bin/commitlint
|
|
||||||
|
makeBinaryWrapper ${lib.getExe nodejs} $out/bin/commitlint \
|
||||||
|
--add-flags "$out/lib/node_modules/@commitlint/root/@commitlint/cli/cli.js" \
|
||||||
|
--set NODE_PATH "$out/lib/node_modules/@commitlint/root/node_modules"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user