Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken Tool is still WIP but this is one of the first results. I manually audited the results and removed some results that were not valid. Note that some of these packages maybe should have more constrained platforms set instead of broken set, but I think not being perfectly correct is better than just keep trying to build all these things and never succeeding. Some observations: - Some darwin builds require XCode tools - aarch64-linux builds sometimes suffer from using gcc9 - gcc9 is getting older and misses some new libraries/features - Sometimes tools try to do system detection or expect some explicit settings for platforms that are not x86_64-linux
56 lines
1.7 KiB
Nix
56 lines
1.7 KiB
Nix
{ lib, stdenv, fetchFromGitHub, glfw, pkg-config, libXrandr, libXdamage
|
|
, libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi
|
|
, libX11, libGLU, python3Packages, ensureNewerSourcesForZipFilesHook
|
|
, Cocoa
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "glslviewer";
|
|
version = "1.6.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "patriciogonzalezvivo";
|
|
repo = "glslViewer";
|
|
rev = version;
|
|
sha256 = "0v7x93b61ama0gmzlx1zc56jgi7bvzsfvbkfl82xzwf2h5g1zni7";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ensureNewerSourcesForZipFilesHook python3Packages.six ];
|
|
buildInputs = [
|
|
glfw libGLU glfw libXrandr libXdamage
|
|
libXext libXrender libXinerama libXcursor libXxf86vm
|
|
libXi libX11
|
|
] ++ (with python3Packages; [ python setuptools wrapPython ])
|
|
++ lib.optional stdenv.isDarwin Cocoa;
|
|
pythonPath = with python3Packages; [ pyyaml requests ];
|
|
|
|
# Makefile has /usr/local/bin hard-coded for 'make install'
|
|
preConfigure = ''
|
|
substituteInPlace Makefile \
|
|
--replace '/usr/local' "$out" \
|
|
--replace '/usr/bin/clang++' 'clang++'
|
|
substituteInPlace Makefile \
|
|
--replace 'python setup.py install' "python setup.py install --prefix=$out"
|
|
2to3 -w bin/*
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/bin $(toPythonPath "$out")
|
|
export PYTHONPATH=$PYTHONPATH:$(toPythonPath "$out")
|
|
'';
|
|
|
|
postInstall = ''
|
|
wrapPythonPrograms
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Live GLSL coding renderer";
|
|
homepage = "http://patriciogonzalezvivo.com/2015/glslViewer/";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
maintainers = [ maintainers.hodapp ];
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
|
};
|
|
}
|