summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/bundler-env
diff options
context:
space:
mode:
authorJudson <nyarly@gmail.com>2017-02-20 21:03:44 -0800
committerJudson <nyarly@gmail.com>2017-02-20 21:03:44 -0800
commit0481a33d214b3129970d0951e2fe82548c4d3d04 (patch)
tree465b8e400ed4e0652cf73c897bc84df6bc503732 /pkgs/development/ruby-modules/bundler-env
parent3c9941114f1c1801c388fbd1fc31907b14625b72 (diff)
downloadnixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar.gz
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar.bz2
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar.lz
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar.xz
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.tar.zst
nixpkgs-0481a33d214b3129970d0951e2fe82548c4d3d04.zip
Simplifying interface on gemset.nix slightly.
`usesGemspec` no longer required to trigger the "copy everything into
gemfile-and-lock" behavior. If the mainGem is referred to by path,
that's sufficient.
Diffstat (limited to 'pkgs/development/ruby-modules/bundler-env')
-rw-r--r--pkgs/development/ruby-modules/bundler-env/default.nix18
1 files changed, 8 insertions, 10 deletions
diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix
index ba9ea5f3fa8..794dd11665d 100644
--- a/pkgs/development/ruby-modules/bundler-env/default.nix
+++ b/pkgs/development/ruby-modules/bundler-env/default.nix
@@ -76,16 +76,14 @@ let
     if hasBundler then gems.bundler
     else defs.bundler.override (attrs: { inherit ruby; });
 
-  pathDerivation = {
-    usesGemspec ? false, ...
-  }@attrs:
+  pathDerivation = { gemName, version, path, ...  }:
     let
       res = {
-          inherit usesGemspec;
           type = "derivation";
-          name = attrs.gemName;
-          version = attrs.version;
-          outPath = attrs.path;
+          bundledByPath = true;
+          name = gemName;
+          version = version;
+          outPath = path;
           outputs = [ "out" ];
           out = res;
           outputName = "out";
@@ -105,10 +103,10 @@ let
 
   gems = lib.flip lib.mapAttrs configuredGemset (name: attrs: buildGem name attrs);
 
-  maybeCopyAll = main: if main == null then "" else copyIfUseGemspec main;
+  maybeCopyAll = main: if main == null then "" else copyIfBundledByPath main;
 
-  copyIfUseGemspec = { usesGemspec ? false, ...}@main:
-  (if usesGemspec then ''
+  copyIfBundledByPath = { bundledByPath ? false, ...}@main:
+  (if bundledByPath then ''
   cp -a ${gemdir}/* $out/
   '' else ""
   );