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.
This commit is contained in:
parent
11ec29dd70
commit
d226cb4541
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user