glslviewer: fix darwin build

This commit is contained in:
Daiderd Jordan 2017-09-10 17:23:50 +02:00
parent 628578f9f8
commit 92163ec65c
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,7 @@
{ 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, mesa_glu }: , libX11, mesa_glu, Cocoa
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "glslviewer-${version}"; name = "glslviewer-${version}";
@ -15,17 +16,21 @@ stdenv.mkDerivation rec {
# Makefile has /usr/local/bin hard-coded for 'make install' # Makefile has /usr/local/bin hard-coded for 'make install'
preConfigure = '' preConfigure = ''
sed s,/usr/local,$out, -i Makefile substituteInPlace Makefile \
--replace '/usr/local' "$out" \
--replace '/usr/bin/clang++' 'clang++'
''; '';
preInstall = '' preInstall = ''
mkdir -p $out/bin mkdir -p $out/bin
''; '';
buildInputs = [ glfw mesa_glu pkgconfig glfw libXrandr libXdamage buildInputs = [
libXext libXrender libXinerama libXcursor libXxf86vm glfw mesa_glu pkgconfig glfw libXrandr libXdamage
libXi libX11 ]; 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";
homepage = http://patriciogonzalezvivo.com/2015/glslViewer/; homepage = http://patriciogonzalezvivo.com/2015/glslViewer/;

View File

@ -1075,7 +1075,9 @@ with pkgs;
glock = callPackage ../development/tools/glock { }; glock = callPackage ../development/tools/glock { };
glslviewer = callPackage ../development/tools/glslviewer { }; glslviewer = callPackage ../development/tools/glslviewer {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
gmic = callPackage ../tools/graphics/gmic { }; gmic = callPackage ../tools/graphics/gmic { };