tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
ppx_core: init at 113.33.03
Matthew Maurer
9 years ago
95d9e2b8
3c5e31ec
+49
3 changed files
expand all
collapse all
unified
split
pkgs
development
ocaml-modules
janestreet
buildOcamlJane.nix
ppx-core.nix
top-level
all-packages.nix
+30
pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix
···
1
1
+
{ buildOcaml, opam, js_build_tools, ocaml_oasis, fetchurl } :
2
2
+
3
3
+
{ name, version ? "113.33.03", buildInputs ? [],
4
4
+
hash ? "",
5
5
+
minimumSupportedOcamlVersion ? "4.02", ...
6
6
+
}@args:
7
7
+
8
8
+
buildOcaml (args // {
9
9
+
inherit name version minimumSupportedOcamlVersion;
10
10
+
src = fetchurl {
11
11
+
url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz";
12
12
+
sha256 = hash;
13
13
+
};
14
14
+
15
15
+
hasSharedObjects = true;
16
16
+
17
17
+
buildInputs = [ ocaml_oasis js_build_tools opam ] ++ buildInputs;
18
18
+
19
19
+
dontAddPrefix = true;
20
20
+
21
21
+
configurePhase = "./configure --prefix $out";
22
22
+
23
23
+
buildPhase = "OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make";
24
24
+
25
25
+
installPhase = ''
26
26
+
opam-installer -i --prefix $prefix --libdir `ocamlfind printconf destdir` --stubsdir `ocamlfind printconf destdir`/${name} ${name}.install
27
27
+
if [ -d $out/lib/${name} ]; then if [ "$(ls -A $out/lib/${name})" ]; then mv $out/lib/${name}/* `ocamlfind printconf destdir`/${name}; fi; rmdir $out/lib/${name}; fi
28
28
+
'';
29
29
+
30
30
+
})
+14
pkgs/development/ocaml-modules/janestreet/ppx-core.nix
···
1
1
+
{stdenv, buildOcamlJane, ppx_tools}:
2
2
+
3
3
+
buildOcamlJane rec {
4
4
+
name = "ppx_core";
5
5
+
hash = "0df7vyai488lfkyh8szw2hvn22jsyrkfvq1b91j1s0g0y27nnfax";
6
6
+
propagatedBuildInputs =
7
7
+
[ ppx_tools ];
8
8
+
9
9
+
meta = with stdenv.lib; {
10
10
+
description = "PPX standard library";
11
11
+
maintainers = [ maintainers.maurer ];
12
12
+
license = licenses.asl20;
13
13
+
};
14
14
+
}
+5
pkgs/top-level/all-packages.nix
···
5504
5504
5505
5505
# Jane Street
5506
5506
js_build_tools = callPackage ../development/ocaml-modules/janestreet/js-build-tools.nix {};
5507
5507
+
5508
5508
+
buildOcamlJane = callPackage ../development/ocaml-modules/janestreet/buildOcamlJane.nix {};
5509
5509
+
5510
5510
+
ppx_core = callPackage ../development/ocaml-modules/janestreet/ppx-core.nix {};
5511
5511
+
5507
5512
};
5508
5513
5509
5514
ocamlPackages = recurseIntoAttrs ocamlPackages_4_01_0;