We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
tomlarray / flake.nix
1
{
2
description = "tomlarray";
3
4
inputs = {
5
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
6
fenix = {
7
url = "github:nix-community/fenix";
8
inputs.nixpkgs.follows = "nixpkgs";
9
};
10
};
11
12
outputs =
13
{
14
self,
15
nixpkgs,
16
fenix,
17
}:
18
let
19
systems = [
20
"aarch64-darwin"
21
"aarch64-linux"
22
"x86_64-darwin"
23
"x86_64-linux"
24
];
25
eachSystem = nixpkgs.lib.genAttrs systems;
26
in
27
{
28
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
29
30
packages = eachSystem (
31
system:
32
let
33
toolchain = fenix.packages.${system}.stable.minimalToolchain;
34
pkgs = nixpkgs.legacyPackages.${system};
35
in
36
rec {
37
default = tomlarray;
38
39
tomlarray =
40
(pkgs.makeRustPlatform {
41
cargo = toolchain;
42
rustc = toolchain;
43
}).buildRustPackage
44
{
45
pname = "tomlarray";
46
version = "0.1.0";
47
48
src = ./.;
49
50
cargoLock.lockFile = ./Cargo.lock;
51
};
52
}
53
);
54
55
devShells = eachSystem (
56
system:
57
let
58
pkgs = nixpkgs.legacyPackages.${system};
59
in
60
{
61
default = pkgs.mkShell {
62
name = "tomlarray";
63
64
packages = [
65
(fenix.packages.${system}.stable.withComponents [
66
"cargo"
67
"rustc"
68
"rust-analyzer"
69
"clippy"
70
"rustfmt"
71
"rust-src"
72
])
73
];
74
};
75
}
76
);
77
};
78
}
79