2021-04-16 20:56:14 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
2022-01-02 00:13:44 +00:00
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, autoreconfHook
|
2021-04-16 20:56:14 +00:00
|
|
|
|
, imlib2
|
2022-10-13 22:16:16 +00:00
|
|
|
|
, xorg
|
2021-04-16 20:56:14 +00:00
|
|
|
|
, ncurses
|
|
|
|
|
, pkg-config
|
|
|
|
|
, zlib
|
2022-01-02 00:13:44 +00:00
|
|
|
|
, x11Support ? !stdenv.isDarwin
|
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";
|
2022-01-02 00:13:44 +00:00
|
|
|
|
version = "0.99.beta20";
|
2019-03-15 09:41:00 +00:00
|
|
|
|
|
2022-01-02 00:13:44 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "cacalabs";
|
|
|
|
|
repo = pname;
|
|
|
|
|
rev = "v${version}";
|
|
|
|
|
hash = "sha256-N0Lfi0d4kjxirEbIjdeearYWvStkKMyV6lgeyNKXcVw=";
|
|
|
|
|
};
|
2019-03-15 09:41:00 +00:00
|
|
|
|
|
2021-04-16 20:56:14 +00:00
|
|
|
|
nativeBuildInputs = [
|
2022-01-02 00:13:44 +00:00
|
|
|
|
autoreconfHook
|
2021-04-16 20:56:14 +00:00
|
|
|
|
pkg-config
|
|
|
|
|
];
|
2022-01-02 00:13:44 +00:00
|
|
|
|
|
2021-04-16 20:56:14 +00:00
|
|
|
|
buildInputs = [
|
|
|
|
|
ncurses
|
|
|
|
|
zlib
|
|
|
|
|
(imlib2.override { inherit x11Support; })
|
|
|
|
|
] ++ lib.optionals x11Support [
|
2022-10-13 22:16:16 +00:00
|
|
|
|
xorg.libX11
|
|
|
|
|
xorg.libXext
|
2021-04-16 20:56:14 +00:00
|
|
|
|
];
|
2008-06-10 18:15:10 +00:00
|
|
|
|
|
2022-01-02 00:13:44 +00:00
|
|
|
|
outputs = [ "bin" "dev" "out" "man" ];
|
|
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
|
(if x11Support then "--enable-x11" else "--disable-x11")
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING";
|
|
|
|
|
|
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
|
|
|
|
}
|