forked from fulsomenko/kanban
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
42 lines (35 loc) · 900 Bytes
/
Copy pathdefault.nix
File metadata and controls
42 lines (35 loc) · 900 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
{
lib,
pkgs,
rustPlatform,
src,
gitRev ? null,
withTui ? true,
}:
let
cargoToml = lib.importTOML ./Cargo.toml;
in
rustPlatform.buildRustPackage {
pname = "kanban";
inherit (cargoToml.workspace.package) version;
inherit src;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = lib.optionals (pkgs.stdenv.isLinux && withTui) [
pkgs.wayland
pkgs.xorg.libxcb
];
cargoBuildFlags = [ "--package" "kanban-cli" ]
++ lib.optionals (!withTui) [ "--no-default-features" ];
doCheck = false;
preBuild = lib.optionalString (gitRev != null) ''
export GIT_COMMIT_HASH="${gitRev}"
'';
meta = {
inherit (cargoToml.workspace.package) description homepage;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fulsomenko ];
mainProgram = "kanban";
platforms = lib.platforms.all;
};
}