depot/third_party/nixpkgs/pkgs/development/tools/misc/catppuccin-catwalk/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

49 lines
1.4 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.parsed.kernel.execFormat == lib.systems.parse.execFormats.elf;
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";
};
}