Skip to content

Commit bfc5a55

Browse files
committed
style(flake): Restyle Nix using auto formatter
This is the styling use by both: * `nix run github:NixOS/nixfmt` and * `nix run nixpkgs#nixfmt-rfc-style`
1 parent 784af41 commit bfc5a55

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

default.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# SPDX-FileCopyrightText: © 2021 Caleb Maclennan <[email protected]>
22
# SPDX-License-Identifier: GPL-3.0-only
3-
{ lib
4-
, libgit2
5-
, naersk
6-
, stdenv
7-
, cargo
8-
, rustc
3+
{
4+
lib,
5+
libgit2,
6+
naersk,
7+
stdenv,
8+
cargo,
9+
rustc,
910
}:
1011
let
1112
cargoToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml));

flake.nix

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@
77
naersk.url = "github:nix-community/naersk";
88
naersk.inputs.nixpkgs.follows = "nixpkgs";
99
};
10-
outputs = { self, nixpkgs, naersk }:
10+
outputs =
11+
{
12+
self,
13+
nixpkgs,
14+
naersk,
15+
}:
1116
let
1217
cargoToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml));
13-
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
18+
supportedSystems = [
19+
"x86_64-linux"
20+
"aarch64-linux"
21+
"x86_64-darwin"
22+
];
1423
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
15-
pkgsFor = forAllSystems (system:
24+
pkgsFor = forAllSystems (
25+
system:
1626
import nixpkgs {
1727
inherit system;
1828
overlays = [ self.overlays.default ];
19-
});
29+
}
30+
);
2031
in
2132
{
2233
overlays.default = final: prev: {
@@ -26,7 +37,8 @@
2637
default = pkgsFor.${system}.${cargoToml.package.name};
2738
${cargoToml.package.name} = pkgsFor.${system}.${cargoToml.package.name};
2839
});
29-
devShells = forAllSystems (system:
40+
devShells = forAllSystems (
41+
system:
3042
let
3143
pkgs = pkgsFor.${system};
3244
in
@@ -37,6 +49,7 @@
3749
libgit2
3850
];
3951
};
40-
});
52+
}
53+
);
4154
};
4255
}

0 commit comments

Comments
 (0)