Commit graph

23 commits

Author SHA1 Message Date
Jonathan del Strother
878bae1142
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.
2021-03-10 10:44:14 +00:00
talyz
affcf9ba1e bundlerEnv: Add option to copy gem files instead of symlinking
The way ruby loads gems and keeps track of their paths seems to not
always work very well when the gems are accessed through
symlinks. Ruby will then complain that the same files are loaded
multiple times; it relies on the file's full path to determine whether
the file is loaded or not.

This adds an option to simply copy all gem files into the environment
instead, which gets rid of this issue, but may instead result in major
file duplication.
2020-03-03 21:19:01 +01:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Nick Novitski
7136e0d0a6 bundlerUpdateScript: init and use (#64822) 2019-07-22 12:02:47 +00:00
Aneesh Agrawal
aa9fc7ee25 bundler-env: Remove unused args 2018-01-04 02:28:33 -05:00
Judson
e149f02344
Using pname and fetching versions 2017-06-27 22:33:18 -07:00
Judson
603e84caef
Fixing an overload of "pname" 2017-06-25 17:40:22 -07:00
Judson
964d9b7a06
Made gemdir handling into a common function 2017-06-09 09:04:33 -07:00
Judson
c4fc70f53c
Starting to add tool builder. Extracting bundler file computation. 2017-05-31 09:44:46 -07:00
Judson
998d011e42
Restructuring files 2017-05-27 15:19:34 -07:00
Judson
ae84d19e65
Final testing 2017-05-15 09:36:30 -07:00
Judson
66fed6d28f
Basically working. Checking against actual use cases. 2017-05-03 20:27:42 -07:00
Judson
2b414e1c15
Test harnesses 2017-05-01 09:07:42 -07:00
Judson
89fda10d31
Starting decomposition of bundlerEnv 2017-04-24 18:45:00 -07:00
Judson
7f6e8a1cd5
Adding "allBins" flag on bundlerEnv
The bin stubs need to be built where there's access to /nix/store - so
it can't happen in a nix-shell run. Ergo, a shell.nix needs to be able
to signal to the build that all bins need to be built.
2017-03-26 17:32:30 -07:00
Judson
0481a33d21
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.
2017-02-20 21:03:44 -08:00
Judson
3c9941114f
Need to handle "null" mainGems
Not every gem package uses pname, nor should it.
2017-02-19 10:51:35 -08:00
Judson
c765f680e3
Updates to bundlerEnv 2017-02-19 10:18:54 -08:00
zimbatm
2a194746a5 bundlerEnv: refactor
Add `pname` attribute: if passed, the derivation name defaults to the
gem name + version and only expose the gem's bin.

Add `gemdir` attribute: gives a default lookup path for the Gemfile,
Gemfile.lock and gemset.nix.

Set the `meta.platforms' to `ruby.meta.platforms' by default.
2016-10-08 22:38:56 +01:00
zimbatm
28fa4a2f03 Escape all shell arguments uniformly 2016-06-12 18:11:37 +01:00
Michael Fellinger
090da825fe
bundlerEnv: filter gemset groups 2016-04-17 23:07:31 +02:00
Michael Fellinger
fe87240e68 bundler-env: Gemfile.lock is frozen 2016-04-13 11:25:41 +02:00
zimbatm
5a64bc44ea move all ruby modules to development/ruby-modules 2016-03-19 22:06:26 +00:00
Renamed from pkgs/development/interpreters/ruby/bundler-env/default.nix (Browse further)