summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/ocaml-modules/opam-file-format/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/opam-file-format/optional-static.patch13
2 files changed, 6 insertions, 32 deletions
diff --git a/pkgs/development/ocaml-modules/opam-file-format/default.nix b/pkgs/development/ocaml-modules/opam-file-format/default.nix
index 04079fcb4761..dd16a369881c 100644
--- a/pkgs/development/ocaml-modules/opam-file-format/default.nix
+++ b/pkgs/development/ocaml-modules/opam-file-format/default.nix
@@ -1,35 +1,22 @@
-{ stdenv, lib, fetchpatch, fetchFromGitHub, ocaml, findlib }:
+{ lib, buildDunePackage, fetchFromGitHub }:
-stdenv.mkDerivation rec {
+buildDunePackage rec {
version = "2.1.2";
- name = "ocaml${ocaml.version}-opam-file-format-${version}";
+ pname = "opam-file-format";
+
+ useDune2 = true;
src = fetchFromGitHub {
owner = "ocaml";
- repo = "opam-file-format";
+ repo = pname;
rev = version;
sha256 = "19xppn2s3yjid8jc1wh8gdf5mgmlpzby2cf2slmnbyrgln3vj6i2";
};
- buildInputs = [ ocaml findlib ];
-
- installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
-
- patches = [
- ./optional-static.patch
- # fix no implementation error for OpamParserTypes
- # can be removed at next release presumably
- (fetchpatch {
- url = "https://github.com/ocaml/opam-file-format/pull/41/commits/2a9a92ec334e0bf2adf8d2b4c1b83f1f9f68df8f.patch";
- sha256 = "090nl7yciyyidmbjfryw3wyx7srh6flnrr4zgyhv4kvjsvq944y2";
- })
- ];
-
meta = {
description = "Parser and printer for the opam file syntax";
license = lib.licenses.lgpl21;
maintainers = [ lib.maintainers.vbgl ];
inherit (src.meta) homepage;
- inherit (ocaml.meta) platforms;
};
}
diff --git a/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch b/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch
deleted file mode 100644
index 5501fdd0c6c3..000000000000
--- a/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -u a/Makefile b/Makefile
---- a/Makefile
-+++ b/Makefile
-@@ -1,1 +1,5 @@
--TARGETS = opam-file-format.cma opam-file-format.cmxa opam-file-format.cmxs
-+TARGETS = opam-file-format.cma opam-file-format.cmxa
-+
-+ifeq "$(NATDYNLINK)" "true"
-+TARGETS = $(TARGETS) opam-file-format.cmxs
-+endif
-
-all: $(TARGETS)
-