z3: 4.8.12 -> 4.8.14

While at it added trivial updater plumbing.

authored by Sergei Trofimovich and committed by Austin Seipp 369d7bb4 e4992cdd

+20 -2
+20 -2
pkgs/applications/science/logic/z3/default.nix
··· 10 10 , ocaml ? null 11 11 , findlib ? null 12 12 , zarith ? null 13 + , writeScript 13 14 }: 14 15 15 16 assert javaBindings -> jdk != null; ··· 19 20 20 21 stdenv.mkDerivation rec { 21 22 pname = "z3"; 22 - version = "4.8.12"; 23 + version = "4.8.14"; 23 24 24 25 src = fetchFromGitHub { 25 26 owner = "Z3Prover"; 26 27 repo = pname; 27 28 rev = "z3-${version}"; 28 - sha256 = "1wbcdc7h3mag8infspvxxja2hiz4igjwxzvss2kqar1rjj4ivfx0"; 29 + sha256 = "jPSTVSndp/T7n+VxZ/g9Rjco00Up+9xeDIVkeLl1MTw="; 29 30 }; 30 31 31 32 nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; ··· 66 67 outputs = [ "out" "lib" "dev" "python" ] 67 68 ++ optional javaBindings "java" 68 69 ++ optional ocamlBindings "ocaml"; 70 + 71 + passthru = { 72 + updateScript = writeScript "update-z3" '' 73 + #!/usr/bin/env nix-shell 74 + #!nix-shell -i bash -p common-updater-scripts curl jq 75 + 76 + set -eu -o pipefail 77 + 78 + # Expect tags in format 79 + # [{name: "Nightly", ..., {name: "z3-vv.vv.vv", ...]. 80 + # Below we extract frst "z3-vv.vv" and drop "z3-" prefix. 81 + newVersion="$(curl -s https://api.github.com/repos/Z3Prover/z3/releases | 82 + jq 'first(.[].name|select(startswith("z3-"))|ltrimstr("z3-"))' --raw-output 83 + )" 84 + update-source-version ${pname} "$newVersion" 85 + ''; 86 + }; 69 87 70 88 meta = with lib; { 71 89 description = "A high-performance theorem prover and SMT solver";