diff options
Diffstat (limited to 'pkgs/development/ruby-modules/bundled-common/default.nix')
-rw-r--r-- | pkgs/development/ruby-modules/bundled-common/default.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/development/ruby-modules/bundled-common/default.nix b/pkgs/development/ruby-modules/bundled-common/default.nix index b18248c7d61b8..86c885b52dcb4 100644 --- a/pkgs/development/ruby-modules/bundled-common/default.nix +++ b/pkgs/development/ruby-modules/bundled-common/default.nix @@ -70,11 +70,12 @@ let assert gemFiles.gemdir != null; "cp -a ${gemFiles.gemdir}/* $out/") #*/ ); - maybeCopyAll = pkgname: if pkgname == null then "" else - let - mainGem = gems.${pkgname} or (throw "bundlerEnv: gem ${pkgname} not found"); - in - copyIfBundledByPath mainGem; + maybeCopyAll = pkgname: lib.optionalString (pkgname != null) ( + let + mainGem = gems.${pkgname} or (throw "bundlerEnv: gem ${pkgname} not found"); + in + copyIfBundledByPath mainGem + ); # We have to normalize the Gemfile.lock, otherwise bundler tries to be # helpful by doing so at run time, causing executables to immediately bail |