Merge pull request #30 from nicknovitski/passthru-yarn

Add passthru yarn derivation
This commit is contained in:
Stéphan Kochen
2022-07-13 13:35:56 +02:00
committed by GitHub
+8 -1
View File
@@ -1,7 +1,7 @@
# This file is generated by running "yarn install" inside your project. # This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution! # Manual changes might be lost - proceed with caution!
{ lib, nodejs, stdenv, fetchurl, writeText, git, cacert }: { lib, nodejs, stdenv, fetchurl, writeText, git, cacert, writeShellApplication }:
{ src, overrideAttrs ? null, ... } @ args: { src, overrideAttrs ? null, ... } @ args:
let let
@@ -151,6 +151,13 @@ let
passthru = { passthru = {
inherit nodejs; inherit nodejs;
yarn = writeShellApplication {
name = "yarn";
runtimeInputs = [ nodejs ];
text = ''
${yarnPath} --cwd ${project}/libexec/${project.name} "$@"
'';
};
}; };
}); });