35 Commits

Author SHA1 Message Date
Yueh-Shun Li 0fe8db35da bundlerEnv: use structured attributes 2026-07-09 11:04:24 +08:00
jopejoe1 e3f01e7732 bundlerEnv: add support for pname and version 2026-02-06 22:28:50 +01:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Ivan Trubach 30971173ab ruby-modules: improve cross-compilation support 2024-05-28 21:07:20 +03:00
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
volth f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
volth dda95bae35 [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +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 e4bb4d4788 Cleaning out obsolete files 2017-05-27 15:22:06 -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 c39508b254 Fixed platform test. 2017-05-12 09:47:00 -07:00
Judson 56d214b0ea Fixed platform filtering. 2017-05-12 09:44:39 -07:00
Judson 07f781bd8d Current round of tests pass, but filter function is failing to include when platform match in use. 2017-05-10 10:00:21 -07:00
Judson 0145ec999c Current round of tests pass, but filter function is failing to include when groups match in use. 2017-05-09 09:39:20 -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