1 { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, which
2 , libxslt, libxml2, docbook_xml_dtd_412, docbook_xsl, glib, imagemagick
6 stdenv.mkDerivation rec {
10 src = fetchFromGitHub {
14 sha256 = "sha256-jrLlhpPWsc1aOEH36W6MbikAj1nAX8CinHKG+iRk+18=";
17 nativeBuildInputs = [ autoconf
28 buildInputs = [ glib imagemagick ]
29 ++ lib.optional stdenv.hostPlatform.isDarwin Foundation;
31 patches = [ ./xmlcatalog_patch.patch ];
34 substituteInPlace ./autogen.sh --replace pkg-config '$PKG_CONFIG'
35 NOCONFIGURE=1 ./autogen.sh
38 configureFlags = [ "--enable-man"
39 "--with-xml-catalog=${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"
42 # https://github.com/NixOS/nixpkgs/pull/240893#issuecomment-1635347507
43 NIX_LDFLAGS = [ "-lwebp" ];
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";