nixpkgs-suyu/pkgs/development/libraries/epoxy/default.nix
Alexander V. Nikolaev 867d387a1c epoxy: 1.5.1 -> 1.5.2 (#47178)
libgl-path.patch was updated (it applied with little fuzz, because I am
a bit lazy, and rebase it on master of epoxy, not 1.5.2)
2018-09-25 11:50:51 +02:00

41 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python
, libGL, libX11
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "epoxy-${version}";
version = "1.5.2";
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
rev = "${version}";
sha256 = "0frs42s7d3ff2wlw0jns6vb3myx2bhz9m5nkzbnfyn436s2qqls3";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ];
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;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.unix;
};
}