glslviewer: 1.2 -> 2018-01-31, fixes build

This commit is contained in:
Tuomas Tynkkynen 2018-03-23 21:03:59 +02:00
parent 1800e4ec0b
commit a8eb2c9ef9

View File

@ -1,36 +1,46 @@
{ stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage { stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage
, libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi , libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi
, libX11, libGLU, Cocoa , libX11, libGLU, python2Packages, ensureNewerSourcesForZipFilesHook
, Cocoa
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "glslviewer-${version}"; name = "glslviewer-${version}";
version = "1.2"; version = "2018-01-31";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "patriciogonzalezvivo"; owner = "patriciogonzalezvivo";
repo = "glslViewer"; repo = "glslViewer";
rev = version; rev = "cac40f6984dbeb638950744c9508aa88591fea6c";
sha256 = "05ya821l2pd58anyx21mgmlm2bv78rz8cnbvqw4d9pfhq40z9psw"; sha256 = "1bykpp68hdxjlxvi1xicyb6822mz69q0adz24faaac372pls4bk0";
}; };
nativeBuildInputs = [ pkgconfig ensureNewerSourcesForZipFilesHook ];
buildInputs = [
glfw libGLU glfw libXrandr libXdamage
libXext libXrender libXinerama libXcursor libXxf86vm
libXi libX11
] ++ (with python2Packages; [ python setuptools wrapPython ])
++ stdenv.lib.optional stdenv.isDarwin Cocoa;
pythonPath = with python2Packages; [ requests.dev ];
# Makefile has /usr/local/bin hard-coded for 'make install' # Makefile has /usr/local/bin hard-coded for 'make install'
preConfigure = '' preConfigure = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace '/usr/local' "$out" \ --replace '/usr/local' "$out" \
--replace '/usr/bin/clang++' 'clang++' --replace '/usr/bin/clang++' 'clang++'
substituteInPlace Makefile \
--replace 'python setup.py install' "python setup.py install --prefix=$out"
''; '';
preInstall = '' preInstall = ''
mkdir -p $out/bin mkdir -p $out/bin $(toPythonPath "$out")
export PYTHONPATH=$PYTHONPATH:$(toPythonPath "$out")
''; '';
nativeBuildInputs = [ pkgconfig ]; postInstall = ''
buildInputs = [ wrapPythonPrograms
glfw libGLU glfw libXrandr libXdamage '';
libXext libXrender libXinerama libXcursor libXxf86vm
libXi libX11
] ++ stdenv.lib.optional stdenv.isDarwin Cocoa;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Live GLSL coding renderer"; description = "Live GLSL coding renderer";