diff --git a/pkgs/tools/misc/gringo/default.nix b/pkgs/tools/misc/gringo/default.nix index 00879d9505b8..76c60023c063 100644 --- a/pkgs/tools/misc/gringo/default.nix +++ b/pkgs/tools/misc/gringo/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, - bison, re2c, scons + bison, re2c, scons, + libcxx }: let @@ -21,6 +22,23 @@ stdenv.mkDerivation rec { ./gringo-4.5.4-to_string.patch ]; + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace ./SConstruct \ + --replace \ + "env['CXX'] = 'g++'" \ + "env['CXX'] = '$CXX'" + + substituteInPlace ./SConstruct \ + --replace \ + "env['CPPPATH'] = []" \ + "env['CPPPATH'] = ['${libcxx}/include/c++/v1']" + + substituteInPlace ./SConstruct \ + --replace \ + "env['LIBPATH'] = []" \ + "env['LIBPATH'] = ['${libcxx}/lib']" + ''; + buildPhase = '' scons WITH_PYTHON= --build-dir=release ''; @@ -33,7 +51,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Converts input programs with first-order variables to equivalent ground programs"; homepage = http://potassco.sourceforge.net/; - platforms = platforms.linux; + platforms = platforms.all; maintainers = [ maintainers.hakuch ]; license = licenses.gpl3Plus; };