ruby-modules/bundled-common: do not define gemType for null packages
Without the change `gemType` gets defined via `null` attrset that
exposes unevaluatable attribute:
nix-repl> ronin.gemType
error:
… while evaluating the attribute 'gemType'
at pkgs/development/ruby-modules/bundled-common/default.nix:122:30:
121| inherit ruby bundler gems confFiles envPaths;
122| inherit (gems.${pname}) gemType;
| ^
123|
… while evaluating an attribute name
error: value is null while a string was expected
After the change `passthru` does not expose a `gemType` if `pname` is
`null`.
This commit is contained in:
@@ -117,9 +117,10 @@ let
|
||||
|
||||
meta = { platforms = ruby.meta.platforms; } // meta;
|
||||
|
||||
passthru = rec {
|
||||
inherit ruby bundler gems confFiles envPaths;
|
||||
passthru = (lib.optionalAttrs (pname != null) {
|
||||
inherit (gems.${pname}) gemType;
|
||||
} // rec {
|
||||
inherit ruby bundler gems confFiles envPaths;
|
||||
|
||||
wrappedRuby = stdenv.mkDerivation {
|
||||
name = "wrapped-ruby-${pname'}";
|
||||
@@ -172,7 +173,7 @@ let
|
||||
exit 1
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
basicEnv =
|
||||
|
||||
Reference in New Issue
Block a user