3
0
Fork 0
forked from mirrors/nixpkgs

yarn2nix: replace simple mkDerivation with runCommandLocal

This commit is contained in:
Felix Buehler 2021-08-19 22:49:29 +02:00 committed by Raphael Megzari
parent fbfc876625
commit 6ee7f33833

View file

@ -4,7 +4,7 @@
}:
let
inherit (pkgs) stdenv lib fetchurl linkFarm callPackage git rsync makeWrapper;
inherit (pkgs) stdenv lib fetchurl linkFarm callPackage git rsync makeWrapper runCommandLocal;
compose = f: g: x: f (g x);
id = x: x;
@ -414,21 +414,16 @@ in rec {
'';
};
fixup_yarn_lock = stdenv.mkDerivation {
name = "fixup_yarn_lock";
fixup_yarn_lock = runCommandLocal "fixup_yarn_lock"
{
buildInputs = [ nodejs ];
} ''
mkdir -p $out/lib
mkdir -p $out/bin
buildInputs = [ nodejs ];
cp ${./lib/urlToName.js} $out/lib/urlToName.js
cp ${./internal/fixup_yarn_lock.js} $out/bin/fixup_yarn_lock
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/bin
cp ${./lib/urlToName.js} $out/lib/urlToName.js
cp ${./internal/fixup_yarn_lock.js} $out/bin/fixup_yarn_lock
patchShebangs $out
'';
};
patchShebangs $out
'';
}