Skip to content

Commit 5143ea6

Browse files
bors[bot]zimbatm
andauthored
Merge #259
259: flake: use systems r=zimbatm a=zimbatm Co-authored-by: zimbatm <[email protected]>
2 parents fb6673f + 6247172 commit 5143ea6

File tree

2 files changed

+32
-37
lines changed

2 files changed

+32
-37
lines changed

flake.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,24 @@
33
# To update all inputs:
44
# $ nix flake update --recreate-lock-file
55
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6-
inputs.flake-utils.url = "github:numtide/flake-utils";
6+
inputs.systems.url = "github:nix-systems/default";
77

8-
outputs = inputs:
9-
inputs.flake-utils.lib.eachSystem [
10-
"aarch64-darwin"
11-
"aarch64-linux"
12-
"i686-linux"
13-
"x86_64-darwin"
14-
"x86_64-linux"
15-
]
16-
(system:
17-
let
18-
pkgs = import inputs.self {
8+
outputs = { self, nixpkgs, systems }:
9+
let
10+
eachSystem = nixpkgs.lib.genAttrs (import systems);
11+
in
12+
{
13+
legacyPackages = eachSystem (system:
14+
import self {
1915
inherit system;
2016
inputs = null;
21-
nixpkgs = inputs.nixpkgs.legacyPackages.${system};
22-
};
23-
in
24-
{
25-
legacyPackages = pkgs;
26-
devShells.default = pkgs.fromTOML ./devshell.toml;
27-
}
28-
) // {
17+
nixpkgs = nixpkgs.legacyPackages.${system};
18+
}
19+
);
20+
21+
devShells = eachSystem (system: {
22+
default = self.legacyPackages.${system}.fromTOML ./devshell.toml;
23+
});
2924

3025
templates = rec {
3126
toml = {

0 commit comments

Comments
 (0)