Allow overriding src

This commit is contained in:
Stéphan Kochen
2020-08-25 16:32:40 +02:00
parent 4bf35c526d
commit 413deabced
2 changed files with 14 additions and 4 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!
{ lib, bash, coreutils, nodejs, perl, stdenv, writeText }:
{ lib, coreutils, nodejs, stdenv, src ? ./. }:
with lib;
@@ -23,9 +23,9 @@ let
# Directory of just the files needed to run Yarn.
yarn-closure = cleanSourceWith {
src = ./.;
inherit src;
filter = let
srcStr = toString ./.;
srcStr = toString src;
srcRel = removePrefix "${srcStr}/";
in path: type:
elem "${type}:${srcRel path}" yarn-closure-entries;
@@ -71,7 +71,7 @@ let
in stdenv.mkDerivation {
name = project-name;
src = ./.;
inherit src;
# Tell node-gyp to use the provided Node.js headers for native code builds.
npm_config_nodedir = nodejs;