nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix

31 lines
836 B
Nix
Raw Normal View History

2018-09-05 16:11:47 +00:00
{ stdenv, fetchurl, ocaml, findlib, dune, alcotest
2018-07-21 07:53:23 +00:00
, ocaml-migrate-parsetree
}:
2018-07-21 07:53:23 +00:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-ppx_blob-${version}";
version = "0.4.0";
src = fetchurl {
2018-07-21 07:53:23 +00:00
url = "https://github.com/johnwhitington/ppx_blob/releases/download/${version}/ppx_blob-${version}.tbz";
sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16";
};
2018-07-21 07:53:23 +00:00
unpackCmd = "tar xjf $curSrc";
2018-09-05 16:11:47 +00:00
buildInputs = [ ocaml findlib dune alcotest ocaml-migrate-parsetree ];
2018-07-21 07:53:23 +00:00
buildPhase = "dune build -p ppx_blob";
doCheck = true;
checkPhase = "dune runtest -p ppx_blob";
2018-09-05 16:11:47 +00:00
inherit (dune) installPhase;
meta = with stdenv.lib; {
homepage = https://github.com/johnwhitington/ppx_blob;
description = "OCaml ppx to include binary data from a file as a string";
license = licenses.unlicense;
};
}