-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
37 lines (33 loc) · 734 Bytes
/
default.nix
File metadata and controls
37 lines (33 loc) · 734 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
{
craneLib,
installShellFiles,
lib,
pkgs,
}:
craneLib.buildPackage {
pname = "overmask";
version = "0.1.0";
src =
let
shellFilesFilter = path: _type: builtins.match ".*/completions/.*" path != null;
shellOrCargo = path: type: (shellFilesFilter path type) || (craneLib.filterCargoSources path type);
in
lib.cleanSourceWith {
src = ./.;
filter = shellOrCargo;
name = "source";
};
nativeBuildInputs = with pkgs; [
installShellFiles
pkg-config
];
buildInputs = with pkgs; [
udev
];
postInstall = ''
installShellCompletion \
--bash completions/overmask.bash \
--fish completions/overmask.fish \
--zsh completions/_overmask
'';
}