diff --git a/src/tmpl/yarn-project.nix.in b/src/tmpl/yarn-project.nix.in index 34ea306..983b2d9 100644 --- a/src/tmpl/yarn-project.nix.in +++ b/src/tmpl/yarn-project.nix.in @@ -1,7 +1,7 @@ # This file is generated by running "yarn install" inside your project. # 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: let @@ -151,6 +151,13 @@ let passthru = { inherit nodejs; + yarn = writeShellApplication { + name = "yarn"; + runtimeInputs = [ nodejs ]; + text = '' + ${yarnPath} --cwd ${project}/libexec/${project.name} "$@" + ''; + }; }; });