1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00

bundlerEnv: include all groups by default

This wasn't really an issue until the latest minor release of Bundix
(2.4), because prior to then Bundix didn't emit group attributes, and so
this functionality of bundlerEnv wasn't really used. However, it is now
apparent that a better default for bundlerEnv would be to include all
gem groups by default, not just the default group. This matches the
behavior of Bundler, and makes more sense, because the default group
alone isn't necessarily useful for anything -- consider a Rails app with
production, development, and test groups. It has the additional benefit
of being backwards compatible with how this would have worked before the
Bundix update.
This commit is contained in:
Alyssa Ross 2018-12-11 21:19:32 +00:00
parent 67b1265fb3
commit 83a2d993d4
No known key found for this signature in database
GPG key ID: C4844408C0657052
2 changed files with 6 additions and 6 deletions

View file

@ -17,7 +17,7 @@
, postBuild ? null
, document ? []
, meta ? {}
, groups ? ["default"]
, groups ? null
, ignoreCollisions ? false
, buildInputs ? []
, ...

View file

@ -1,7 +1,8 @@
{ lib, gemConfig, ... }:
let
inherit (lib) attrValues concatMap converge filterAttrs getAttrs;
inherit (lib) attrValues concatMap converge filterAttrs getAttrs
intersectLists;
in rec {
bundlerFiles = {
@ -49,10 +50,9 @@ in rec {
) attrs.platforms
);
groupMatches = groups: attrs: (
!(attrs ? "groups") ||
builtins.any (gemGroup: builtins.any (group: group == gemGroup) groups) attrs.groups
);
groupMatches = groups: attrs:
groups == null || !(attrs ? "groups") ||
(intersectLists groups attrs.groups) != [];
applyGemConfigs = attrs:
(if gemConfig ? "${attrs.gemName}"