2015-08-13 23:00:18 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python
|
2018-03-10 14:41:34 +00:00
|
|
|
, libGL, libX11
|
2014-07-27 11:14:38 +01:00
|
|
|
}:
|
|
|
|
|
2018-03-18 12:34:11 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2014-07-27 11:14:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "epoxy";
|
2018-11-19 03:57:38 +00:00
|
|
|
version = "1.5.3";
|
2014-07-27 11:14:38 +01:00
|
|
|
|
2015-08-13 23:00:18 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anholt";
|
|
|
|
repo = "libepoxy";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2018-11-19 03:57:38 +00:00
|
|
|
sha256 = "03nrmf161xyj3q9zsigr5qj5vx5dsfxxyjva73cm1mgqqc5d60px";
|
2014-07-27 11:14:38 +01:00
|
|
|
};
|
|
|
|
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2015-10-07 21:52:16 +01:00
|
|
|
|
2015-08-13 23:00:18 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ];
|
2018-03-10 14:41:34 +00:00
|
|
|
buildInputs = [ libGL libX11 ];
|
2014-07-27 11:14:38 +01:00
|
|
|
|
2018-03-18 12:34:11 +00:00
|
|
|
preConfigure = optionalString stdenv.isDarwin ''
|
2015-10-27 07:38:00 +00: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 13:47:07 +01:00
|
|
|
patches = [ ./libgl-path.patch ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"'';
|
2018-02-22 08:52:28 +00:00
|
|
|
|
2018-04-25 04:20:18 +01:00
|
|
|
doCheck = false; # needs X11
|
|
|
|
|
2018-03-18 12:34:11 +00:00
|
|
|
meta = {
|
2014-07-27 11:14:38 +01:00
|
|
|
description = "A library for handling OpenGL function pointer management";
|
|
|
|
homepage = https://github.com/anholt/libepoxy;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2015-05-23 01:04:06 +01:00
|
|
|
platforms = platforms.unix;
|
2014-07-27 11:14:38 +01:00
|
|
|
};
|
|
|
|
}
|