depot/third_party/nixpkgs/pkgs/development/tools/misc/catppuccin-catwalk/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

48 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, pkg-config
, libwebp
}:
rustPlatform.buildRustPackage {
pname = "catppuccin-catwalk";
version = "0.1.0";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "toolbox";
rev = "b38153e94622bab574224bb24a6ae953b3a849da";
hash = "sha256-zZRl6Xem41pBQmEoK24YR4TKiQ84nU5phBih2TF8G8g=";
};
buildAndTestSubdir = "catwalk";
cargoHash = "sha256-KoxivYLzJEjWbxIkizrMpmVwUF7bfVxl13H774lzQRg=";
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ libwebp ];
postInstall = ''
installShellCompletion --cmd catwalk \
--bash <("$out/bin/catwalk" completion bash) \
--zsh <("$out/bin/catwalk" completion zsh) \
--fish <("$out/bin/catwalk" completion fish)
'';
doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
installCheckPhase = ''
runHook preInstallCheck
readelf -a $out/bin/catwalk | grep -F 'Shared library: [libwebp.so'
runHook postInstallCheck
'';
meta = with lib; {
homepage = "https://github.com/catppuccin/toolbox/tree/main/catwalk";
description = "A CLI for Catppuccin that takes in four showcase images and displays them all at once";
license = licenses.mit;
maintainers = with maintainers; [ ryanccn ];
mainProgram = "catwalk";
};
}