2019-12-14 17:28:58 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python3
|
2018-03-10 15:41:34 +01:00
|
|
|
, libGL, libX11
|
2014-07-27 12:14:38 +02:00
|
|
|
}:
|
|
|
|
|
2018-03-18 13:34:11 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2014-07-27 12:14:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "epoxy";
|
2020-01-17 06:52:58 +01:00
|
|
|
version = "1.5.4";
|
2014-07-27 12:14:38 +02:00
|
|
|
|
2015-08-14 00:00:18 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anholt";
|
|
|
|
repo = "libepoxy";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2020-01-17 06:52:58 +01:00
|
|
|
sha256 = "0rmg0qlswn250h0arx434jh3hwzsr95lawanpmh1czsfvrcx59l6";
|
2014-07-27 12:14:38 +02:00
|
|
|
};
|
|
|
|
|
2016-08-29 02:30:01 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2015-10-07 22:52:16 +02:00
|
|
|
|
2019-12-14 17:28:58 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python3 ];
|
2018-03-10 15:41:34 +01:00
|
|
|
buildInputs = [ libGL libX11 ];
|
2014-07-27 12:14:38 +02:00
|
|
|
|
2018-03-18 13:34:11 +01:00
|
|
|
preConfigure = optionalString stdenv.isDarwin ''
|
2015-10-27 08:38:00 +01:00
|
|
|
substituteInPlace configure --replace build_glx=no build_glx=yes
|
|
|
|
substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1"
|
|
|
|
'';
|
|
|
|
|
2018-03-29 14:47:07 +02:00
|
|
|
patches = [ ./libgl-path.patch ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"'';
|
2018-02-22 09:52:28 +01:00
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # needs X11
|
|
|
|
|
2018-03-18 13:34:11 +01:00
|
|
|
meta = {
|
2014-07-27 12:14:38 +02:00
|
|
|
description = "A library for handling OpenGL function pointer management";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/anholt/libepoxy";
|
2014-07-27 12:14:38 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2015-05-23 02:04:06 +02:00
|
|
|
platforms = platforms.unix;
|
2014-07-27 12:14:38 +02:00
|
|
|
};
|
|
|
|
}
|