-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
32 lines (32 loc) · 1.02 KB
/
default.nix
File metadata and controls
32 lines (32 loc) · 1.02 KB
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
{ pkgs, ... }:
let
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
in
pkgs.rustPlatform.buildRustPackage rec {
pname = manifest.name;
version = manifest.version;
description = manifest.description;
license = manifest.license;
homepage = manifest.repository;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
checkFlags = [
# We skip these tests because they rely on creating containers to simulate
# IMAP functionality
"--skip=imap_tests"
];
nativeBuildInputs = with pkgs; [
pkg-config
installShellFiles
];
buildInputs = with pkgs; [
openssl
sqlite
];
postInstall = ''
find . -name "*.1" -type f | while read -r file; do installManPage "$file"; done
find . -name "*.bash" -type f | while read -r file; do installShellCompletion --bash "$file"; done
find . -name "*.fish" -type f | while read -r file; do installShellCompletion --fish "$file"; done
find . -name "_*" -type f | while read -r file; do installShellCompletion --zsh "$file"; done
'';
}