depot/third_party/nixpkgs/pkgs/development/compilers/stanc/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

41 lines
914 B
Nix

{ lib
, fetchFromGitHub
, ocamlPackages
}:
ocamlPackages.buildDunePackage rec {
pname = "stanc";
version = "2.31.0";
minimalOCamlVersion = "4.12";
src = fetchFromGitHub {
owner = "stan-dev";
repo = "stanc3";
rev = "v${version}";
hash = "sha256-5GOyKVt3LHN1D6UysOZT8isVQLKexwEcK0rwI45dDcg=";
};
# 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"
'';
buildInputs = with ocamlPackages; [
core_unix
menhir
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;
};
}