Merge pull request #63827 from acairncross/fix-monosat
monosat: Fix Linux build
This commit is contained in:
commit
4bcef38f24
@ -137,6 +137,11 @@
|
|||||||
githubId = 2321000;
|
githubId = 2321000;
|
||||||
name = "Ruslan Babayev";
|
name = "Ruslan Babayev";
|
||||||
};
|
};
|
||||||
|
acairncross = {
|
||||||
|
email = "acairncross@gmail.com";
|
||||||
|
github = "acairncross";
|
||||||
|
name = "Aiken Cairncross";
|
||||||
|
};
|
||||||
acowley = {
|
acowley = {
|
||||||
email = "acowley@gmail.com";
|
email = "acowley@gmail.com";
|
||||||
github = "acowley";
|
github = "acowley";
|
||||||
|
@ -8,11 +8,11 @@ with stdenv.lib;
|
|||||||
let
|
let
|
||||||
boolToCmake = x: if x then "ON" else "OFF";
|
boolToCmake = x: if x then "ON" else "OFF";
|
||||||
|
|
||||||
rev = "2deeadeff214e975c9f7508bc8a24fa05a1a0c32";
|
rev = "1.8.0";
|
||||||
sha256 = "09yhym2lxmn3xbhw5fcxawnmvms5jd9fw9m7x2wzil7yvy4vwdjn";
|
sha256 = "0q3a8x3iih25xkp2bm842sm2hxlb8hxlls4qmvj7vzwrh4lvsl7b";
|
||||||
|
|
||||||
pname = "monosat";
|
pname = "monosat";
|
||||||
version = substring 0 7 sha256;
|
version = rev;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sambayless";
|
owner = "sambayless";
|
||||||
@ -25,7 +25,11 @@ let
|
|||||||
inherit src;
|
inherit src;
|
||||||
buildInputs = [ cmake zlib gmp jdk8 ];
|
buildInputs = [ cmake zlib gmp jdk8 ];
|
||||||
|
|
||||||
cmakeFlags = [ "-DJAVA=${boolToCmake includeJava}" "-DGPL=${boolToCmake includeGplCode}" ];
|
cmakeFlags = [
|
||||||
|
"-DBUILD_STATIC=OFF"
|
||||||
|
"-DJAVA=${boolToCmake includeJava}"
|
||||||
|
"-DGPL=${boolToCmake includeGplCode}"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = optionalString includeJava ''
|
postInstall = optionalString includeJava ''
|
||||||
mkdir -p $out/share/java
|
mkdir -p $out/share/java
|
||||||
@ -39,7 +43,7 @@ let
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
license = if includeGplCode then licenses.gpl2 else licenses.mit;
|
license = if includeGplCode then licenses.gpl2 else licenses.mit;
|
||||||
homepage = https://github.com/sambayless/monosat;
|
homepage = https://github.com/sambayless/monosat;
|
||||||
broken = true;
|
maintainers = [ maintainers.acairncross ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -51,18 +55,15 @@ let
|
|||||||
|
|
||||||
propagatedBuildInputs = [ core cython ];
|
propagatedBuildInputs = [ core cython ];
|
||||||
|
|
||||||
# This tells setup.py to use cython
|
# This tells setup.py to use cython, which should produce faster bindings
|
||||||
MONOSAT_CYTHON = true;
|
MONOSAT_CYTHON = true;
|
||||||
|
|
||||||
# The relative paths here don't make sense for our Nix build
|
# The relative paths here don't make sense for our Nix build
|
||||||
# Also, let's use cython since it should produce faster bindings
|
|
||||||
# TODO: do we want to just reference the core monosat library rather than copying the
|
# TODO: do we want to just reference the core monosat library rather than copying the
|
||||||
# shared lib? The current setup.py copies the .dylib/.so...
|
# shared lib? The current setup.py copies the .dylib/.so...
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace '../../../../libmonosat.dylib' '${core}/lib/libmonosat.dylib' \
|
--replace 'library_dir = "../../../../"' 'library_dir = "${core}/lib/"'
|
||||||
--replace '../../../../libmonosat.so' '${core}/lib/libmonosat.so'
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in core
|
in core
|
||||||
|
Loading…
x
Reference in New Issue
Block a user