aboutsummaryrefslogtreecommitdiffstats
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/package.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nix/package.nix b/nix/package.nix
index ecaf41b..997d2a3 100644
--- a/nix/package.nix
+++ b/nix/package.nix
@@ -1,5 +1,6 @@
# enstate, the program (README.md).
{
+ installShellFiles,
lib,
runCommand,
rustPlatform,
@@ -21,6 +22,11 @@ rustPlatform.buildRustPackage {
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 ];