mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
gringo: add darwin platform support
This commit is contained in:
parent
6844b1375b
commit
a1013287f3
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl,
|
{ stdenv, fetchurl,
|
||||||
bison, re2c, scons
|
bison, re2c, scons,
|
||||||
|
libcxx
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -21,6 +22,23 @@ stdenv.mkDerivation rec {
|
|||||||
./gringo-4.5.4-to_string.patch
|
./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 = ''
|
buildPhase = ''
|
||||||
scons WITH_PYTHON= --build-dir=release
|
scons WITH_PYTHON= --build-dir=release
|
||||||
'';
|
'';
|
||||||
@ -33,7 +51,7 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Converts input programs with first-order variables to equivalent ground programs";
|
description = "Converts input programs with first-order variables to equivalent ground programs";
|
||||||
homepage = http://potassco.sourceforge.net/;
|
homepage = http://potassco.sourceforge.net/;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.hakuch ];
|
maintainers = [ maintainers.hakuch ];
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user