2023-02-26 04:35:23 +00:00
|
|
|
{ lib
|
2019-12-05 13:06:15 +00:00
|
|
|
, rustPlatform
|
2023-02-26 04:35:23 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2019-12-05 13:06:15 +00:00
|
|
|
, gmp
|
|
|
|
, libmpc
|
|
|
|
, mpfr
|
2023-02-26 04:35:23 +00:00
|
|
|
, stdenv
|
2024-04-20 10:36:50 +01:00
|
|
|
, darwin
|
2019-12-05 13:06:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "scryer-prolog";
|
2024-03-02 01:32:09 +00:00
|
|
|
version = "0.9.4";
|
2019-12-05 13:06:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mthom";
|
|
|
|
repo = "scryer-prolog";
|
|
|
|
rev = "v${version}";
|
2024-03-02 01:32:09 +00:00
|
|
|
hash = "sha256-0c0MsjrHRitg+5VEHB9/iSuiqcPztF+2inDZa9fQpwU=";
|
2019-12-05 13:06:15 +00:00
|
|
|
};
|
|
|
|
|
2024-03-02 01:32:09 +00:00
|
|
|
cargoSha256 = "sha256-q8s6HAJhKnMhsgZk5plR+ar3CpLKNqjrD14roDWLwfo=";
|
2022-03-14 19:31:05 +00:00
|
|
|
|
2023-02-26 04:35:23 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-04-20 10:36:50 +01:00
|
|
|
|
|
|
|
buildInputs = [ openssl gmp libmpc mpfr ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
2019-12-05 13:06:15 +00:00
|
|
|
|
2023-02-26 04:35:23 +00:00
|
|
|
CARGO_FEATURE_USE_SYSTEM_LIBS = true;
|
|
|
|
|
2019-12-05 13:06:15 +00:00
|
|
|
meta = with lib; {
|
2023-02-26 04:35:23 +00:00
|
|
|
description = "Modern Prolog implementation written mostly in Rust";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "scryer-prolog";
|
2019-12-05 13:06:15 +00:00
|
|
|
homepage = "https://github.com/mthom/scryer-prolog";
|
|
|
|
license = with licenses; [ bsd3 ];
|
2023-11-06 18:47:43 +00:00
|
|
|
maintainers = with maintainers; [ malbarbo wkral ];
|
2019-12-05 13:06:15 +00:00
|
|
|
};
|
|
|
|
}
|