@@ -1,4 +1,4 @@
1−{ stdenv }@defs:
1+{ lib, stdenv, callPackage, runCommand, ruby }@defs:
@@ -8,25 +8,26 @@
9 # Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)
9 # Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)
10, scripts ? []
10, scripts ? []
11, gemfile ? null
12, gemfile ? null
12, lockfile ? null
13, lockfile ? null
13, gemset ? null
14, gemset ? null
14, preferLocalBuild ? false
15, preferLocalBuild ? false
15, allowSubstitutes ? false
16, allowSubstitutes ? false
16, meta ? {}
17, meta ? {}
17−, postBuild
18+, postBuild ? ""
21 basicEnv = (callPackage ../bundled-common {}) args;
22 basicEnv = (callPackage ../bundled-common {}) args;
23− args = removeAttrs args_ [ "name" "postBuild" ]
24+ cmdArgs = removeAttrs args [ "name" "postBuild" ]
24 // { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
25 // { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
26− runCommand name args ''
27+ runCommand name cmdArgs ''
27− mkdir -p ${out}/bin; cd $out;
28+ mkdir -p $out/bin; cd $out;
28 ${(lib.concatMapStrings (x: "ln -s '${basicEnv}/bin/${x}' '${x}';\n") exes)}
29 ${(lib.concatMapStrings (x: "ln -s '${basicEnv}/bin/${x}' '${x}';\n") exes)}
29− ${(lib.concatMapStrings (s: "makeWrapper ${out}/bin/$(basename ${s}) $srcdir/${s} " +
30+ ${(lib.concatMapStrings (s: "makeWrapper $out/bin/$(basename ${s}) $srcdir/${s} " +
30 "--set BUNDLE_GEMFILE ${basicEnv.confFiles}/Gemfile "+
31 "--set BUNDLE_GEMFILE ${basicEnv.confFiles}/Gemfile "+
31 "--set BUNDLE_PATH ${basicEnv}/${ruby.gemPath} "+
32 "--set BUNDLE_PATH ${basicEnv}/${ruby.gemPath} "+
32 "--set BUNDLE_FROZEN 1 "+
33 "--set BUNDLE_FROZEN 1 "+