-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
82 lines (77 loc) · 1.85 KB
/
Copy pathflake.nix
File metadata and controls
82 lines (77 loc) · 1.85 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
76
77
78
79
80
81
82
{
inputs = {
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
systems,
nixpkgs,
naersk,
}:
let
pkgs = eachSystem (
system:
import nixpkgs {
inherit system;
overlays = [ naersk.overlays.default ];
}
);
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = eachSystem (
system:
let
naersk = pkgs.${system}.naersk;
in
rec {
default = tag;
tag = naersk.buildPackage {
src = ./.;
doCheck = true;
};
tag-view = naersk.buildPackage {
pname = "tag-view";
src = ./.;
overrideMain = old: {
preConfigure = ''
cargo_build_options="$cargo_build_options --example tag-view"
'';
};
};
tag-organize = naersk.buildPackage {
pname = "tag-organize";
src = ./.;
overrideMain = old: {
preConfigure = ''
cargo_build_options="$cargo_build_options --example tag-organize"
'';
};
};
}
);
devShells = eachSystem (system: {
default =
with pkgs.${system};
mkShell {
buildInputs = [
cargo
cargo-edit
cargo-tarpaulin
rust-analyzer
rustc
rustfmt
rustPackages.clippy
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
PROPTEST_DISABLE_FAILURE_PERSISTENCE = 1;
};
});
};
}