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_blob | |
parent | 5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff) | |
download | nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2 nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.zip |
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_blob')
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_blob/default.nix | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_blob/default.nix b/pkgs/development/ocaml-modules/ppx_blob/default.nix index 72e0e5e121ad..b36eaed500f8 100644 --- a/pkgs/development/ocaml-modules/ppx_blob/default.nix +++ b/pkgs/development/ocaml-modules/ppx_blob/default.nix @@ -1,26 +1,18 @@ -{ stdenv, fetchurl, ocaml, findlib, dune, alcotest -, ocaml-migrate-parsetree -}: +{ stdenv, fetchurl, buildDunePackage, alcotest, ocaml-migrate-parsetree }: -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-ppx_blob-${version}"; +buildDunePackage rec { + pname = "ppx_blob"; version = "0.4.0"; src = fetchurl { - url = "https://github.com/johnwhitington/ppx_blob/releases/download/${version}/ppx_blob-${version}.tbz"; + url = "https://github.com/johnwhitington/${pname}/releases/download/${version}/ppx_blob-${version}.tbz"; sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16"; }; unpackCmd = "tar xjf $curSrc"; - buildInputs = [ ocaml findlib dune alcotest ocaml-migrate-parsetree ]; - - buildPhase = "dune build -p ppx_blob"; - + buildInputs = [ alcotest ocaml-migrate-parsetree ]; doCheck = true; - checkPhase = "dune runtest -p ppx_blob"; - - inherit (dune) installPhase; meta = with stdenv.lib; { homepage = https://github.com/johnwhitington/ppx_blob; |