2021-04-16 20:56:14 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchurl
|
|
|
|
|
, imlib2
|
|
|
|
|
, libX11
|
|
|
|
|
, libXext
|
|
|
|
|
, ncurses
|
|
|
|
|
, pkg-config
|
|
|
|
|
, x11Support ? !stdenv.isDarwin
|
|
|
|
|
, zlib
|
2019-03-15 09:41:00 +00:00
|
|
|
|
}:
|
2005-08-24 15:02:30 +00:00
|
|
|
|
|
2008-06-10 18:15:10 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
2021-04-16 20:56:14 +00:00
|
|
|
|
pname = "libcaca";
|
|
|
|
|
version = "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 = [
|
2021-04-16 20:56:14 +00:00
|
|
|
|
"http://fossies.org/linux/privat/${pname}-${version}.tar.gz"
|
|
|
|
|
"http://caca.zoy.org/files/libcaca/${pname}-${version}.tar.gz"
|
2014-12-27 19:58:34 +00:00
|
|
|
|
];
|
2021-04-16 20:56:14 +00:00
|
|
|
|
hash = "sha256-EotGfE7QMmTBh0BRcqToMEk0LMjML2VfU6LQ7p03cvQ=";
|
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-04-16 20:56:14 +00:00
|
|
|
|
];
|
2019-03-15 09:41:00 +00:00
|
|
|
|
|
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-04-16 20:56:14 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
];
|
|
|
|
|
buildInputs = [
|
|
|
|
|
ncurses
|
|
|
|
|
zlib
|
|
|
|
|
(imlib2.override { inherit x11Support; })
|
|
|
|
|
] ++ 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
|
|
|
|
|
'';
|
|
|
|
|
|
2021-04-16 20:56:14 +00:00
|
|
|
|
meta = with lib; {
|
|
|
|
|
homepage = "http://caca.zoy.org/wiki/libcaca";
|
2009-02-12 19:25:10 +00:00
|
|
|
|
description = "A graphics library that outputs text instead of pixels";
|
2021-04-16 20:56:14 +00:00
|
|
|
|
longDescription = ''
|
|
|
|
|
libcaca is a graphics library that outputs text instead of pixels, so that
|
|
|
|
|
it can work on older video cards or text terminals. It is not unlike the
|
|
|
|
|
famous AAlib library, with the following improvements:
|
|
|
|
|
|
|
|
|
|
- Unicode support
|
|
|
|
|
- 2048 available colours (some devices can only handle 16)
|
|
|
|
|
- dithering of colour images
|
|
|
|
|
- advanced text canvas operations (blitting, rotations)
|
|
|
|
|
|
|
|
|
|
Libcaca works in a text terminal (and should thus work on all Unix systems
|
|
|
|
|
including Mac OS X) using the S-Lang or ncurses libraries. It also works
|
|
|
|
|
natively on DOS and Windows.
|
|
|
|
|
|
|
|
|
|
Libcaca was written by Sam Hocevar and Jean-Yves Lamoureux.
|
|
|
|
|
'';
|
|
|
|
|
license = licenses.wtfpl;
|
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
|
platforms = platforms.unix;
|
2009-02-12 19:25:10 +00:00
|
|
|
|
};
|
2005-08-24 15:02:30 +00:00
|
|
|
|
}
|