summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-01-21 15:21:29 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2021-01-28 22:27:12 +0100
commitd226cb45416ed624d48bf96c63d3b01166248d19 (patch)
tree99bb239286df6215580d8e9623db979294f7a4f6 /pkgs/development/ocaml-modules
parent11ec29dd70d75274aa2557f3802ba91af9727508 (diff)
ocamlPackages.opam-file-format: build using dune
Since <https://github.com/NixOS/nixpkgs/pull/109143> has been merged, switching opam-file-format doesn't create a cyclical dependency of opam-file-format -> dune -> opaline -> opam-file-format anymore. Thus we switch to dune which seems to be supported better by upstream and doesn't require us to patch the 2.1.2 release.
Diffstat (limited to 'pkgs/development/ocaml-modules')
-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)
-