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

39 lines
1.2 KiB
Nix
Raw Normal View History

2015-08-14 01:00:18 +03:00
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python
, mesa_noglu, libX11
}:
stdenv.mkDerivation rec {
name = "epoxy-${version}";
2018-03-02 02:26:09 +03:00
version = "1.5.0";
2015-08-14 01:00:18 +03:00
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
2018-03-02 02:26:09 +03:00
rev = "${version}";
sha256 = "1ixpqb10pmdy3n9nxd5inflig9dal5502ggadcns5b58j6jr0yv0";
};
outputs = [ "out" "dev" ];
2015-10-07 23:52:16 +03:00
2015-08-14 01:00:18 +03:00
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ];
buildInputs = [ mesa_noglu libX11 ];
2015-10-27 10:38:00 +03:00
preConfigure = stdenv.lib.optional 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"
'';
# add mesa_nonglu to rpath because libepoxy dlopen()s libEGL
postFixup = ''
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ mesa_noglu ]}:$(patchelf --print-rpath $out/lib/libepoxy.so.0.0.0)" $out/lib/libepoxy.so.0.0.0
'';
meta = with stdenv.lib; {
description = "A library for handling OpenGL function pointer management";
homepage = https://github.com/anholt/libepoxy;
license = licenses.mit;
maintainers = [ maintainers.goibhniu ];
2015-05-23 03:04:06 +03:00
platforms = platforms.unix;
};
}