about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2020-04-14 21:00:03 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2020-04-15 14:33:57 +0200
commit90bc1492ca6139a5e8dba1e64997f30c8e756511 (patch)
treef151773c672576a5cef8b7eb18531981765cb612
parent924e5cdc556fe94103920a7d8fb8c7d1597e9391 (diff)
downloadnixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar.gz
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar.bz2
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar.lz
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar.xz
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.tar.zst
nixlib-90bc1492ca6139a5e8dba1e64997f30c8e756511.zip
ocamlPackages.asn1-combinators: 0.2.0 -> 0.2.2
-rw-r--r--pkgs/development/ocaml-modules/asn1-combinators/default.nix46
1 files changed, 14 insertions, 32 deletions
diff --git a/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/pkgs/development/ocaml-modules/asn1-combinators/default.nix
index 1dceef3bf169..16b4413291a5 100644
--- a/pkgs/development/ocaml-modules/asn1-combinators/default.nix
+++ b/pkgs/development/ocaml-modules/asn1-combinators/default.nix
@@ -1,45 +1,27 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
-, cstruct, zarith, ounit, result, topkg, ptime
+{ lib, buildDunePackage, fetchurl
+, cstruct, zarith, bigarray-compat, stdlib-shims, ptime, alcotest
 }:
 
-let param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
-    version = "0.2.0";
-    sha256 = "0yfq4hnyzx6hy05m60007cfpq88wxwa8wqzib19lnk2qrgy772mx";
-    propagatedBuildInputs = [ ptime ];
-  } else {
-    version = "0.1.3";
-    sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
-    propagatedBuildInputs = [ ];
-  };
-in
+buildDunePackage rec {
+  minimumOCamlVersion = "4.05";
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-asn1-combinators-${version}";
-  inherit (param) version;
+  pname = "asn1-combinators";
+  version = "0.2.2";
 
-  src = fetchFromGitHub {
-    owner  = "mirleft";
-    repo   = "ocaml-asn1-combinators";
-    rev    = "v${version}";
-    inherit (param) sha256;
+  src = fetchurl {
+    url = "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v${version}/asn1-combinators-v${version}.tbz";
+    sha256 = "0c9n3nki3drjwn7yv2pg7nzyzsi409laq70830wh147hvvwxbsy9";
   };
 
-  buildInputs = [ findlib ounit topkg ];
-  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;
-
-  buildPhase = "${topkg.run} build --tests true";
-
-  inherit (topkg) installPhase;
+  propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ];
 
   doCheck = true;
-  checkPhase = "${topkg.run} test";
+  checkInputs = [ alcotest ];
 
-  meta = {
+  meta = with lib; {
     homepage = "https://github.com/mirleft/ocaml-asn1-combinators";
     description = "Combinators for expressing ASN.1 grammars in OCaml";
-    license = stdenv.lib.licenses.isc;
-    maintainers = with stdenv.lib.maintainers; [ vbgl ];
+    license = licenses.isc;
+    maintainers = with maintainers; [ vbgl ];
   };
 }