mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
2f3dc5108b
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. This update was made based on information from https://repology.org/metapackage/glew/versions. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 2.1.0 with grep in /nix/store/r6kh84dxq1pi99hcc2dip060kwbg5164-glew-2.1.0-bin - directory tree listing: https://gist.github.com/5a1de7b9365c14af6aca6f9b9c76b6c1
57 lines
1.5 KiB
Nix
57 lines
1.5 KiB
Nix
{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
|
|
, buildPlatform, hostPlatform
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "glew-2.1.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/glew/${name}.tgz";
|
|
sha256 = "159wk5dc0ykjbxvag5i1m2mhp23zkk6ra04l26y3jc3nwvkr3ph4";
|
|
};
|
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
buildInputs = [ xlibsWrapper libXmu libXi ];
|
|
propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h
|
|
|
|
patchPhase = ''
|
|
sed -i 's|lib64|lib|' config/Makefile.linux
|
|
substituteInPlace config/Makefile.darwin --replace /usr/local "$out"
|
|
${optionalString (hostPlatform != buildPlatform) ''
|
|
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
|
|
''}
|
|
'';
|
|
|
|
buildFlags = [ "all" ];
|
|
installFlags = [ "install.all" ];
|
|
|
|
preInstall = ''
|
|
makeFlagsArray+=(GLEW_DEST=$out BINDIR=$bin/bin INCDIR=$dev/include/GL)
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -pv $out/share/doc/glew
|
|
mkdir -p $out/lib/pkgconfig
|
|
cp glew*.pc $out/lib/pkgconfig
|
|
cp -r README.md LICENSE.txt doc $out/share/doc/glew
|
|
rm $out/lib/*.a
|
|
'';
|
|
|
|
makeFlags = [
|
|
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "An OpenGL extension loading library for C(++)";
|
|
homepage = http://glew.sourceforge.net/;
|
|
license = licenses.free; # different files under different licenses
|
|
#["BSD" "GLX" "SGI-B" "GPL2"]
|
|
platforms = platforms.mesaPlatforms;
|
|
};
|
|
}
|