Merge pull request #258385 from marsam/dufs-completions
dufs: install completions
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
, stdenv
|
, stdenv
|
||||||
, darwin
|
, darwin
|
||||||
}:
|
}:
|
||||||
@@ -18,6 +19,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-HZiWmqIh21b12DP+hnx1pWBWgSa5j71kp6GCRKGMHv0=";
|
cargoHash = "sha256-HZiWmqIh21b12DP+hnx1pWBWgSa5j71kp6GCRKGMHv0=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [
|
buildInputs = lib.optionals stdenv.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.Security
|
darwin.apple_sdk.frameworks.Security
|
||||||
];
|
];
|
||||||
@@ -30,6 +33,13 @@ rustPlatform.buildRustPackage rec {
|
|||||||
"--skip=validate_printed_urls"
|
"--skip=validate_printed_urls"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd dufs \
|
||||||
|
--bash <($out/bin/dufs --completions bash) \
|
||||||
|
--fish <($out/bin/dufs --completions fish) \
|
||||||
|
--zsh <($out/bin/dufs --completions zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A file server that supports static serving, uploading, searching, accessing control, webdav";
|
description = "A file server that supports static serving, uploading, searching, accessing control, webdav";
|
||||||
homepage = "https://github.com/sigoden/dufs";
|
homepage = "https://github.com/sigoden/dufs";
|
||||||
|
|||||||
Reference in New Issue
Block a user