blob: 997d2a3baaa0a228cf0a59622ea10f027554f6cc (
plain)
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
|
# enstate, the program (README.md).
{
installShellFiles,
lib,
runCommand,
rustPlatform,
util-linux,
}:
rustPlatform.buildRustPackage {
pname = "enstate";
version = "0.0.1";
# Only what the build reads, each part on its own, never the whole checkout: a
# filter over the checkout can't tell its files apart below a symbolic link (Nix
# gives it the resolved paths), and lib.fileset refuses one.
src = runCommand "enstate-source" { } ''
mkdir $out
cp ${../Cargo.toml} $out/Cargo.toml
cp ${../Cargo.lock} $out/Cargo.lock
cp -r ${../src} $out/src
cp -r ${../tests} $out/tests
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --bash ${../share/bash-completion/completions/enstate}
'';
# The tests' fake systemctl looks at the store's lock with flock.
nativeCheckInputs = [ util-linux ];
cargoLock = {
lockFile = ../Cargo.lock;
outputHashes."config-0.1.0" = "sha256-uulfkMx4Nuh22xd7sujqQKSr9AikY8j0CgQygqvs/zw=";
};
meta = {
description = "State next to the Nix store: plan, apply, and make submissions";
mainProgram = "enstate";
platforms = lib.platforms.linux;
};
}
|