Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, installShellFiles }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "flavours"; 5 version = "0.7.1"; 6 7 src = fetchFromGitHub { 8 owner = "Misterio77"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-SOsHvcfDdUpb0x5VZ1vZJnGaIiWWOPgnAwKYNXzfUfI="; 12 }; 13 14 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 15 16 cargoHash = "sha256-aimPeGIE5jP0pdrqwnzUzBqW0jz9+kcfpLdCN0r30xU="; 17 18 nativeBuildInputs = [ installShellFiles ]; 19 20 postInstall = '' 21 installShellCompletion --cmd flavours \ 22 --zsh <($out/bin/flavours --completions zsh) \ 23 --fish <($out/bin/flavours --completions fish) \ 24 --bash <($out/bin/flavours --completions bash) 25 ''; 26 27 meta = with lib; { 28 description = "An easy to use base16 scheme manager/builder that integrates with any workflow"; 29 homepage = "https://github.com/Misterio77/flavours"; 30 changelog = "https://github.com/Misterio77/flavours/releases/tag/v${version}"; 31 license = licenses.mit; 32 maintainers = with maintainers; [ fortuneteller2k misterio77 ]; 33 }; 34}