nixpkgs/pkgs/by-name/fl/flavours/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
libiconv,
installShellFiles,
}:
2021-02-05 11:58:42 +00:00
rustPlatform.buildRustPackage rec {
pname = "flavours";
2023-05-02 19:30:39 +00:00
version = "0.7.1";
2021-02-05 11:58:42 +00:00
src = fetchFromGitHub {
owner = "Misterio77";
repo = pname;
rev = "v${version}";
2023-05-02 19:30:39 +00:00
hash = "sha256-SOsHvcfDdUpb0x5VZ1vZJnGaIiWWOPgnAwKYNXzfUfI=";
2021-02-05 11:58:42 +00:00
};
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
2023-05-02 19:30:39 +00:00
cargoHash = "sha256-aimPeGIE5jP0pdrqwnzUzBqW0jz9+kcfpLdCN0r30xU=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd flavours \
--zsh <($out/bin/flavours --completions zsh) \
--fish <($out/bin/flavours --completions fish) \
--bash <($out/bin/flavours --completions bash)
'';
2021-02-05 11:58:42 +00:00
meta = with lib; {
description = "Easy to use base16 scheme manager/builder that integrates with any workflow";
homepage = "https://github.com/Misterio77/flavours";
changelog = "https://github.com/Misterio77/flavours/releases/tag/v${version}";
license = licenses.mit;
2023-11-17 10:03:27 +00:00
maintainers = with maintainers; [
moni
misterio77
];
2024-02-11 02:19:15 +00:00
mainProgram = "flavours";
2021-02-05 11:58:42 +00:00
};
}