Merge pull request #218372 from figsoda/scryer

scryer-prolog: replace patch with environment variable, clean up
This commit is contained in:
figsoda 2023-02-27 13:38:45 -05:00 committed by GitHub
commit 70f0b88566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 38 deletions

View File

@ -1,24 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index 05e54911..3a567165 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1826,6 +1826,7 @@ dependencies = [
"futures",
"fxhash",
"git-version",
+ "gmp-mpfr-sys",
"hostname",
"hyper",
"hyper-tls",
diff --git a/Cargo.toml b/Cargo.toml
index 6e42de23..a50e3d47 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"] }
[dev-dependencies]
assert_cmd = "1.0.3"

View File

@ -1,13 +1,12 @@
{ stdenv
, lib
, fetchFromGitHub
{ lib
, rustPlatform
, rustfmt
, fetchFromGitHub
, pkg-config
, openssl
, gmp
, libmpc
, mpfr
, openssl
, pkg-config
, stdenv
}:
rustPlatform.buildRustPackage rec {
@ -21,19 +20,16 @@ rustPlatform.buildRustPackage rec {
sha256 = "bDLVOXX9nv6Guu5czRFkviJf7dBiaqt5O8SLUJlcBZo=";
};
cargoPatches = [
# Use system openssl, gmp, mpc and mpfr.
./cargo.patch
];
cargoSha256 = "sha256-tv/4GOl93nGLWyoAXY5roxRqS1twskkQTSddltH4n9U=";
cargoSha256 = "A6HtvxGTjJliDMUSGkQKB13FRyfBU4EPvrlZ97ic0Ic=";
nativeBuildInputs = [ pkg-config rustfmt];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl gmp libmpc mpfr ];
CARGO_FEATURE_USE_SYSTEM_LIBS = true;
meta = with lib; {
broken = stdenv.isDarwin;
description = "A modern Prolog implementation written mostly in Rust.";
description = "A modern Prolog implementation written mostly in Rust";
homepage = "https://github.com/mthom/scryer-prolog";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ malbarbo ];