nixpkgs/pkgs/development/libraries/epoxy/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

42 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, utilmacros, python3
, libGL, libX11
}:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "epoxy";
version = "1.5.4";
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
rev = version;
sha256 = "0rmg0qlswn250h0arx434jh3hwzsr95lawanpmh1czsfvrcx59l6";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkg-config utilmacros python3 ];
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;
};
}