Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ca / catppuccin-catwalk / package.nix
blob981bc6da239ad0005ade6aa2891f40ce76af1802
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   rustPlatform,
6   installShellFiles,
7   pkg-config,
8   libwebp,
9 }:
10 let
11   version = "1.3.2";
13 rustPlatform.buildRustPackage {
14   pname = "catppuccin-catwalk";
15   inherit version;
17   src = fetchFromGitHub {
18     owner = "catppuccin";
19     repo = "catwalk";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-Yj9xTQJ0eu3Ymi2R9fgYwBJO0V+4bN4MOxXCJGQ8NjU=";
22   };
24   cargoHash = "sha256-bx7AvzPoMJqPa+zcn139lH2zyF09EIz7FNHnh1g8wis=";
26   nativeBuildInputs = [
27     installShellFiles
28     pkg-config
29   ];
30   buildInputs = [ libwebp ];
32   postInstall = ''
33     installShellCompletion --cmd catwalk \
34       --bash <("$out/bin/catwalk" completion bash) \
35       --zsh <("$out/bin/catwalk" completion zsh) \
36       --fish <("$out/bin/catwalk" completion fish)
37   '';
39   doInstallCheck = !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isElf;
40   installCheckPhase = ''
41     runHook preInstallCheck
42     readelf -a $out/bin/catwalk | grep -F 'Shared library: [libwebp.so'
43     runHook postInstallCheck
44   '';
46   meta = {
47     homepage = "https://github.com/catppuccin/toolbox/tree/main/catwalk";
48     description = "CLI for Catppuccin that takes in four showcase images and displays them all at once";
49     license = lib.licenses.mit;
50     maintainers = with lib.maintainers; [ ryanccn ];
51     mainProgram = "catwalk";
52   };