From bfaeb1bdd7d496f3b01113c7325e23c11e2b4a80 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 19 May 2021 05:12:55 -0400 Subject: [PATCH] libAfterImage: compile against libX11 This is needed to not have X_DISPLAY_MISSING for asimage2pixmap function to be implemented: https://root-forum.cern.ch/t/root-xpm-error-on-ubuntu-revisited/4552/10 --- pkgs/development/libraries/libAfterImage/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libAfterImage/default.nix b/pkgs/development/libraries/libAfterImage/default.nix index 1f833321d90..de463cdf42c 100644 --- a/pkgs/development/libraries/libAfterImage/default.nix +++ b/pkgs/development/libraries/libAfterImage/default.nix @@ -1,5 +1,6 @@ -{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, zlib -, static ? stdenv.hostPlatform.isStatic }: +{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib +, static ? stdenv.hostPlatform.isStatic +, withX ? !stdenv.isDarwin }: stdenv.mkDerivation { pname = "libAfterImage"; @@ -47,7 +48,7 @@ stdenv.mkDerivation { patchFlags = [ "-p0" ]; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ giflib libjpeg libpng zlib ]; + buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11; preConfigure = '' rm -rf {libjpeg,libpng,libungif,zlib}/ @@ -63,7 +64,7 @@ stdenv.mkDerivation { "--disable-mmx-optimization" "--${if static then "enable" else "disable"}-staticlibs" "--${if !static then "enable" else "disable"}-sharedlibs" - ]; + ] ++ lib.optional withX "--with-x"; meta = with lib; { homepage = "http://www.afterstep.org/afterimage/";