2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2022-04-27 09:35:20 +00:00
|
|
|
, rustfmt
|
2021-06-28 23:13:55 +00:00
|
|
|
, gmp
|
|
|
|
, libmpc
|
|
|
|
, mpfr
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "scryer-prolog";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.9.1";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mthom";
|
|
|
|
repo = "scryer-prolog";
|
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "bDLVOXX9nv6Guu5czRFkviJf7dBiaqt5O8SLUJlcBZo=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
cargoPatches = [
|
|
|
|
# Use system openssl, gmp, mpc and mpfr.
|
|
|
|
./cargo.patch
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cargoSha256 = "A6HtvxGTjJliDMUSGkQKB13FRyfBU4EPvrlZ97ic0Ic=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config rustfmt];
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ openssl gmp libmpc mpfr ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "A modern Prolog implementation written mostly in Rust.";
|
|
|
|
homepage = "https://github.com/mthom/scryer-prolog";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ malbarbo ];
|
|
|
|
};
|
|
|
|
}
|