nixpkgs/pkgs/tools/text/ansifilter/default.nix
Sukant Hajra 56f1949092 ansifilter: extend build to include Darwin
All that was required was to use clang++ instead of g++ when compiling for
Darwin.
2020-06-26 22:58:42 -05:00

36 lines
973 B
Nix

{ fetchurl, stdenv, pkgconfig, boost, lua }:
stdenv.mkDerivation rec {
pname = "ansifilter";
version = "2.16";
src = fetchurl {
url = "http://www.andre-simon.de/zip/ansifilter-${version}.tar.bz2";
sha256 = "1wmszcykhaipxa7kxj4ml0lkmd5z7i9ryaachg9jpkhbaaijzkbz";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ boost lua ];
postPatch = ''
substituteInPlace src/makefile --replace "CC=g++" "CC=c++"
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"conf_dir=/etc/ansifilter"
];
meta = with stdenv.lib; {
description = "Tool to convert ANSI to other formats";
longDescription = ''
Tool to remove ANSI or convert them to another format
(HTML, TeX, LaTeX, RTF, Pango or BBCode)
'';
homepage = "http://www.andre-simon.de/doku/ansifilter/en/ansifilter.php";
license = licenses.gpl3;
maintainers = [ maintainers.Adjective-Object ];
platforms = platforms.linux ++ platforms.darwin;
};
}