2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, which
|
|
|
|
, libxslt, libxml2, docbook_xml_dtd_412, docbook_xsl, glib, imagemagick
|
|
|
|
, Foundation
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.14.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "chafa";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hpjansson";
|
|
|
|
repo = "chafa";
|
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-BK2QTlcns+e3LL3NgcVYk4an+j/x0btpKAuBZ+QIN+Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
which
|
|
|
|
libxslt
|
|
|
|
libxml2
|
|
|
|
docbook_xml_dtd_412
|
|
|
|
docbook_xsl
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ glib imagemagick ]
|
|
|
|
++ lib.optional stdenv.isDarwin Foundation;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./xmlcatalog_patch.patch ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
substituteInPlace ./autogen.sh --replace pkg-config '$PKG_CONFIG'
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-man"
|
|
|
|
"--with-xml-catalog=${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/pull/240893#issuecomment-1635347507
|
|
|
|
NIX_LDFLAGS = [ "-lwebp" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Terminal graphics for the 21st century";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://hpjansson.org/chafa/";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.mog ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "chafa";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|