bundlerEnv: Allow overriding bundler

Prior to this it doesn't seem to be possible to customize the version of
bundler used in a bundlerEnv app. This change allows something like the
following:

```nix
let bundler = pkgs.buildRubyGem rec {
  gemName="bundler";
  name="bundler-2.2.11";
  version="2.2.11";
  source.sha256="1izx6wsjdm6mnbxazgz1z5qbhwrrisbq0np2nmx4ij6lrqjy18jf";
};
in pkgs.bundlerEnv.override { inherit bundler; } {
  name="test";
  gemdir=./.;
}
```

to use bundler 2.2.11 rather than the 2.1.5 default.
This commit is contained in:
Jonathan del Strother 2021-03-09 16:52:07 +00:00
parent 78452c2093
commit 878bae1142
No known key found for this signature in database
GPG key ID: 39C57B40653AA4FB

View file

@ -23,7 +23,7 @@
let
inherit (import ../bundled-common/functions.nix {inherit lib ruby gemConfig groups; }) genStubsScript;
basicEnv = (callPackage ../bundled-common {}) (args // { inherit pname name; mainGemName = pname; });
basicEnv = (callPackage ../bundled-common { inherit bundler; }) (args // { inherit pname name; mainGemName = pname; });
inherit (basicEnv) envPaths;
# Idea here is a mkDerivation that gen-bin-stubs new stubs "as specified" -