-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.nix
43 lines (43 loc) · 905 Bytes
/
package.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
{
lib,
callPackage,
rustPlatform,
pkg-config,
openssl,
sqlite,
clippy,
}:
let
# TODO(jared): use `finalAttrs` once buildRustPackage supports it
# https://github.com/NixOS/nixpkgs/pull/194475
package = rustPlatform.buildRustPackage {
pname = "webauthn-tiny";
version = "0.2.3";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./templates
./src
];
};
cargoLock.lockFile = ./Cargo.lock;
strictDeps = true;
nativeCheckInputs = [
clippy
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
sqlite
openssl
];
preCheck = ''
echo "Running clippy..."
cargo clippy -- -Dwarnings
'';
passthru.tests.nixos = callPackage ./test.nix { inherit package; };
meta.mainProgram = "webauthn-tiny";
};
in
package