mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
glew-1.10: add package
This commit is contained in:
parent
4c7ef76862
commit
f8bf2326a4
52
pkgs/development/libraries/glew/1.10.nix
Normal file
52
pkgs/development/libraries/glew/1.10.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "glew-1.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/glew/${name}.tgz";
|
||||
sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ x11 libXmu libXi ];
|
||||
propagatedNativeBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's|lib64|lib|' config/Makefile.linux
|
||||
${optionalString (stdenv ? cross) ''
|
||||
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 $out/lib/pkgconfig
|
||||
cp glew*.pc $out/lib/pkgconfig
|
||||
cp -r README.txt LICENSE.txt doc $out/share/doc/glew
|
||||
'';
|
||||
|
||||
crossAttrs.makeFlags = [
|
||||
"CC=${stdenv.cross.config}-gcc"
|
||||
"LD=${stdenv.cross.config}-gcc"
|
||||
"AR=${stdenv.cross.config}-ar"
|
||||
"STRIP="
|
||||
] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw"
|
||||
++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin";
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
@ -6292,6 +6292,7 @@ let
|
||||
libgit2_0_21 = callPackage ../development/libraries/git2/0.21.nix { };
|
||||
|
||||
glew = callPackage ../development/libraries/glew { };
|
||||
glew110 = callPackage ../development/libraries/glew/1.10.nix { };
|
||||
|
||||
glfw = glfw3;
|
||||
glfw2 = callPackage ../development/libraries/glfw/2.x.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user