Attempt to fix the mapping of each system
This commit is contained in:
parent
16e2006b09
commit
8a223cffb1
1 changed files with 38 additions and 23 deletions
25
flake.nix
25
flake.nix
|
@ -23,7 +23,24 @@
|
|||
treefmt-nix,
|
||||
}:
|
||||
let
|
||||
forEachSystem = systems: map: nixpkgs.lib.genAttrs systems map;
|
||||
eachSystemOp =
|
||||
op: systems: f:
|
||||
builtins.foldl' (op f) { } systems;
|
||||
mapEachSystem = eachSystemOp (
|
||||
f: attrs: system:
|
||||
let
|
||||
result = f system;
|
||||
in
|
||||
builtins.foldl' (
|
||||
attrs: key:
|
||||
attrs
|
||||
// {
|
||||
${key} = (attrs.${key} or { }) // {
|
||||
${system} = result.${key};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
in
|
||||
{
|
||||
lib.mkFlake =
|
||||
|
@ -44,9 +61,8 @@
|
|||
"treeFmtFile"
|
||||
];
|
||||
in
|
||||
(
|
||||
(snowfall-lib.mkFlake snowfallOptions)
|
||||
// (forEachSystem systems (
|
||||
// (mapEachSystem systems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
@ -64,7 +80,6 @@
|
|||
] ++ (devShellPackages pkgs);
|
||||
};
|
||||
}
|
||||
))
|
||||
);
|
||||
));
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue