3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/epoxy/default.nix
Jan Malakhovski 7079e744d4 Merge branch 'master' into staging
Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
2018-03-10 20:38:13 +00:00

39 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python
, libGL, libX11
}:
stdenv.mkDerivation rec {
name = "epoxy-${version}";
version = "1.5.0";
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
rev = "${version}";
sha256 = "1ixpqb10pmdy3n9nxd5inflig9dal5502ggadcns5b58j6jr0yv0";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ];
buildInputs = [ libGL libX11 ];
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 libGL to rpath because libepoxy dlopen()s libEGL
postFixup = ''
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libGL ]}:$(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 ];
platforms = platforms.unix;
};
}