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

42 lines
1.1 KiB
Nix
Raw Normal View History

2015-08-14 00:00:18 +02:00
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, utilmacros, python
, libGL, libX11
}:
2018-03-18 13:34:11 +01:00
with stdenv.lib;
stdenv.mkDerivation rec {
name = "epoxy-${version}";
2018-04-30 00:09:52 +02:00
version = "1.5.1";
2015-08-14 00:00:18 +02:00
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
2018-03-02 00:26:09 +01:00
rev = "${version}";
2018-04-30 00:09:52 +02:00
sha256 = "1811agxr7g9wd832np8sw152j468kg3qydmfkc564v54ncfcgaci";
};
outputs = [ "out" "dev" ];
2015-10-07 22:52:16 +02:00
2015-08-14 00:00:18 +02:00
nativeBuildInputs = [ autoreconfHook pkgconfig utilmacros python ];
buildInputs = [ libGL libX11 ];
2018-03-18 13:34:11 +01:00
preConfigure = optionalString stdenv.isDarwin ''
2015-10-27 08:38:00 +01: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 13:34:11 +01: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-23 02:04:06 +02:00
platforms = platforms.unix;
};
}