Skip to content

Commit

Permalink
glslviewer: fix darwin build
Browse files Browse the repository at this point in the history
(cherry picked from commit 92163ec)
LnL7 committed Sep 10, 2017

Verified

This commit was signed with the committer’s verified signature. The key has expired.
LnL7 Daiderd Jordan
1 parent 302b5af commit 07602a9
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 14 additions & 9 deletions pkgs/development/tools/glslviewer/default.nix
Original file line number Diff line number Diff line change
@@ -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/;
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -1077,7 +1077,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 { };

0 comments on commit 07602a9

Please sign in to comment.