forked from numtide/system-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
48 lines (42 loc) · 811 Bytes
/
package.nix
File metadata and controls
48 lines (42 loc) · 811 Bytes
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
{
lib,
rustPlatform,
cargo,
dbus,
pkg-config,
nix,
clippy,
}:
let
cargoManifest = lib.importTOML ./Cargo.toml;
in
rustPlatform.buildRustPackage {
pname = "system-manager";
version = cargoManifest.workspace.package.version;
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./crates
./templates
];
};
cargoLock.lockFile = ./Cargo.lock;
buildInputs = [ dbus ];
nativeBuildInputs = [
pkg-config
];
nativeCheckInputs = [
clippy
nix
cargo
];
preCheck = ''
cargo clippy
# Stop the Nix command from trying to create /nix/var/nix/profiles.
#
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-profile#profiles
export NIX_STATE_DIR=$TMPDIR
'';
}