summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2021-08-19 22:49:29 +0200
committerRaphael Megzari <raphael@megzari.com>2021-08-22 19:35:42 +0900
commit6ee7f3383386f56ede19eace321e431b22a3af3a (patch)
tree683e59ca127c06c78c42aa2afac560f05cd5b450
parentfbfc876625d740e71f1969828cb4fa13792a673a (diff)
yarn2nix: replace simple mkDerivation with runCommandLocal
-rw-r--r--pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix27
1 files changed, 11 insertions, 16 deletions
diff --git a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix
index 0822e1ee6398..cba0227fd1fa 100644
--- a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix
+++ b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix
@@ -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
+ '';
}