forked from TwentyTwoHW/portal-software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
43 lines (36 loc) · 955 Bytes
/
default.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
{
pkgs,
craneLib
}:
let
customFilter = path: builtins.match ".*\.(fl|hb)$" path != null;
customFilterOrCargo = path: type:
(customFilter path) || (craneLib.filterCargoSources path type);
src = pkgs.lib.cleanSourceWith {
src = craneLib.path ../.;
filter = customFilterOrCargo;
};
in
craneLib.buildPackage {
pname = "portal-emulator";
version = (craneLib.crateNameFromCargoToml { cargoToml = ./Cargo.toml; }).version;
nativeBuildInputs = [
pkgs.git
pkgs.cmake
pkgs.pkg-config
];
buildInputs = [
pkgs.fltk
pkgs.pango
];
inherit src;
strictDeps = true;
cargoExtraArgs = "-p emulator --bin gui";
doCheck = false; # Emulator tests require the firmware to be available
meta = with pkgs.lib; {
description = "Emulator of the Portal hardware wallet";
homepage = "https://github.com/TwentyTwoHW/portal-software.git";
license = licenses.gpl3Plus;
maintainers = [];
};
}