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
|
2023-11-06 09:45:38 +00:00
|
|
|
, fetchpatch
|
2023-02-26 04:35:23 +00:00
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2019-12-05 13:06:15 +00:00
|
|
|
, gmp
|
|
|
|
, libmpc
|
|
|
|
, mpfr
|
2023-02-26 04:35:23 +00:00
|
|
|
, stdenv
|
2019-12-05 13:06:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "scryer-prolog";
|
2023-11-06 09:45:38 +00:00
|
|
|
version = "0.9.3";
|
2019-12-05 13:06:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mthom";
|
|
|
|
repo = "scryer-prolog";
|
|
|
|
rev = "v${version}";
|
2023-11-06 09:45:38 +00:00
|
|
|
hash = "sha256-0J69Zl+ONvR6T+xf2YeShwn3/JWOHyFHLpNFwmEaIOI=";
|
2019-12-05 13:06:15 +00:00
|
|
|
};
|
|
|
|
|
2023-11-06 09:45:38 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "cargo-lock-version-bump.patch";
|
|
|
|
url = "https://github.com/mthom/scryer-prolog/commit/d6fe5b5aaddb9886a8a34841a65cb28c317c2913.patch";
|
|
|
|
hash = "sha256-xkGsjVV/FcyZXGkI84FlqcRIuDM7isCCWZ1sbKql7es=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-03-25 23:16:46 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"modular-bitfield-0.11.2" = "sha256-vcx+xt5owZVWOlKwudAr0EB1zlLLL5pVfWokw034BQI=";
|
|
|
|
};
|
|
|
|
};
|
2022-03-14 19:31:05 +00:00
|
|
|
|
2023-02-26 04:35:23 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-12-05 13:06:15 +00:00
|
|
|
buildInputs = [ openssl gmp libmpc mpfr ];
|
|
|
|
|
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; {
|
2022-05-28 13:30:35 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2023-02-26 04:35:23 +00:00
|
|
|
description = "A modern Prolog implementation written mostly in Rust";
|
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
|
|
|
};
|
|
|
|
}
|