2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
2021-06-28 23:13:55 +00:00
|
|
|
, rustPlatform
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
2024-05-15 15:35:15 +00:00
|
|
|
, darwin
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "scryer-prolog";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.9.4";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mthom";
|
|
|
|
repo = "scryer-prolog";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-0c0MsjrHRitg+5VEHB9/iSuiqcPztF+2inDZa9fQpwU=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-q8s6HAJhKnMhsgZk5plR+ar3CpLKNqjrD14roDWLwfo=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = [ openssl ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-05-15 15:35:15 +00:00
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
CARGO_FEATURE_USE_SYSTEM_LIBS = true;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Modern Prolog implementation written mostly in Rust";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "scryer-prolog";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/mthom/scryer-prolog";
|
|
|
|
license = with licenses; [ bsd3 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ malbarbo wkral ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|