diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-05 11:21:46 +0100 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-11-07 10:08:03 +0100 |
commit | 794158fcd54b862f3775bc8b54495a842a250b7b (patch) | |
tree | 333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/ppx_gen_rec | |
parent | 5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff) | |
download | nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2 nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.zip |
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_gen_rec')
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_gen_rec/default.nix | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix index 4c458b983d3..270afae754b 100644 --- a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix +++ b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix @@ -1,12 +1,11 @@ -{ stdenv, fetchurl, ocaml, findlib, dune, ocaml-migrate-parsetree }: +{ stdenv, fetchurl, buildDunePackage, ocaml-migrate-parsetree }: -assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; - -stdenv.mkDerivation rec { +buildDunePackage rec { pname = "ppx_gen_rec"; - name = "ocaml${ocaml.version}-${pname}-${version}"; version = "1.0.0"; + minimumOCamlVersion = "4.01"; + src = fetchurl { url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7"; @@ -14,17 +13,12 @@ stdenv.mkDerivation rec { unpackCmd = "tar xjf $src"; - buildInputs = [ ocaml findlib dune ocaml-migrate-parsetree ]; - - buildPhase = "dune build -p ppx_gen_rec"; - - inherit (dune) installPhase; + buildInputs = [ ocaml-migrate-parsetree ]; meta = with stdenv.lib; { homepage = https://github.com/flowtype/ocaml-ppx_gen_rec; description = "ocaml preprocessor that generates a recursive module"; license = licenses.mit; - platforms = ocaml.meta.platforms or []; maintainers = [ maintainers.frontsideair ]; }; } |