They are not doing anything right now. This is in preparation for their complete removal from the tree. Note: several changes that affect the derivation inputs (e.g. removal of references to stub paths in build instructions) were left out. They will be cleaned up the next iteration and will require special care. Note: this PR is a result of a mix of ugly regex (not AST) based automation and some manual labor. For reference, the regex automation part was hacked in: https://github.com/booxter/nix-clean-apple_sdk Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
72 lines
1.6 KiB
Nix
72 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
libGLU,
|
|
libXmu,
|
|
libXi,
|
|
libXext,
|
|
testers,
|
|
mesa,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "glew";
|
|
version = "1.10.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/glew/glew-${finalAttrs.version}.tgz";
|
|
sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
|
|
};
|
|
|
|
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
libXmu
|
|
libXi
|
|
libXext
|
|
];
|
|
propagatedBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGLU ]; # GL/glew.h includes GL/glu.h
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
patchPhase = ''
|
|
sed -i 's|lib64|lib|' config/Makefile.linux
|
|
${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
|
|
''}
|
|
'';
|
|
|
|
buildFlags = [ "all" ];
|
|
installFlags = [ "install.all" ];
|
|
|
|
preInstall = ''
|
|
export GLEW_DEST="$out"
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -pv $out/share/doc/glew
|
|
mkdir -p $dev/lib/pkgconfig
|
|
cp glew*.pc $dev/lib/pkgconfig
|
|
cp -r README.txt LICENSE.txt doc $out/share/doc/glew
|
|
'';
|
|
|
|
makeFlags = [
|
|
"SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
|
|
"CC:=$(CC)"
|
|
"LD:=$(CC)"
|
|
];
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
meta = with lib; {
|
|
description = "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" ];
|
|
inherit (mesa.meta) platforms;
|
|
};
|
|
})
|