Skip to content

Commit 1ca1b65

Browse files
committed
nix: Switch formatter from nixpkgs-fmt to nixfmt
nixpkgs-fmt was archived[1] in favour of nixfmt[2], which implements the Nix RFC 166[3]. See NixOS/nixfmt#153 for further details about the progress of the implementation. [1]: https://x.com/zimbatm/status/1816148339131343058 [2]: https://github.com/NixOS/nixfmt?tab=readme-ov-file#readme [3]: https://github.com/nix-rfc-101/rfcs/blob/aaf1613f/rfcs/0166-nix-formatting.md
1 parent c89f23c commit 1ca1b65

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

flake.nix

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,44 @@
1515

1616
inputs.flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1.*.tar.gz";
1717

18-
outputs = { self, nixpkgs, ruby-nix, bundix, flake-schemas }:
18+
outputs =
19+
{
20+
self,
21+
nixpkgs,
22+
ruby-nix,
23+
bundix,
24+
flake-schemas,
25+
}:
1926
let
2027
allSystems = [
2128
"x86_64-linux"
2229
"aarch64-darwin"
2330
];
2431

25-
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
26-
# Current 'ruby' package version: 3.3.4
27-
# Should match https://github.com/actions/jekyll-build-pages/blob/v1.0.13/Dockerfile
28-
pkgs = import nixpkgs { inherit system; };
29-
});
32+
forAllSystems =
33+
f:
34+
nixpkgs.lib.genAttrs allSystems (
35+
system:
36+
f {
37+
# Current 'ruby' package version: 3.3.4
38+
# Should match https://github.com/actions/jekyll-build-pages/blob/v1.0.13/Dockerfile
39+
pkgs = import nixpkgs { inherit system; };
40+
}
41+
);
3042
in
3143
{
3244
inherit (flake-schemas) schemas;
3345

34-
formatter = forAllSystems ({ pkgs }: pkgs.nixpkgs-fmt);
46+
formatter = forAllSystems ({ pkgs }: pkgs.nixfmt-rfc-style);
3547

36-
devShells = forAllSystems ({ pkgs }:
48+
devShells = forAllSystems (
49+
{ pkgs }:
3750
let
38-
ruby-env = (ruby-nix.lib pkgs {
39-
name = "github-pages";
40-
gemset = ./gemset.nix;
41-
}).env;
51+
ruby-env =
52+
(ruby-nix.lib pkgs {
53+
name = "github-pages";
54+
gemset = ./gemset.nix;
55+
}).env;
4256

4357
bundix-cli = bundix.packages.${pkgs.system}.default;
4458

0 commit comments

Comments
 (0)