Skip to content

Commit d6aaaeb

Browse files
nix: replace statix with nixf-diagnose
The latter is the better static analyzer for Nix today.
1 parent e2c2934 commit d6aaaeb

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in
1616
, # Nix files that describe the Nixpkgs repository. We evaluate the expression
1717
# using `import` below.
1818
nixpkgs ? let inherit (nixpkgsVersion) owner repo rev tarballHash; in
19-
builtins.fetchTarball {
19+
fetchTarball {
2020
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
2121
sha256 = tarballHash;
2222
}
@@ -44,7 +44,7 @@ let
4444
inherit (lock.nodes.treefmt-nix) locked;
4545
inherit (locked) owner repo rev;
4646
in
47-
builtins.fetchTarball {
47+
fetchTarball {
4848
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
4949
sha256 = locked.narHash;
5050
};

nix/overlays/build-toolbox.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
, extra ? { }
66
}:
77
let
8-
bash-completion = builtins.map (tool: (builtins.getAttr tool tools).bash-completion) (builtins.attrNames tools);
8+
bash-completion = map (tool: (builtins.getAttr tool tools).bash-completion) (builtins.attrNames tools);
99

1010
env = buildEnv {
1111
inherit name;
12-
paths = builtins.map (tool: (builtins.getAttr tool tools).bin) (builtins.attrNames tools);
12+
paths = map (tool: (builtins.getAttr tool tools).bin) (builtins.attrNames tools);
1313
};
1414

1515
in

nix/tools/withTools.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ let
157157
withPgAll =
158158
let
159159
runners =
160-
builtins.map
160+
map
161161
(version:
162162
''
163163
cat << EOF
@@ -333,7 +333,7 @@ buildToolbox
333333
withPgrst;
334334
} // builtins.listToAttrs (
335335
# Create a `postgrest-with-pg-` for each PostgreSQL version
336-
builtins.map (pg: { inherit (pg) name; value = withTmpDb pg; }) postgresqlVersions
336+
map (pg: { inherit (pg) name; value = withTmpDb pg; }) postgresqlVersions
337337
);
338338
# make latest withPg available for other nix files
339339
extra = { inherit withPg; };

nix/treefmt.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ in
2222
programs.black.enable = true;
2323
programs.deadnix.enable = true;
2424
programs.hlint.enable = true;
25+
programs.nixf-diagnose.enable = true;
2526
programs.nixpkgs-fmt.enable = true;
2627
programs.ruff-check.enable = true;
27-
programs.statix.enable = true;
2828
programs.stylish-haskell.enable = true;
2929

3030
settings.formatter.hlint.options = [

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ lib.overrideDerivation postgrest.env (
5454
5555
''
5656
+ builtins.concatStringsSep "\n" (
57-
builtins.map (bash-completion: "source ${bash-completion}") (
58-
builtins.concatLists (builtins.map (toolbox: toolbox.bash-completion) toolboxes)
57+
map (bash-completion: "source ${bash-completion}") (
58+
builtins.concatLists (map (toolbox: toolbox.bash-completion) toolboxes)
5959
)
6060
);
6161
}

0 commit comments

Comments
 (0)