From 2c2c10d552e818d0f2afadeca0169429052a984f Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sat, 28 Nov 2020 12:18:41 +0000 Subject: Create operational Conjure The derivation described in `conjure-minion.nix` creates a functional Conjure/Savile Row/Minion setup, where `conjure solve` can succesfully solve using Savile Row and Minion. Unfortunately, the most recent versions of these three programs available on their respective download pages do not cooperate. As of this commit, Minion v2 is not available on its download site https://constraintmodelling.org/minion/download/ but it is available in Conjure's downloads https://github.com/conjure-cp/conjure/releases/tag/v2.3.0 along with Savile Row v1.7.0. These three programs work together, and as such are the ones mentioned in `conjure-minion.nix`. Additionally, the property `conjure.containedSolvers` on `default.nix` contains derivations able to build the solvers provided on the Conjure download page. This shows an issue which is not solved by nixpgks: dependencies on specific versions/version ranges. nixpkgs does not really support referring to specific versions of packages: https://github.com/NixOS/nixpkgs/issues/93327 support for version dependencies seems unlikely to appear soon. Having multiple different versions of packages available and using a CI test system to check for support in a matrix of different package versions could be a nice thing to implement---then again, it could also end up being a waste of CPU (and human) time. --- savilerow/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'savilerow/default.nix') diff --git a/savilerow/default.nix b/savilerow/default.nix index 8d6ecce..8bd7eea 100644 --- a/savilerow/default.nix +++ b/savilerow/default.nix @@ -21,15 +21,17 @@ in version = "1.9.0"; src = fetchurl { - url = https://savilerow.cs.st-andrews.ac.uk/savilerow-1.9.0-linux.tgz; + url = "https://savilerow.cs.st-andrews.ac.uk/${name}-${version}-linux.tgz"; sha256 = "10ibyfkib4ym6sadaqhk7jp6k0i6mm1bh6i8yzdhxl153gnd8f2h"; + # v1.8.0 + # sha256 = "017abjswjg1q9ap6zx7088kinxlg3pqvz6z37pfx13j5hnz1cfnl"; }; manifest = ./manifest; nativeBuildInputs = [ makeWrapper ]; - dontConfigure = true; + inherit minion; buildPhase = '' ${fastjar}/bin/fastjar -ufm ./savilerow.jar ${manifest} @@ -44,8 +46,6 @@ in --add-flags "-ea -XX:ParallelGCThreads=1 -Xmx8G" \ --add-flags "-jar \"$out/share/java/${name}-${version}.jar\"" \ ${maybeArgument useMinion "-minion-bin '${minion}/bin/minion'"} \ - --set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \ - --set _JAVA_AWT_WM_NONREPARENTING 1 ''; meta = { -- cgit v1.2.1