biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / chafa / default.nix
bloba6a376abd9302b1783c16cd547a07a57f4c282b9
1 { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, which
2 , libxslt, libxml2, docbook_xml_dtd_412, docbook_xsl, glib, imagemagick
3 , Foundation
4 }:
6 stdenv.mkDerivation rec {
7   version = "1.14.4";
8   pname = "chafa";
10   src = fetchFromGitHub {
11     owner = "hpjansson";
12     repo = "chafa";
13     rev = version;
14     sha256 = "sha256-jrLlhpPWsc1aOEH36W6MbikAj1nAX8CinHKG+iRk+18=";
15   };
17   nativeBuildInputs = [ autoconf
18                         automake
19                         libtool
20                         pkg-config
21                         which
22                         libxslt
23                         libxml2
24                         docbook_xml_dtd_412
25                         docbook_xsl
26                       ];
28   buildInputs = [ glib imagemagick ]
29     ++ lib.optional stdenv.hostPlatform.isDarwin Foundation;
31   patches = [ ./xmlcatalog_patch.patch ];
33   preConfigure = ''
34     substituteInPlace ./autogen.sh --replace pkg-config '$PKG_CONFIG'
35     NOCONFIGURE=1 ./autogen.sh
36   '';
38   configureFlags = [ "--enable-man"
39                      "--with-xml-catalog=${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"
40                    ];
42   # https://github.com/NixOS/nixpkgs/pull/240893#issuecomment-1635347507
43   NIX_LDFLAGS = [ "-lwebp" ];
45   meta = with lib; {
46     description = "Terminal graphics for the 21st century";
47     homepage = "https://hpjansson.org/chafa/";
48     license = licenses.lgpl3Plus;
49     platforms = platforms.all;
50     maintainers = [ maintainers.mog ];
51     mainProgram = "chafa";
52   };