nixpkgs/pkgs/development/compilers/scryer-prolog/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Normal View History

2019-12-05 13:06:15 +00:00
{ lib
, fetchFromGitHub
2022-03-14 19:31:05 +00:00
, fetchpatch
2019-12-05 13:06:15 +00:00
, rustPlatform
2022-03-14 19:31:05 +00:00
, rustfmt
2019-12-05 13:06:15 +00:00
, gmp
, libmpc
, mpfr
, openssl
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "scryer-prolog";
2022-03-14 19:31:05 +00:00
version = "0.9.0";
2019-12-05 13:06:15 +00:00
src = fetchFromGitHub {
owner = "mthom";
repo = "scryer-prolog";
rev = "v${version}";
2022-03-14 19:31:05 +00:00
sha256 = "3NHpEg6QaUaqbBCq8uM5hFcqS24q4XrOnKjMmn8Z1Dg=";
2019-12-05 13:06:15 +00:00
};
2022-03-14 19:31:05 +00:00
cargoPatches = [
# Use system openssl, gmp, mpc and mpfr.
./cargo.patch
2019-12-05 13:06:15 +00:00
2022-03-14 19:31:05 +00:00
./fix-tests.patch
2019-12-05 13:06:15 +00:00
2022-03-14 19:31:05 +00:00
# Avoid testing failing with "couldn't save history"
(fetchpatch {
name = "fix-tests-1";
url = "https://patch-diff.githubusercontent.com/raw/mthom/scryer-prolog/pull/1342.patch";
sha256 = "2N0AOkFuf+H/aUn2QTXgmqjmvShTxHxB6kNuNdNoVRI=";
})
];
cargoSha256 = "nqAHVXAmTW9mdE2L2yhpOTz16JbYgQUmCgiFq9pBzUU=";
nativeBuildInputs = [ pkg-config rustfmt];
2019-12-05 13:06:15 +00:00
buildInputs = [ openssl gmp libmpc mpfr ];
meta = with lib; {
description = "A modern Prolog implementation written mostly in Rust.";
homepage = "https://github.com/mthom/scryer-prolog";
license = with licenses; [ bsd3 ];
2020-09-25 13:57:25 +00:00
maintainers = with maintainers; [ malbarbo ];
2019-12-05 13:06:15 +00:00
};
}