10 , x11Support ? !stdenv.hostPlatform.isDarwin
13 stdenv.mkDerivation rec {
15 version = "0.99.beta20";
17 src = fetchFromGitHub {
21 hash = "sha256-N0Lfi0d4kjxirEbIjdeearYWvStkKMyV6lgeyNKXcVw=";
32 (imlib2.override { inherit x11Support; })
33 ] ++ lib.optionals x11Support [
38 outputs = [ "bin" "dev" "out" "man" ];
41 (if x11Support then "--enable-x11" else "--disable-x11")
42 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
43 # Suppresses a build failure building Cocoa support due to accessing private ivar `_running`,
44 # which no longer available.
45 (lib.enableFeature false "cocoa")
48 env.NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING";
52 mv $bin/bin/caca-config $dev/bin/caca-config
56 homepage = "http://caca.zoy.org/wiki/libcaca";
57 description = "Graphics library that outputs text instead of pixels";
59 libcaca is a graphics library that outputs text instead of pixels, so that
60 it can work on older video cards or text terminals. It is not unlike the
61 famous ​AAlib library, with the following improvements:
64 - 2048 available colours (some devices can only handle 16)
65 - dithering of colour images
66 - advanced text canvas operations (blitting, rotations)
68 Libcaca works in a text terminal (and should thus work on all Unix systems
69 including Mac OS X) using the S-Lang or ncurses libraries. It also works
70 natively on DOS and Windows.
72 Libcaca was written by Sam Hocevar and Jean-Yves Lamoureux.
74 license = licenses.wtfpl;
75 maintainers = with maintainers; [ AndersonTorres ];
76 platforms = platforms.unix;