3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libepoxy/default.nix

61 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, utilmacros
, python3
, libGL
, libX11
}:
let
inherit (lib) getLib optional optionalString;
2018-03-18 12:34:11 +00:00
in
stdenv.mkDerivation rec {
pname = "libepoxy";
version = "1.5.9";
2015-08-13 23:00:18 +01:00
src = fetchFromGitHub {
owner = "anholt";
repo = pname;
2019-09-09 00:38:31 +01:00
rev = version;
sha256 = "sha256-8rdmC8FZUkKkEvWPJIdfrBQHiwa81vl5tmVqRdU4UIY=";
};
patches = [ ./libgl-path.patch ];
postPatch = ''
patchShebangs src/*.py
''
+ optionalString stdenv.isDarwin ''
2015-10-27 07:38:00 +00:00
substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1"
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ meson ninja pkg-config utilmacros python3 ];
buildInputs = [ libGL libX11 ];
mesonFlags = [
"-Dtests=${if doCheck then "true" else "false"}"
]
++ optional stdenv.isDarwin "-Dglx=yes";
NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"'';
# tests are running from version 1.5.9
doCheck = true;
meta = with lib; {
description = "A library for handling OpenGL function pointer management";
homepage = "https://github.com/anholt/libepoxy";
license = licenses.mit;
2021-11-11 04:43:50 +00:00
maintainers = with maintainers; [ goibhniu erictapen ];
2015-05-23 01:04:06 +01:00
platforms = platforms.unix;
};
}