Unverified Commit e8d94a5d authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #201054 from wkral/scryer-prolog-update

parents 25bdd85a 1a0449ab
Loading
Loading
Loading
Loading
+11 −53
Original line number Diff line number Diff line
diff --git a/Cargo.lock b/Cargo.lock
index 4d699f11..1eb894fc 100644
index 05e54911..3a567165 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -875,15 +875,6 @@ version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
 
-[[package]]
-name = "openssl-src"
-version = "300.0.2+3.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14a760a11390b1a5daf72074d4f6ff1a6e772534ae191f999f57e9ee8146d1fb"
-dependencies = [
- "cc",
-]
-
 [[package]]
 name = "openssl-sys"
 version = "0.9.70"
@@ -893,7 +884,6 @@ dependencies = [
  "autocfg 1.0.1",
  "cc",
  "libc",
- "openssl-src",
  "pkg-config",
  "vcpkg",
 ]
@@ -1432,6 +1422,7 @@ dependencies = [
  "divrem",
@@ -1826,6 +1826,7 @@ dependencies = [
  "futures",
  "fxhash",
  "git-version",
+ "gmp-mpfr-sys",
  "hostname",
  "indexmap",
  "instructions-template",
  "hyper",
  "hyper-tls",
diff --git a/Cargo.toml b/Cargo.toml
index 8e81a947..d21a8d49 100644
index 6e42de23..a50e3d47 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -55,7 +55,7 @@ ring = "0.16.13"
 ripemd160 = "0.8.0"
 sha3 = "0.8.2"
 blake2 = "0.8.1"
-openssl = { version = "0.10.29", features = ["vendored"] }
+openssl = { version = "0.10.29" }
 native-tls = "0.2.4"
 chrono = "0.4.11"
 select = "0.4.3"
@@ -66,10 +66,14 @@ sodiumoxide = "0.2.6"
 static_assertions = "1.1.0"
 slice-deque = "0.3.0"
@@ -63,6 +63,7 @@ hyper = { version = "0.14", features = ["full"] }
 hyper-tls = "0.5.0"
 tokio = { version = "1", features = ["full"] }
 futures = "0.3"
+gmp-mpfr-sys = { version = "1.4.10", features = ["use-system-libs"] }
 
+[dependencies.gmp-mpfr-sys]
+version = "1.4"
+features = ["use-system-libs"]
+
 [dev-dependencies]
 assert_cmd = "1.0.3"
 predicates-core = "1.0.2"
 serial_test = "0.5.1"
 
 [profile.release]
-debug = true
\ No newline at end of file
+debug = true
+3 −13
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, rustPlatform
, rustfmt
, gmp
@@ -13,30 +12,21 @@

rustPlatform.buildRustPackage rec {
  pname = "scryer-prolog";
  version = "0.9.0";
  version = "0.9.1";

  src = fetchFromGitHub {
    owner = "mthom";
    repo = "scryer-prolog";
    rev = "v${version}";
    sha256 = "3NHpEg6QaUaqbBCq8uM5hFcqS24q4XrOnKjMmn8Z1Dg=";
    sha256 = "bDLVOXX9nv6Guu5czRFkviJf7dBiaqt5O8SLUJlcBZo=";
  };

  cargoPatches = [
    # Use system openssl, gmp, mpc and mpfr.
    ./cargo.patch

    ./fix-tests.patch

    # Avoid testing failing with "couldn't save history"
    (fetchpatch {
      name = "fix-tests-1";
      url = "https://patch-diff.githubusercontent.com/raw/mthom/scryer-prolog/pull/1342.patch";
      sha256 = "2N0AOkFuf+H/aUn2QTXgmqjmvShTxHxB6kNuNdNoVRI=";
    })
  ];

  cargoSha256 = "nqAHVXAmTW9mdE2L2yhpOTz16JbYgQUmCgiFq9pBzUU=";
  cargoSha256 = "A6HtvxGTjJliDMUSGkQKB13FRyfBU4EPvrlZ97ic0Ic=";

  nativeBuildInputs = [ pkg-config rustfmt];
  buildInputs = [ openssl gmp libmpc mpfr ];
+0 −29
Original line number Diff line number Diff line
diff --git a/tests/scryer/src_tests.rs b/tests/scryer/src_tests.rs
index b0b9efb5..8fddd842 100644
--- a/tests/scryer/src_tests.rs
+++ b/tests/scryer/src_tests.rs
@@ -46,24 +46,6 @@ fn rules() {
     load_module_test("src/tests/rules.pl", "");
 }
 
-#[serial]
-#[test]
-fn setup_call_cleanup_load() {
-    load_module_test(
-        "src/tests/setup_call_cleanup.pl",
-        "1+21+31+2>_17737+_177381+_158071+2>41+2>_177381+2>31+2>31+2>4ba"
-    );
-}
-
-#[test]
-fn setup_call_cleanup_process() {
-    run_top_level_test_with_args(
-        &["src/tests/setup_call_cleanup.pl", "-f", "-g", "halt"],
-        "",
-        "1+21+31+2>_19590+_195911+_176601+2>41+2>_195911+2>31+2>31+2>4ba"
-    );
-}
-
 #[serial]
 #[test]
 fn clpz_load() {