fim: Add X11 support and "USE flags"

This commit is contained in:
Michael Weiss 2017-09-21 17:59:38 +02:00
parent 31b7bc4c1e
commit a127f91f28
2 changed files with 21 additions and 10 deletions

View file

@ -1,7 +1,12 @@
{ stdenv, fetchurl, autoconf, automake, pkgconfig, perl
, flex, bison, readline
, giflib, libtiff, libexif, libpng, libjpeg, jasper
, aalib, inkscape#, SDL, fig2dev, jasper # TODO
{ stdenv, fetchurl, autoconf, automake, pkgconfig
, perl, flex, bison, readline, libexif
, x11Support ? true, SDL
, svgSupport ? true, inkscape
, asciiArtSupport ? true, aalib
, gifSupport ? true, giflib
, tiffSupport ? true, libtiff
, jpegSupport ? true, libjpeg
, pngSupport ? true, libpng
}:
stdenv.mkDerivation rec {
@ -20,10 +25,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoconf automake pkgconfig ];
buildInputs = [
perl flex bison readline
giflib libtiff libexif libpng libjpeg jasper aalib inkscape
];
buildInputs = with stdenv.lib;
[ perl flex bison readline libexif ]
++ optional x11Support SDL
++ optional svgSupport inkscape
++ optional asciiArtSupport aalib
++ optional gifSupport giflib
++ optional tiffSupport libtiff
++ optional jpegSupport libjpeg
++ optional pngSupport libpng;
NIX_CFLAGS_COMPILE = stdenv.lib.optional x11Support "-lSDL";
meta = with stdenv.lib; {
description = "A lightweight, highly customizable and scriptable image viewer";

View file

@ -2014,8 +2014,7 @@ with pkgs;
fdk_aac = callPackage ../development/libraries/fdk-aac { };
# WIP: fim
fimFull = callPackage ../tools/graphics/fim { };
fim = callPackage ../tools/graphics/fim { };
flac123 = callPackage ../applications/audio/flac123 { };