forked from oxidecomputer/humility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
humility.nix
48 lines (42 loc) · 893 Bytes
/
humility.nix
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,
stdenv,
rustPlatform,
cargo,
pkg-config,
systemd ? null,
AppKit ? null,
libusb1,
cargo-readme,
src,
version,
doCheck ? false,
}:
rustPlatform.buildRustPackage rec {
inherit src version doCheck;
name = "humility";
cargoSha256 = "sha256-ecMEVTi1uFBZToyDhczzu6QuKzjcXI2so4draQKwXmk";
nativeBuildInputs =
[
pkg-config
cargo-readme
cargo
]
++ lib.optionals stdenv.isDarwin [AppKit];
buildInputs =
[
libusb1
cargo-readme
]
++ lib.optionals stdenv.isLinux [systemd];
checkPhase = ''
${cargo}/bin/cargo fmt --all --check
${cargo}/bin/cargo clippy --all --profile=ci -- -D warnings
${cargo}/bin/cargo test
'';
meta = with lib; {
description = "Humility is the debugger for Hubris";
homepage = "https://github.com/oxidecomputer/humility";
license = licenses.mpl20;
};
}