From bb56927c2cc483e62b4e11d95cd926ff62699025 Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Mon, 28 Jun 2021 18:09:24 -0300 Subject: [PATCH] flavours: 0.4.0 -> 0.5.0 Update to follow upstream Add shell (bash, zsh, fish) completions --- pkgs/applications/misc/flavours/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/flavours/default.nix b/pkgs/applications/misc/flavours/default.nix index fcedf65af713..cc82a85113af 100644 --- a/pkgs/applications/misc/flavours/default.nix +++ b/pkgs/applications/misc/flavours/default.nix @@ -1,20 +1,29 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }: +{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "flavours"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "Misterio77"; repo = pname; rev = "v${version}"; - sha256 = "sha256-rDy859jg+F8XC4sJogIgdn1FoT8cf7S+KORt+7kboAc="; + sha256 = "1bgi6p7l0bh9k4vkwvngk7q19ynia0z1ninb1cq8qnwwpll6kbya"; }; buildInputs = [ ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; - cargoSha256 = "sha256-I8ZH35L2CVLy6ypmdOPd8VEG/sQeGaHyT1HWNdwyZVo="; + cargoSha256 = "sha256:07hwxhfcbqbwb3hz18w92h1lhdiwwy7abhwpimzx7syyavp4rmn4"; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + $out/bin/flavours --completions bash > flavours.bash + $out/bin/flavours --completions fish > flavours.fish + $out/bin/flavours --completions zsh > _flavours + installShellCompletion --zsh _flavours --fish flavours.fish --bash flavours.bash + ''; meta = with lib; { description = "An easy to use base16 scheme manager/builder that integrates with any workflow";