imlib2: add version without X11

Changed files
+15 -6
pkgs
development
libraries
imlib2
top-level
+12 -6
pkgs/development/libraries/imlib2/default.nix
···
-
{ stdenv, fetchurl, xlibsWrapper, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }:
+
{ stdenv, fetchurl, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig
+
, freetype
+
, x11Support ? true, xlibsWrapper ? null }:
+
+
with stdenv.lib;
stdenv.mkDerivation rec {
name = "imlib2-1.4.9";
···
sha256 = "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x";
};
-
buildInputs = [ xlibsWrapper libjpeg libtiff giflib libpng bzip2 ];
+
buildInputs = [ libjpeg libtiff giflib libpng bzip2 freetype ]
+
++ optional x11Support xlibsWrapper;
nativeBuildInputs = [ pkgconfig ];
···
# Do not build amd64 assembly code on Darwin, because it fails to compile
# with unknow directive errors
-
configureFlags = if stdenv.isDarwin then [ "--enable-amd64=no" ] else null;
+
configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
+
++ optional (!x11Support) "--without-x";
meta = {
description = "Image manipulation library";
···
easily, without sacrificing speed.
'';
-
license = stdenv.lib.licenses.free;
-
platforms = stdenv.lib.platforms.unix;
-
maintainers = with stdenv.lib.maintainers; [ spwhitt ];
+
license = licenses.free;
+
platforms = platforms.unix;
+
maintainers = with maintainers; [ spwhitt ];
};
}
+3
pkgs/top-level/all-packages.nix
···
iml = callPackage ../development/libraries/iml { };
imlib2 = callPackage ../development/libraries/imlib2 { };
+
imlib2-nox = imlib2.override {
+
x11Support = false;
+
};
imlibsetroot = callPackage ../applications/graphics/imlibsetroot { libXinerama = xorg.libXinerama; } ;