diff --git a/pkgs/tools/misc/miniserve/default.nix b/pkgs/tools/misc/miniserve/default.nix index 6843506cb8e..1223432ad7d 100644 --- a/pkgs/tools/misc/miniserve/default.nix +++ b/pkgs/tools/misc/miniserve/default.nix @@ -2,6 +2,7 @@ , stdenv , rustPlatform , fetchFromGitHub +, installShellFiles , pkg-config , zlib , libiconv @@ -10,22 +11,29 @@ rustPlatform.buildRustPackage rec { pname = "miniserve"; - version = "0.12.1"; + version = "0.13.0"; src = fetchFromGitHub { owner = "svenstaro"; repo = "miniserve"; rev = "v${version}"; - sha256 = "sha256-1LyDwQWC8cb3Sq8lZ9eDpZMcu5/yh0BJFuOWQ3iTtpY="; + sha256 = "sha256-1nXhAYvvvUQb0RcWidsRMQOhU8eXt7ngzodsMkYvqvg="; }; - cargoSha256 = "sha256-11aP0/p9wC9o1KuM+CLAuHhZxuYff6nvJPj0/yjb1+E="; + cargoSha256 = "sha256-P5ukE7eXBRJMrc7+T9/TMq2uGs0AuZliHTtoqiZXNZw="; - nativeBuildInputs = [ pkg-config zlib ]; + nativeBuildInputs = [ installShellFiles pkg-config zlib ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; checkFlags = [ "--skip=cant_navigate_up_the_root" ]; + postInstall = '' + installShellCompletion --cmd miniserve \ + --bash <($out/bin/miniserve --print-completions bash) \ + --fish <($out/bin/miniserve --print-completions fish) \ + --zsh <($out/bin/miniserve --print-completions zsh) + ''; + meta = with lib; { description = "For when you really just want to serve some files over HTTP right now!"; homepage = "https://github.com/svenstaro/miniserve";