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

View File

@ -1075,7 +1075,9 @@ with pkgs;
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 { };