Skip to content

Commit c4f3d94

Browse files
committed
refactor: switch from numtide/flake-utils to flake-parts
1 parent 7515ee3 commit c4f3d94

File tree

2 files changed

+60
-29
lines changed

2 files changed

+60
-29
lines changed

flake.lock

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

flake.nix

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,35 @@
99
};
1010

1111
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
12-
13-
utils.url = "github:numtide/flake-utils";
1412
};
1513

16-
outputs = { self, flake-compat, nixpkgs, utils }:
17-
# For each supported platform,
18-
utils.lib.eachDefaultSystem (system:
19-
let
14+
outputs = inputs @ {flake-parts, ...}:
15+
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
16+
flake = {
17+
overlays.default = import ./pkgs/phps.nix inputs.nixpkgs;
18+
};
19+
20+
systems = [
21+
"x86_64-linux"
22+
"x86_64-darwin"
23+
"aarch64-linux"
24+
"aarch64-darwin"
25+
];
26+
27+
perSystem = {
28+
config,
29+
pkgs,
30+
system,
31+
...
32+
}: let
2033
# Let’s merge the package set from Nixpkgs with our custom PHP versions.
21-
pkgs = import nixpkgs.outPath {
34+
pkgs = import inputs.nixpkgs {
2235
config = {
2336
allowUnfree = true;
2437
};
2538
inherit system;
2639
overlays = [
27-
self.overlays.default
40+
inputs.self.overlays.default
2841
];
2942
};
3043
in rec {
@@ -35,8 +48,6 @@
3548
checks = import ./checks.nix {
3649
inherit packages pkgs system;
3750
};
38-
}
39-
) // {
40-
overlays.default = import ./pkgs/phps.nix nixpkgs.outPath;
51+
};
4152
};
4253
}

0 commit comments

Comments
 (0)