nixpkgs/pkgs/development/libraries/epoxy/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2019-12-14 08:28:58 -08:00
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python3
, libGL, libX11
}:
2018-03-18 05:34:11 -07:00
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "epoxy";
2020-01-16 21:52:58 -08:00
version = "1.5.4";
2015-08-13 15:00:18 -07:00
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
2019-09-08 16:38:31 -07:00
rev = version;
2020-01-16 21:52:58 -08:00
sha256 = "0rmg0qlswn250h0arx434jh3hwzsr95lawanpmh1czsfvrcx59l6";
};
outputs = [ "out" "dev" ];
2015-10-07 13:52:16 -07:00
2019-12-14 08:28:58 -08:00
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python3 ];
buildInputs = [ libGL libX11 ];
2018-03-18 05:34:11 -07:00
preConfigure = optionalString stdenv.isDarwin ''
2015-10-27 00:38:00 -07:00
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
2018-03-18 05:34:11 -07:00
meta = {
description = "A library for handling OpenGL function pointer management";
homepage = "https://github.com/anholt/libepoxy";
license = licenses.mit;
maintainers = [ maintainers.goibhniu ];
2015-05-22 17:04:06 -07:00
platforms = platforms.unix;
};
}