nixpkgs/pkgs/by-name/ca/catppuccin-catwalk/package.nix

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

54 lines
1.3 KiB
Nix
Raw Normal View History

2024-05-31 21:46:48 +00:00
{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
installShellFiles,
pkg-config,
libwebp,
2023-07-26 03:23:21 +00:00
}:
2024-05-31 21:46:48 +00:00
let
version = "1.3.2";
2024-05-31 21:46:48 +00:00
in
2023-08-30 09:32:14 +00:00
rustPlatform.buildRustPackage {
2023-07-26 03:23:21 +00:00
pname = "catppuccin-catwalk";
2024-05-31 21:46:48 +00:00
inherit version;
2023-07-26 03:23:21 +00:00
2023-08-30 09:32:14 +00:00
src = fetchFromGitHub {
owner = "catppuccin";
repo = "catwalk";
rev = "refs/tags/v${version}";
hash = "sha256-Yj9xTQJ0eu3Ymi2R9fgYwBJO0V+4bN4MOxXCJGQ8NjU=";
2023-07-26 03:23:21 +00:00
};
cargoHash = "sha256-bx7AvzPoMJqPa+zcn139lH2zyF09EIz7FNHnh1g8wis=";
2023-07-26 03:23:21 +00:00
2024-05-31 21:46:48 +00:00
nativeBuildInputs = [
installShellFiles
pkg-config
];
2023-09-13 09:01:16 +00:00
buildInputs = [ libwebp ];
2023-07-26 03:23:21 +00:00
2023-08-30 09:32:14 +00:00
postInstall = ''
installShellCompletion --cmd catwalk \
--bash <("$out/bin/catwalk" completion bash) \
--zsh <("$out/bin/catwalk" completion zsh) \
--fish <("$out/bin/catwalk" completion fish)
'';
2023-07-26 03:23:21 +00:00
doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
2023-09-13 09:01:16 +00:00
installCheckPhase = ''
runHook preInstallCheck
readelf -a $out/bin/catwalk | grep -F 'Shared library: [libwebp.so'
runHook postInstallCheck
'';
2024-05-31 21:46:48 +00:00
meta = {
2023-08-30 09:32:14 +00:00
homepage = "https://github.com/catppuccin/toolbox/tree/main/catwalk";
2023-07-26 03:23:21 +00:00
description = "CLI for Catppuccin that takes in four showcase images and displays them all at once";
2024-05-31 21:46:48 +00:00
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ryanccn ];
2023-08-30 09:32:14 +00:00
mainProgram = "catwalk";
2023-07-26 03:23:21 +00:00
};
}