git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackage.ppx_import: init at 1.1
commit01910b18014f71a008089f4ebbfeb59af4daa7ba authorThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> dateThu 3 Nov 2016, 17:34 (10 years ago) parent54a0e90
2 files changed+34
pkgs/development/ocaml-modules/ppx_import/default.nix+32 pkgs/top-level/ocaml-packages.nix+2
pkgs/development/ocaml-modules/ppx_import/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{stdenv, fetchFromGitHub, buildOcaml, ocaml, opam,
2+ cppo, ppx_tools, ounit, ppx_deriving}:
3+
4+buildOcaml rec {
5+ name = "ppx_import";
6+
7+ version = "1.1";
8+
9+ minimumSupportedOcamlVersion = "4.02";
10+
11+ src = fetchFromGitHub {
12+ owner = "whitequark";
13+ repo = "ppx_import";
14+ rev = "v${version}";
15+ sha256 = "1hfvbc81dg58q7kkpn808b3j0xazrqfrr4v71sd1yvmnk71wak6k";
16+ };
17+
18+ buildInputs = [ cppo ounit ppx_deriving opam ];
19+
20+ doCheck = true;
21+ checkTarget = "test";
22+
23+ installPhase = ''
24+ opam-installer --script --prefix=$out ppx_import.install | sh
25+ ln -s $out/lib/ppx_import $out/lib/ocaml/${ocaml.version}/site-lib
26+ '';
27+
28+ meta = with stdenv.lib; {
29+ description = "A syntax extension that allows to pull in types or signatures from other compiled interface files";
30+ license = licenses.mit;
31+ };
32+}
pkgs/top-level/ocaml-packages.nix+2
@@ -416,6 +416,8 @@ let
416416 then callPackage ../development/ocaml-modules/ppx_deriving {}
417417 else null;
418418
419+ ppx_import = callPackage ../development/ocaml-modules/ppx_import {};
420+
419421 ppx_tools =
420422 if lib.versionAtLeast ocaml.version "4.02"
421423 then callPackage ../development/ocaml-modules/ppx_tools {}