diff options
Diffstat (limited to 'pkgs/tools/text/mdbook/default.nix')
-rw-r--r-- | pkgs/tools/text/mdbook/default.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/tools/text/mdbook/default.nix b/pkgs/tools/text/mdbook/default.nix index 80afa953308..95483b8465e 100644 --- a/pkgs/tools/text/mdbook/default.nix +++ b/pkgs/tools/text/mdbook/default.nix @@ -1,20 +1,29 @@ -{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices }: +{ lib, stdenv, fetchFromGitHub, nix, rustPlatform, CoreServices, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "mdbook"; - version = "0.4.34"; + version = "0.4.35"; src = fetchFromGitHub { owner = "rust-lang"; repo = "mdBook"; rev = "refs/tags/v${version}"; - sha256 = "sha256-QkgsFnX6J0ZgXCzGE/dTNLxdXLhCFwLsZCvmZ4SU4Zs="; + sha256 = "sha256-oplR34M2PbcIwrfIkA4Ttk2zt3ve883TfXGIDnfJt/4="; }; - cargoHash = "sha256-Dhblzn7NytYeY76RmvI8cNjChnCSnTPadxPKyU5QT1Q="; + cargoHash = "sha256-D0XhrweO0A1+81Je4JZ0lmnbIHstNvefpmogCyB4FEE="; + + nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd mdbook \ + --bash <($out/bin/mdbook completions bash) \ + --fish <($out/bin/mdbook completions fish) \ + --zsh <($out/bin/mdbook completions zsh ) + ''; + passthru = { tests = { inherit nix; |