2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, ncurses, zlib, pkg-config, imlib2
|
2019-03-15 09:41:00 +00:00
|
|
|
, x11Support ? !stdenv.isDarwin, libX11, libXext
|
|
|
|
}:
|
2005-08-24 15:02:30 +00:00
|
|
|
|
2008-06-10 18:15:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2014-11-04 19:07:05 +00:00
|
|
|
name = "libcaca-0.99.beta19";
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2005-08-24 15:02:30 +00:00
|
|
|
src = fetchurl {
|
2014-12-27 19:58:34 +00:00
|
|
|
urls = [
|
|
|
|
"http://fossies.org/linux/privat/${name}.tar.gz"
|
|
|
|
"http://caca.zoy.org/files/libcaca/${name}.tar.gz"
|
|
|
|
];
|
2014-11-04 19:07:05 +00:00
|
|
|
sha256 = "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj";
|
2005-08-24 15:02:30 +00:00
|
|
|
};
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2016-08-29 00:30:01 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
2015-10-20 22:10:42 +00:00
|
|
|
|
2019-03-15 09:41:00 +00:00
|
|
|
configureFlags = [
|
|
|
|
(if x11Support then "--enable-x11" else "--disable-x11")
|
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING";
|
2019-03-15 09:41:00 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
propagatedBuildInputs = [ ncurses zlib pkg-config (imlib2.override { inherit x11Support; }) ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optionals x11Support [ libX11 libXext ];
|
2008-06-10 18:15:10 +00:00
|
|
|
|
2015-10-20 22:10:42 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/bin
|
|
|
|
mv $bin/bin/caca-config $dev/bin/caca-config
|
|
|
|
'';
|
|
|
|
|
2009-02-12 19:25:10 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://libcaca.zoy.org/";
|
2009-02-12 19:25:10 +00:00
|
|
|
description = "A graphics library that outputs text instead of pixels";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.wtfpl;
|
|
|
|
platforms = lib.platforms.unix;
|
2009-02-12 19:25:10 +00:00
|
|
|
};
|
2005-08-24 15:02:30 +00:00
|
|
|
}
|