Merge pull request #254911 from yu-re-ka/webp-catppucin-catwalk

catppucin-catwalk: use system libwebp
This commit is contained in:
Pierre Bourdon 2023-09-14 17:52:33 +02:00 committed by GitHub
commit 019809f1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,10 @@
{ lib
{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, pkg-config
, libwebp
}:
rustPlatform.buildRustPackage {
@ -18,7 +21,8 @@ rustPlatform.buildRustPackage {
buildAndTestSubdir = "catwalk";
cargoHash = "sha256-KoxivYLzJEjWbxIkizrMpmVwUF7bfVxl13H774lzQRg=";
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ libwebp ];
postInstall = ''
installShellCompletion --cmd catwalk \
@ -27,6 +31,14 @@ rustPlatform.buildRustPackage {
--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";