diff --git a/pkgs/development/compilers/scryer-prolog/cargo.patch b/pkgs/development/compilers/scryer-prolog/cargo.patch deleted file mode 100644 index 48db924ca261..000000000000 --- a/pkgs/development/compilers/scryer-prolog/cargo.patch +++ /dev/null @@ -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" diff --git a/pkgs/development/compilers/scryer-prolog/default.nix b/pkgs/development/compilers/scryer-prolog/default.nix index 739d600bf63d..4850f299dcbb 100644 --- a/pkgs/development/compilers/scryer-prolog/default.nix +++ b/pkgs/development/compilers/scryer-prolog/default.nix @@ -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 ];