-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
default.nix
49 lines (41 loc) · 1.24 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
with (import (builtins.fetchTarball {
name = "nixpkgs-21.11";
# Tarball of tagged release of Nixpkgs 21.11
url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz";
# Tarball hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02";
}) {});
ocamlPackages.buildDunePackage rec {
pname = "stanc";
version = "2.29.0";
# Only depend on necessary files to minimize rebuilds
src = lib.sourceByRegex ./. [ "^src.*$" "^dune-project$" "^stanc\.opam$" ];
# Uncomment and add tree as a builtInput for a debugging mode that checks which files are included
#buildPhase = ''tree'';
# Set to true and add the src regex "^test.*$" to run tests on every build
doCheck = false;
# doCheck = true;
buildPhase = ''dune build -p stanc'';
useDune2 = true;
buildInputs = with ocamlPackages; [
stdenv
dune_2
ocaml
yojson
menhir
menhirLib
core
ppx_jane
ppx_deriving
findlib
stdlib-shims
fmt
re
];
meta = {
homepage = https://github.com/stan-dev/stanc3;
description = "The Stan transpiler (from Stan to C++ and beyond)";
license = lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ rybern ];
};
}