2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ocamlPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
ocamlPackages.buildDunePackage rec {
|
|
|
|
pname = "stanc";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.32.2";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
minimalOCamlVersion = "4.12";
|
2023-05-24 13:37:59 +00:00
|
|
|
duneVersion = "3";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stan-dev";
|
|
|
|
repo = "stanc3";
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-dngmZXVb59uV7EugYIZAqE1gk66em7iuzllbbPWK2xk=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Error: This expression has type [ `Use_Sys_unix ]
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace test/integration/run_bin_on_args.ml \
|
|
|
|
--replace "if Sys.file_exists (to_windows path) then to_windows cmd else cmd" "cmd"
|
|
|
|
'';
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = with ocamlPackages; [
|
|
|
|
menhir
|
|
|
|
];
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = with ocamlPackages; [
|
|
|
|
core_unix
|
|
|
|
menhirLib
|
|
|
|
ppx_deriving
|
|
|
|
fmt
|
|
|
|
yojson
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/stan-dev/stanc3";
|
|
|
|
description = "The Stan compiler and utilities";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wegank ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|