Skip to content

Commit f70d442

Browse files
committed
fixup bad nix writing from long, long ago
1 parent 0932622 commit f70d442

File tree

3 files changed

+27
-38
lines changed

3 files changed

+27
-38
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ trim_trailing_whitespace = true
1313
charset = utf-8
1414
indent_size = 4
1515

16-
[*.json]
16+
[*.{json,nix}]
1717
indent_size = 2

flake.lock

+3-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+23-18
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,30 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6-
flake-utils.url = "github:numtide/flake-utils";
76
};
87

9-
outputs = { self, nixpkgs, flake-utils }:
10-
flake-utils.lib.eachDefaultSystem (system:
11-
let
12-
name = "elm-either";
8+
outputs = { self, nixpkgs, ... }@inputs:
9+
let
10+
name = "elm-either";
1311

14-
pkgs = import nixpkgs { inherit system; };
15-
in
16-
rec {
17-
inherit name;
18-
devShell = pkgs.mkShell {
19-
inherit name;
20-
nativeBuildInputs = with pkgs; [
21-
elmPackages.elm
22-
elmPackages.elm-format
23-
];
24-
};
25-
}
26-
);
12+
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.platforms.unix;
13+
14+
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
15+
in
16+
{
17+
devShells = forAllSystems (system:
18+
let pkgs = nixpkgsFor.${system}; in
19+
{
20+
${name} = pkgs.mkShell {
21+
inherit name;
22+
buildInputs = with pkgs; [
23+
nixpkgs-fmt
24+
elmPackages.elm
25+
elmPackages.elm-format
26+
];
27+
};
28+
29+
default = self.devShells.${system}.${name};
30+
});
31+
};
2732
}

0 commit comments

Comments
 (0)