about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/ppx_blob
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/ppx_blob')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix
new file mode 100644
index 000000000000..d7d662e74a5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix
@@ -0,0 +1,21 @@
+{ lib, fetchurl, buildDunePackage, ocaml, alcotest, ocaml-migrate-parsetree }:
+
+buildDunePackage rec {
+  pname = "ppx_blob";
+  version = "0.4.0";
+
+  src = fetchurl {
+    url = "https://github.com/johnwhitington/${pname}/releases/download/${version}/ppx_blob-${version}.tbz";
+    sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16";
+  };
+
+  checkInputs = lib.optional doCheck alcotest;
+  buildInputs = [ ocaml-migrate-parsetree ];
+  doCheck = lib.versionAtLeast ocaml.version "4.03";
+
+  meta = with lib; {
+    homepage = "https://github.com/johnwhitington/ppx_blob";
+    description = "OCaml ppx to include binary data from a file as a string";
+    license = licenses.unlicense;
+  };
+}