-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathflake.nix
More file actions
75 lines (72 loc) · 2.06 KB
/
Copy pathflake.nix
File metadata and controls
75 lines (72 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
description = "Flake for sliding_features-rs";
inputs = {
nixpks.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
rust = pkgs.rust-bin.selectLatestNightlyWith (toolchain:
toolchain.default.override {
extensions = [
"rust-src"
"rust-analyzer"
"miri"
"clippy"
];
targets = ["x86_64-unknown-linux-gnu"];
});
cargo_upgrades = pkgs.rustPlatform.buildRustPackage {
name = "cargo-upgrades";
src = builtins.fetchGit {
url = "https://gitlab.com/kornelski/cargo-upgrades";
rev = "95e1d282dd165c69f0eb4dc66a09db5265734f54";
};
useFetchCargoVendor = true;
cargoHash = "sha256-yEUfWe4/kSvBPx3xneff45+K3Gix2QXDjUesm+psUxI=";
doCheck = false; # Tests fail at the current revision.
meta = {
description = "Check for outdated dependencies in a cargo workspace";
homepage = "https://gitlab.com/kornelski/cargo-upgrades";
};
};
buildInputs = with pkgs; [
rust
openssl
protobuf
clang
pkg-config
fontconfig
cmake
];
tools = with pkgs; [
yamlfmt
taplo
cargo-semver-checks
cargo_upgrades
cargo-mutants
];
nix_tools = with pkgs; [
alejandra # Nix code formatter
deadnix # Nix dead code checker.
statix # Nix static code checker.
];
in
with pkgs; {
devShells.default = mkShell {
buildInputs = buildInputs ++ tools ++ nix_tools;
};
}
);
}