glew: Add meta.pkgConfigModules and test

This commit is contained in:
John Ericson 2023-02-11 09:21:55 -05:00
parent b58f0d0fa5
commit 5fd449df41
2 changed files with 14 additions and 6 deletions

View File

@ -1,13 +1,14 @@
{ lib, stdenv, fetchurl, libGLU, libXmu, libXi, libXext
, AGL, OpenGL
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "glew";
version = "1.10.0";
src = fetchurl {
url = "mirror://sourceforge/glew/glew-${version}.tgz";
url = "mirror://sourceforge/glew/${finalAttrs.pname}-${finalAttrs.version}.tgz";
sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
};
@ -41,11 +42,14 @@ stdenv.mkDerivation rec {
"SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "An OpenGL extension loading library for C(++)";
homepage = "https://glew.sourceforge.net/";
license = licenses.free; # different files under different licenses
#["BSD" "GLX" "SGI-B" "GPL2"]
pkgConfigModules = [ "glew" ];
platforms = platforms.mesaPlatforms;
};
}
})

View File

@ -1,14 +1,15 @@
{ lib, stdenv, fetchurl, fetchpatch, cmake, libGLU, libXmu, libXi, libXext
, OpenGL
, enableEGL ? false
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "glew";
version = "2.2.0";
src = fetchurl {
url = "mirror://sourceforge/glew/${pname}-${version}.tgz";
url = "mirror://sourceforge/glew/${finalAttrs.pname}-${finalAttrs.version}.tgz";
sha256 = "1qak8f7g1iswgswrgkzc7idk7jmqgwrs58fhg2ai007v7j4q5z6l";
};
@ -44,14 +45,17 @@ stdenv.mkDerivation rec {
EOF
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "An OpenGL extension loading library for C/C++";
homepage = "https://glew.sourceforge.net/";
license = with licenses; [ /* modified bsd */ free mit gpl2Only ]; # For full details, see https://github.com/nigels-com/glew#copyright-and-licensing
pkgConfigModules = [ "glew" ];
platforms = with platforms;
if enableEGL then
subtractLists darwin mesaPlatforms
else
mesaPlatforms;
};
}
})