diff options
author | Winnie Quinn <me@winniequinn.com> | 2017-09-11 16:07:08 -0400 |
---|---|---|
committer | vbgl <vbgl@users.noreply.github.com> | 2017-09-12 09:22:25 +0200 |
commit | a1013287f3e0ab14802e864541ebf197a0f47447 (patch) | |
tree | 7ac7867e3824d6e2bbb145164e375f49e21dc931 /pkgs/tools/misc/gringo/default.nix | |
parent | 6844b1375bcc1fd519a64d1f8781cdc2e902bb48 (diff) | |
download | nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar.gz nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar.bz2 nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar.lz nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar.xz nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.tar.zst nixpkgs-a1013287f3e0ab14802e864541ebf197a0f47447.zip |
gringo: add darwin platform support
Diffstat (limited to 'pkgs/tools/misc/gringo/default.nix')
-rw-r--r-- | pkgs/tools/misc/gringo/default.nix | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/tools/misc/gringo/default.nix b/pkgs/tools/misc/gringo/default.nix index 00879d9505b..76c60023c06 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; }; |