forked from crocuda/pipelight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
41 lines (36 loc) · 844 Bytes
/
Copy pathpackage.nix
File metadata and controls
41 lines (36 loc) · 844 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
{
pkgs ? import <nixpkgs> {},
lib,
installShellFiles,
...
}:
pkgs.rustPlatform.buildRustPackage rec {
pname = "pipelight";
version = (builtins.fromTOML (lib.readFile ./pipelight/Cargo.toml)).package.version;
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
# disable tests
checkType = "debug";
doCheck = false;
nativeBuildInputs = with pkgs; [
pkg-config
installShellFiles
];
buildInputs = with pkgs;
[
openssl
]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
IOKit
Security
]);
postInstall = ''
installShellCompletion --bash ./autocompletion/${pname}.bash
installShellCompletion --fish ./autocompletion/${pname}.fish
installShellCompletion --zsh ./autocompletion/_${pname}
'';
}