Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eachSystem: prefix system-less outpus with _ #83

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,20 @@ let
op = attrs: key:
let
appendSystem = key: system: ret:
if key == "hydraJobs"
if builtins.substring 0 1 key == "_"
then ret.${key}
else if key == "hydraJobs"
then (pushDownSystem system (attrs.hydraJobs or {}) ret.hydraJobs)
else { ${system} = ret.${key}; };
in attrs //
{
${key} = (attrs.${key} or { })
${
if builtins.substring 0 2 key == "__"
then key
else if builtins.substring 0 1 key == "_"
then builtins.substring 1 (-1) key
else key
} = (attrs.${key} or { })
// (appendSystem key system ret);
}
;
Expand Down