1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 23:10:02 +00:00
nixpkgs/pkgs/development/tools/glslviewer/default.nix
2017-09-21 15:49:54 -04:00

43 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage
, libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi
, libX11, mesa_glu, Cocoa
}:
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 = ''
substituteInPlace Makefile \
--replace '/usr/local' "$out" \
--replace '/usr/bin/clang++' 'clang++'
'';
preInstall = ''
mkdir -p $out/bin
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
glfw mesa_glu 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/;
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.hodapp ];
};
}