Browse Source

Merge pull request #43877 from vbgl/ocaml-ppx_blob-0.4.0

ocamlPackages.ppx_blob: 0.2 -> 0.4.0
nixos-19.03
Jörg Thalheim 3 years ago
parent
commit
e85db6863a
No account linked to committer's email address
1 changed files with 18 additions and 7 deletions
  1. 18
    7
      pkgs/development/ocaml-modules/ppx_blob/default.nix

+ 18
- 7
pkgs/development/ocaml-modules/ppx_blob/default.nix View File

@@ -1,15 +1,26 @@
1
-{ stdenv, buildOcaml, fetchurl, ppx_tools }:
1
+{ stdenv, fetchurl, ocaml, findlib, jbuilder, alcotest
2
+, ocaml-migrate-parsetree
3
+}:
2 4
 
3
-buildOcaml rec {
4
-  name = "ppx_blob";
5
-  version = "0.2";
5
+stdenv.mkDerivation rec {
6
+  name = "ocaml${ocaml.version}-ppx_blob-${version}";
7
+  version = "0.4.0";
6 8
 
7 9
   src = fetchurl {
8
-    url = "https://github.com/johnwhitington/ppx_blob/archive/v${version}.tar.gz";
9
-    sha256 = "0kvqfm47f4xbgz0cl7ayz29myyb24xskm35svqrgakjq12nkpsss";
10
+    url = "https://github.com/johnwhitington/ppx_blob/releases/download/${version}/ppx_blob-${version}.tbz";
11
+    sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16";
10 12
   };
11 13
 
12
-  buildInputs = [ ppx_tools ];
14
+  unpackCmd = "tar xjf $curSrc";
15
+
16
+  buildInputs = [ ocaml findlib jbuilder alcotest ocaml-migrate-parsetree ];
17
+
18
+  buildPhase = "dune build -p ppx_blob";
19
+
20
+  doCheck = true;
21
+  checkPhase = "dune runtest -p ppx_blob";
22
+
23
+  inherit (jbuilder) installPhase;
13 24
 
14 25
   meta = with stdenv.lib; {
15 26
     homepage = https://github.com/johnwhitington/ppx_blob;

Loading…
Cancel
Save