2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, utilmacros, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, libGL, libX11
|
|
|
|
}:
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "libepoxy";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "1.5.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anholt";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0rmg0qlswn250h0arx434jh3hwzsr95lawanpmh1czsfvrcx59l6";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config utilmacros python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libGL libX11 ];
|
|
|
|
|
|
|
|
preConfigure = optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace configure --replace build_glx=no build_glx=yes
|
|
|
|
substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1"
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [ ./libgl-path.patch ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"'';
|
|
|
|
|
|
|
|
doCheck = false; # needs X11
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A library for handling OpenGL function pointer management";
|
|
|
|
homepage = "https://github.com/anholt/libepoxy";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu erictapen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|