diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libepoxy')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libepoxy/default.nix | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libepoxy/default.nix b/nixpkgs/pkgs/development/libraries/libepoxy/default.nix index 4141de4fc00d..c54c3c86d232 100644 --- a/nixpkgs/pkgs/development/libraries/libepoxy/default.nix +++ b/nixpkgs/pkgs/development/libraries/libepoxy/default.nix @@ -10,13 +10,14 @@ , libX11 , Carbon , OpenGL +, x11Support ? !stdenv.isDarwin }: let inherit (lib) getLib optional optionalString; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = "libepoxy"; version = "1.5.9"; @@ -40,7 +41,7 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ meson ninja pkg-config utilmacros python3 ]; - buildInputs = [ + buildInputs = lib.optionals x11Support [ libGL libX11 ] ++ lib.optionals stdenv.isDarwin [ @@ -50,10 +51,16 @@ stdenv.mkDerivation (rec { mesonFlags = [ "-Dtests=${if doCheck then "true" else "false"}" - ] - ++ optional stdenv.isDarwin "-Dglx=yes"; + "-Dglx=${if x11Support then "yes" else "no"}" + ]; + + NIX_CFLAGS_COMPILE = lib.optionalString x11Support ''-DLIBGL_PATH="${getLib libGL}/lib"''; - NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"''; + # cgl_epoxy_api fails in darwin sandbox and on Hydra (because it's headless?) + preCheck = lib.optionalString stdenv.isDarwin '' + substituteInPlace ../test/meson.build \ + --replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," "" + ''; # tests are running from version 1.5.9 doCheck = true; @@ -65,10 +72,4 @@ stdenv.mkDerivation (rec { maintainers = with maintainers; [ goibhniu erictapen ]; platforms = platforms.unix; }; -} // lib.optionalAttrs stdenv.isDarwin { - # cgl_epoxy_api fails in darwin sandbox and on Hydra (because it's headless?) - preCheck = '' - substituteInPlace ../test/meson.build \ - --replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," "" - ''; -}) +} |