nixpkgs/pkgs/development/tools/glslviewer/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2017-09-10 15:23:50 +00:00
{ stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage
, libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi
, libX11, libGLU, Cocoa
2017-09-10 15:23:50 +00:00
}:
2017-08-03 23:29:26 +00:00
stdenv.mkDerivation rec {
name = "glslviewer-${version}";
version = "1.2";
src = fetchFromGitHub {
owner = "patriciogonzalezvivo";
repo = "glslViewer";
rev = version;
sha256 = "05ya821l2pd58anyx21mgmlm2bv78rz8cnbvqw4d9pfhq40z9psw";
};
# Makefile has /usr/local/bin hard-coded for 'make install'
preConfigure = ''
2017-09-10 15:23:50 +00:00
substituteInPlace Makefile \
--replace '/usr/local' "$out" \
--replace '/usr/bin/clang++' 'clang++'
2017-08-03 23:29:26 +00:00
'';
preInstall = ''
mkdir -p $out/bin
'';
2017-09-10 15:23:50 +00:00
nativeBuildInputs = [ pkgconfig ];
2017-09-10 15:23:50 +00:00
buildInputs = [
glfw libGLU glfw libXrandr libXdamage
2017-09-10 15:23:50 +00:00
libXext libXrender libXinerama libXcursor libXxf86vm
libXi libX11
] ++ stdenv.lib.optional stdenv.isDarwin Cocoa;
2017-08-03 23:29:26 +00:00
meta = with stdenv.lib; {
description = "Live GLSL coding renderer";
homepage = http://patriciogonzalezvivo.com/2015/glslViewer/;
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.hodapp ];
};
}