about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2021-02-17 18:03:28 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2021-02-23 22:11:44 +0100
commit439eeda150202d79fc66aefefdd4b88daaaa9a55 (patch)
treefa29ee6c3fa595e0fd64b7e105ac3a6228e3c67a
parentf9a4e6b1e242ce4f215a45b480acbddd34babb2b (diff)
ocamlPackages.psmt2-frontend: 0.2 → 0.3.1
-rw-r--r--pkgs/development/ocaml-modules/psmt2-frontend/default.nix28
1 files changed, 10 insertions, 18 deletions
diff --git a/pkgs/development/ocaml-modules/psmt2-frontend/default.nix b/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
index 30fb5de7cb8e4..dbdf3970f6367 100644
--- a/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
+++ b/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
@@ -1,35 +1,27 @@
-{ stdenv, lib, fetchFromGitHub, autoreconfHook, ocaml, findlib, menhir }:
+{ lib, fetchFromGitHub, buildDunePackage, menhir }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
-then throw "psmt2-frontend is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  version = "0.2";
-  name = "ocaml${ocaml.version}-psmt2-frontend-${version}";
+buildDunePackage rec {
+  version = "0.3.1";
+  pname = "psmt2-frontend";
 
   src = fetchFromGitHub {
-    owner = "Coquera";
-    repo = "psmt2-frontend";
+    owner = "ACoquereau";
+    repo = pname;
     rev = version;
-    sha256 = "097zmbrx4gp2gnrxdmsm9lkkp5450gwi0blpxqy3833m6k5brx3n";
+    sha256 = "038jrfsq09nhnzpjiishg4adk09w3aw1bpczgbj66lqqilkd6gci";
   };
 
-  prefixKey = "-prefix ";
-
-  nativeBuildInputs = [ autoreconfHook ];
-  buildInputs = [ ocaml findlib menhir ];
+  useDune2 = true;
 
-  createFindlibDestdir = true;
+  minimumOCamlVersion = "4.03";
 
-  installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
+  buildInputs = [ menhir ];
 
   meta = {
     description = "A simple parser and type-checker for polomorphic extension of the SMT-LIB 2 language";
     license = lib.licenses.asl20;
     maintainers = [ lib.maintainers.vbgl ];
     inherit (src.meta) homepage;
-    inherit (ocaml.meta) platforms;
   };
 
 }