From b4da391ade6d6e3828fe42693825f4a1a4d772a4 Mon Sep 17 00:00:00 2001 From: Aiken Cairncross Date: Wed, 26 Jun 2019 21:24:16 +0100 Subject: [PATCH 1/2] monosat: Add self as maintainer --- maintainers/maintainer-list.nix | 5 +++++ pkgs/applications/science/logic/monosat/default.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3dbd6282df4..af9a6d35f78 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -137,6 +137,11 @@ githubId = 2321000; name = "Ruslan Babayev"; }; + acairncross = { + email = "acairncross@gmail.com"; + github = "acairncross"; + name = "Aiken Cairncross"; + }; acowley = { email = "acowley@gmail.com"; github = "acowley"; diff --git a/pkgs/applications/science/logic/monosat/default.nix b/pkgs/applications/science/logic/monosat/default.nix index fba3bc47906..a9b52658b92 100644 --- a/pkgs/applications/science/logic/monosat/default.nix +++ b/pkgs/applications/science/logic/monosat/default.nix @@ -39,7 +39,7 @@ let platforms = platforms.unix; license = if includeGplCode then licenses.gpl2 else licenses.mit; homepage = https://github.com/sambayless/monosat; - broken = true; + maintainers = [ maintainers.acairncross ]; }; }; From 15dbd8de7c0f6079746378700f54913049433c79 Mon Sep 17 00:00:00 2001 From: Aiken Cairncross Date: Wed, 26 Jun 2019 20:44:22 +0100 Subject: [PATCH 2/2] monosat: 60528a3 -> 1.8.0 This fixes the broken Linux build by only building the dynamic library/ executable (an option that was only added in the latest tagged version). --- .../science/logic/monosat/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/logic/monosat/default.nix b/pkgs/applications/science/logic/monosat/default.nix index a9b52658b92..c0512b74488 100644 --- a/pkgs/applications/science/logic/monosat/default.nix +++ b/pkgs/applications/science/logic/monosat/default.nix @@ -8,11 +8,11 @@ with stdenv.lib; let boolToCmake = x: if x then "ON" else "OFF"; - rev = "2deeadeff214e975c9f7508bc8a24fa05a1a0c32"; - sha256 = "09yhym2lxmn3xbhw5fcxawnmvms5jd9fw9m7x2wzil7yvy4vwdjn"; + rev = "1.8.0"; + sha256 = "0q3a8x3iih25xkp2bm842sm2hxlb8hxlls4qmvj7vzwrh4lvsl7b"; pname = "monosat"; - version = substring 0 7 sha256; + version = rev; src = fetchFromGitHub { owner = "sambayless"; @@ -25,7 +25,11 @@ let inherit src; 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 '' mkdir -p $out/share/java @@ -51,18 +55,15 @@ let 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; # 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 # shared lib? The current setup.py copies the .dylib/.so... postPatch = '' - substituteInPlace setup.py \ - --replace '../../../../libmonosat.dylib' '${core}/lib/libmonosat.dylib' \ - --replace '../../../../libmonosat.so' '${core}/lib/libmonosat.so' + --replace 'library_dir = "../../../../"' 'library_dir = "${core}/lib/"' ''; }; in core