mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 00:22:13 +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:
parent
67b1265fb3
commit
83a2d993d4
|
@ -17,7 +17,7 @@
|
|||
, postBuild ? null
|
||||
, document ? []
|
||||
, meta ? {}
|
||||
, groups ? ["default"]
|
||||
, groups ? null
|
||||
, ignoreCollisions ? false
|
||||
, buildInputs ? []
|
||||
, ...
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue