nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 callPackage,
3 fetchFromGitHub,
4 freetype,
5 gumbo,
6 harfbuzz,
7 jbig2dec,
8 lib,
9 libjpeg,
10 libz,
11 mujs,
12 mupdf,
13 openjpeg,
14 stdenv,
15 zig_0_14,
16}:
17stdenv.mkDerivation (finalAttrs: {
18 pname = "fancy-cat";
19 version = "0.4.0";
20
21 src = fetchFromGitHub {
22 owner = "freref";
23 repo = "fancy-cat";
24 tag = "v${finalAttrs.version}";
25 hash = "sha256-Wasxhsv4QhGscOEsGirabsq92963S8v1vOBWvAFuRoM=";
26 };
27
28 patches = [ ./0001-changes.patch ];
29
30 nativeBuildInputs = [
31 zig_0_14
32 ];
33
34 zigBuildFlags = [ "--release=fast" ];
35
36 buildInputs = [
37 mupdf
38 harfbuzz
39 freetype
40 jbig2dec
41 libjpeg
42 openjpeg
43 gumbo
44 mujs
45 libz
46 ];
47
48 postPatch = ''
49 ln -s ${callPackage ./build.zig.zon.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
50 '';
51
52 meta = {
53 broken = true; # build phase wants to fetch from github
54 description = "PDF viewer for terminals using the Kitty image protocol";
55 homepage = "https://github.com/freref/fancy-cat";
56 license = lib.licenses.agpl3Plus;
57 maintainers = with lib.maintainers; [ ciflire ];
58 mainProgram = "fancy-cat";
59 inherit (zig_0_14.meta) platforms;
60 };
61})