Skip to content

Commit 3a02297

Browse files
committed
flake: use nix-systems
1 parent 3bf7711 commit 3a02297

File tree

2 files changed

+20
-34
lines changed

2 files changed

+20
-34
lines changed

flake.lock

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

flake.nix

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
inputs = {
77
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
8-
flake-utils.url = "github:numtide/flake-utils";
8+
systems.url = "github:nix-systems/default";
99
fenix = {
1010
url = "github:nix-community/fenix";
1111
inputs.nixpkgs.follows = "nixpkgs";
@@ -20,35 +20,39 @@
2020
{
2121
self,
2222
nixpkgs,
23-
flake-utils,
23+
systems,
2424
fenix,
2525
zombienet,
2626
...
2727
}:
28-
flake-utils.lib.eachDefaultSystem (
29-
system:
30-
let
31-
pkgs = import nixpkgs {
28+
let
29+
mkPkgs =
30+
system:
31+
import nixpkgs {
3232
inherit system;
3333
overlays = [
3434
fenix.overlays.default
3535
zombienet.overlays.default
3636
];
3737
};
38-
in
39-
{
40-
checks = {
38+
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f system (mkPkgs system));
39+
in
40+
{
41+
checks = eachSystem (
42+
system: pkgs: {
4143
buildAll = pkgs.symlinkJoin {
4244
name = "build-all-packages";
4345
paths = builtins.attrValues self.packages.${system};
4446
};
45-
};
46-
devShells = {
47+
}
48+
);
49+
devShells = eachSystem (
50+
system: pkgs: {
4751
default = import ./shell.nix { inherit pkgs; };
48-
};
49-
packages = import ./pkgs { inherit pkgs; };
50-
}
51-
)
52+
}
53+
);
54+
packages = eachSystem (system: pkgs: import ./pkgs { inherit pkgs; });
55+
}
5256
// {
5357
overlays = {
5458
default =

0 commit comments

Comments
 (0)