2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
installShellFiles,
|
|
|
|
pkg-config,
|
|
|
|
libwebp,
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
2024-06-05 15:53:02 +00:00
|
|
|
let
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.3.2";
|
2024-06-05 15:53:02 +00:00
|
|
|
in
|
2023-10-09 19:29:22 +00:00
|
|
|
rustPlatform.buildRustPackage {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "catppuccin-catwalk";
|
2024-06-05 15:53:02 +00:00
|
|
|
inherit version;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "catppuccin";
|
2024-06-20 14:57:18 +00:00
|
|
|
repo = "catwalk";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Yj9xTQJ0eu3Ymi2R9fgYwBJO0V+4bN4MOxXCJGQ8NjU=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
cargoHash = "sha256-bx7AvzPoMJqPa+zcn139lH2zyF09EIz7FNHnh1g8wis=";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [ libwebp ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2023-10-09 19:29:22 +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-08-04 22:07:22 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
|
2023-10-09 19:29:22 +00:00
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
readelf -a $out/bin/catwalk | grep -F 'Shared library: [libwebp.so'
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/catppuccin/toolbox/tree/main/catwalk";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "CLI for Catppuccin that takes in four showcase images and displays them all at once";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ ryanccn ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "catwalk";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
}
|