2021-07-03 03:11:41 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, installShellFiles }:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "flavours";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.7.1";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Misterio77";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-SOsHvcfDdUpb0x5VZ1vZJnGaIiWWOPgnAwKYNXzfUfI=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoHash = "sha256-aimPeGIE5jP0pdrqwnzUzBqW0jz9+kcfpLdCN0r30xU=";
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2021-07-03 03:11:41 +00:00
|
|
|
installShellCompletion --cmd flavours \
|
|
|
|
--zsh <($out/bin/flavours --completions zsh) \
|
|
|
|
--fish <($out/bin/flavours --completions fish) \
|
|
|
|
--bash <($out/bin/flavours --completions bash)
|
|
|
|
'';
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Easy to use base16 scheme manager/builder that integrates with any workflow";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/Misterio77/flavours";
|
|
|
|
changelog = "https://github.com/Misterio77/flavours/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ moni misterio77 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "flavours";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
}
|