summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2021-12-23 14:23:10 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2021-12-30 08:23:22 +0100
commitd50c9666ca2b96b4488551ec968babe4cc45c52b (patch)
tree7c4bb59b8ca5c2d3a8c91ab1b418000e70144f9b
parentc4377767bb43e6c52efa7aadc86b6fb68178acf5 (diff)
stog: 0.18.0 → 0.20.0
ocamlPackages.higlo: 0.6 → 0.8 ocamlPackages.iri: 0.4.0 → 0.6.0 ocamlPackages.ocf: 0.5.0 → 0.8.0 ocamlPackages.ocf_ppx: init at 0.8.0 ocamlPackages.xtmpl: 0.17.0 → 0.19.0 ocamlPackages.xtmpl_ppx: init at 0.19.0
-rw-r--r--pkgs/applications/misc/stog/default.nix40
-rw-r--r--pkgs/applications/misc/stog/install.patch18
-rw-r--r--pkgs/applications/misc/stog/uri.patch13
-rw-r--r--pkgs/development/ocaml-modules/higlo/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/higlo/install.patch14
-rw-r--r--pkgs/development/ocaml-modules/iri/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/ocf/default.nix33
-rw-r--r--pkgs/development/ocaml-modules/ocf/ppx.nix14
-rw-r--r--pkgs/development/ocaml-modules/xtmpl/default.nix30
-rw-r--r--pkgs/development/ocaml-modules/xtmpl/jsoo.patch26
-rw-r--r--pkgs/development/ocaml-modules/xtmpl/ppx.nix14
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
13 files changed, 94 insertions, 162 deletions
diff --git a/pkgs/applications/misc/stog/default.nix b/pkgs/applications/misc/stog/default.nix
index 442750837bb5..91a77d8de6fd 100644
--- a/pkgs/applications/misc/stog/default.nix
+++ b/pkgs/applications/misc/stog/default.nix
@@ -1,32 +1,44 @@
-{ lib, stdenv, fetchFromGitLab, ocaml, findlib, ocf, ptime,
- uutf, uri, ppx_blob, xtmpl, ocaml_lwt, higlo, omd
+{ lib, buildDunePackage, fetchFromGitLab, ocaml
+, fmt, lwt_ppx, menhir, ocf_ppx, ppx_blob, xtmpl_ppx
+, dune-build-info, dune-site, higlo, logs, lwt, ocf, ptime, uri, uutf, xtmpl
}:
-stdenv.mkDerivation rec {
+if lib.versionAtLeast ocaml.version "4.13"
+then throw "stog is not available for OCaml ${ocaml.version}"
+else
+
+buildDunePackage rec {
pname = "stog";
- version = "0.18.0";
+ version = "0.20.0";
+ useDune2 = true;
+ minimalOCamlVersion = "4.12";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "zoggy";
repo = "stog";
rev = version;
- sha256 = "154gl3ljxqlw8wz1vmsyv8180igrl5bjq0wir7ybrnzq2cdflkv0";
+ sha256 = "sha256:0krj5w4y05bcfx7hk9blmap8avl31gp7yi01lpqzs6ync23mvm0x";
};
- buildInputs = [ ocaml uutf ];
- propagatedBuildInputs = [ findlib omd ppx_blob ocf ptime uri xtmpl ocaml_lwt higlo ];
-
- createFindlibDestdir = true;
-
- patches = [ ./install.patch ./uri.patch ];
+ buildInputs = [ fmt lwt_ppx menhir ocf_ppx ppx_blob xtmpl_ppx ];
+ propagatedBuildInputs = [
+ dune-build-info
+ dune-site
+ higlo
+ logs
+ lwt
+ ocf
+ ppx_blob
+ ptime
+ uri
+ uutf
+ xtmpl
+ ];
meta = with lib; {
description = "XML documents and web site compiler";
homepage = "https://www.good-eris.net/stog";
license = licenses.lgpl3;
- platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ];
};
}
-
-
diff --git a/pkgs/applications/misc/stog/install.patch b/pkgs/applications/misc/stog/install.patch
deleted file mode 100644
index a2407d3079f5..000000000000
--- a/pkgs/applications/misc/stog/install.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/Makefile b/src/Makefile
-index 736dd037..79a85b9c 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -431,11 +431,12 @@ install-lib:
- install-share:
-
- install-bin:
-+ mkdir $(out)/bin
- $(CP) $(MAIN) $(MAIN_BYTE) $(TMPL) $(TMPL_BYTE) \
- $(SERVER) $(SERVER_BYTE) $(OCAML_SESSION) \
- $(MK_STOG) $(MK_STOG_BYTE) $(MK_STOG_OCAML) \
- $(LATEX2STOG) $(LATEX2STOG_BYTE) \
-- `dirname \`which $(OCAMLC)\``/
-+ $(out)/bin
-
- uninstall: uninstall-lib uninstall-share uninstall-bin
-
diff --git a/pkgs/applications/misc/stog/uri.patch b/pkgs/applications/misc/stog/uri.patch
deleted file mode 100644
index 08063a38add4..000000000000
--- a/pkgs/applications/misc/stog/uri.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/stog_url.ml b/src/stog_url.ml
-index 5d30a43f..c67bfc36 100644
---- a/src/stog_url.ml
-+++ b/src/stog_url.ml
-@@ -40,7 +40,7 @@ let of_string s =
- with _ ->
- failwith (Printf.sprintf "Malformed URL %S" s)
- ;;
--let to_string = Uri.to_string ;;
-+let to_string u = Uri.to_string u;;
-
- let path url =
- let l =
diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix
index 3c4b7a37f99e..19b2fa8942a5 100644
--- a/pkgs/development/ocaml-modules/higlo/default.nix
+++ b/pkgs/development/ocaml-modules/higlo/default.nix
@@ -1,27 +1,23 @@
-{ lib, stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }:
+{ lib, buildDunePackage, fetchFromGitLab, sedlex_2, xtmpl }:
-stdenv.mkDerivation rec {
+buildDunePackage rec {
pname = "higlo";
- version = "0.6";
- src = fetchFromGitHub {
+ version = "0.8";
+ useDune2 = true;
+ src = fetchFromGitLab {
+ domain = "framagit.org";
owner = "zoggy";
repo = "higlo";
- rev = "release-${version}";
- sha256 = "0m0qyk2ydivai54502s45sdw9w4xr0j3jpwyc4vqk62a7iz9ihxh";
+ rev = version;
+ sha256 = "sha256:09hsbwy5asacgh4gdj0vjpy4kzfnq3qji9szbsbyswsf1nbyczir";
};
- buildInputs = [ ocaml findlib ];
- propagatedBuildInputs = [ xtmpl ulex ];
-
- createFindlibDestdir = true;
-
- patches = ./install.patch;
+ propagatedBuildInputs = [ sedlex_2 xtmpl ];
meta = with lib; {
description = "OCaml library for syntax highlighting";
- homepage = "https://zoggy.github.io/higlo/";
+ inherit (src.meta) homepage;
license = licenses.lgpl3;
- platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ];
};
}
diff --git a/pkgs/development/ocaml-modules/higlo/install.patch b/pkgs/development/ocaml-modules/higlo/install.patch
deleted file mode 100644
index bbdaace293bf..000000000000
--- a/pkgs/development/ocaml-modules/higlo/install.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Makefile b/Makefile
-index b8c2e01..fcd07ed 100644
---- a/Makefile
-+++ b/Makefile
-@@ -149,7 +149,8 @@ webdoc:
- install: install-lib install-bin
-
- install-bin:
-- $(CP) $(HIGLO) $(HIGLO_BYTE) $(MK_HIGLO) `dirname \`which ocamlfind\``/
-+ mkdir -p $(out)/bin
-+ $(CP) $(HIGLO) $(HIGLO_BYTE) $(MK_HIGLO) $(out)/bin
-
- install-lib: higlo.cmo higlo.cmx higlo.cmxs $(HIGLO) $(HIGLO_BYTE)
- ocamlfind install higlo META LICENSE \
diff --git a/pkgs/development/ocaml-modules/iri/default.nix b/pkgs/development/ocaml-modules/iri/default.nix
index 0845e4c1841e..6a00fb453dfd 100644
--- a/pkgs/development/ocaml-modules/iri/default.nix
+++ b/pkgs/development/ocaml-modules/iri/default.nix
@@ -1,34 +1,26 @@
-{ stdenv, lib, fetchFromGitLab, ocaml, findlib
-, sedlex, uunf, uutf
+{ lib, buildDunePackage, fetchFromGitLab
+, sedlex_2, uunf, uutf
}:
-if !lib.versionAtLeast ocaml.version "4.03"
-then throw "iri is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
- version = "0.4.0";
- name = "ocaml${ocaml.version}-iri-${version}";
+buildDunePackage rec {
+ pname = "iri";
+ version = "0.6.0";
+ useDune2 = true;
src = fetchFromGitLab {
domain = "framagit.org";
owner = "zoggy";
repo = "ocaml-iri";
rev = version;
- sha256 = "0fsmfmzmyggm0h77a7mb0n41vqi6q4ln1xzsv72zbvysa7l8w84q";
+ sha256 = "sha256:0zk8nnwcyljkc1a556byncv6cn1vqhk4267z1lm15flh1k7chyax";
};
- buildInputs = [ ocaml findlib ];
-
- propagatedBuildInputs = [ sedlex uunf uutf ];
-
- createFindlibDestdir = true;
+ propagatedBuildInputs = [ sedlex_2 uunf uutf ];
meta = {
description = "IRI (RFC3987) native OCaml implementation";
license = lib.licenses.lgpl3;
maintainers = [ lib.maintainers.vbgl ];
inherit (src.meta) homepage;
- inherit (ocaml.meta) platforms;
};
}
diff --git a/pkgs/development/ocaml-modules/ocf/default.nix b/pkgs/development/ocaml-modules/ocf/default.nix
index ee14a83d57ce..30f589e75613 100644
--- a/pkgs/development/ocaml-modules/ocf/default.nix
+++ b/pkgs/development/ocaml-modules/ocf/default.nix
@@ -1,37 +1,24 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }:
+{ lib, buildDunePackage, fetchFromGitLab, yojson }:
-if lib.versionOlder ocaml.version "4.03"
-|| lib.versionAtLeast ocaml.version "4.08"
-then throw "ocf not supported for ocaml ${ocaml.version}"
-else
-stdenv.mkDerivation rec {
+buildDunePackage rec {
pname = "ocf";
- version = "0.5.0";
- src = fetchFromGitHub {
+ version = "0.8.0";
+ useDune2 = true;
+ minimalOCamlVersion = "4.03";
+ src = fetchFromGitLab {
+ domain = "framagit.org";
owner = "zoggy";
repo = "ocf";
- rev = "release-${version}";
- sha256 = "1fhq9l2nmr39hxzpavc0jssmba71nnmhsncdn4dsbh2ylv29w56y";
+ rev = version;
+ sha256 = "sha256:00ap3q5yjqmpk87lxqv1j2wkc7583ynhjr1jjrfn9r0j2h9pfd60";
};
- buildInputs = [ ocaml findlib ppx_tools ];
propagatedBuildInputs = [ yojson ];
- createFindlibDestdir = true;
-
- dontStrip = true;
-
- patches = [(fetchpatch {
- url = "https://github.com/zoggy/ocf/commit/3a231c7a6c5e535a77c25e207af8952793436444.patch";
- sha256 = "0nc8cggc5gxhch9amaz3s71lxs1xbgi7fs9p90cng04dsgr64xk5";
- })
- ];
-
meta = with lib; {
description = "OCaml library to read and write configuration options in JSON syntax";
- homepage = "https://zoggy.github.io/ocf/";
+ homepage = "https://zoggy.frama.io/ocf/";
license = licenses.lgpl3;
- platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ];
};
}
diff --git a/pkgs/development/ocaml-modules/ocf/ppx.nix b/pkgs/development/ocaml-modules/ocf/ppx.nix
new file mode 100644
index 000000000000..0b1f6998ccad
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocf/ppx.nix
@@ -0,0 +1,14 @@
+{ buildDunePackage, ocf, ppxlib }:
+
+buildDunePackage {
+ pname = "ocf_ppx";
+ minimalOCamlVersion = "4.11";
+
+ inherit (ocf) src version useDune2;
+
+ buildInputs = [ ppxlib ocf ];
+
+ meta = ocf.meta // {
+ description = "Preprocessor for Ocf library";
+ };
+}
diff --git a/pkgs/development/ocaml-modules/xtmpl/default.nix b/pkgs/development/ocaml-modules/xtmpl/default.nix
index f1c1f15dc72d..7c2f0a01e53c 100644
--- a/pkgs/development/ocaml-modules/xtmpl/default.nix
+++ b/pkgs/development/ocaml-modules/xtmpl/default.nix
@@ -1,39 +1,23 @@
-{ lib, stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml
-, js_of_ocaml-ppx, re }:
+{ lib, buildDunePackage, fetchFromGitLab, iri, re, sedlex_2, uutf }:
-if lib.versionOlder ocaml.version "4.03"
-|| lib.versionAtLeast ocaml.version "4.11"
-then throw "xtmpl not supported for ocaml ${ocaml.version}"
-else
-stdenv.mkDerivation rec {
- name = "ocaml${ocaml.version}-xtmpl-${version}";
- version = "0.17.0";
+buildDunePackage rec {
+ pname = "xtmpl";
+ version = "0.19.0";
+ useDune2 = true;
src = fetchFromGitLab {
domain = "framagit.org";
owner = "zoggy";
repo = "xtmpl";
rev = version;
- sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221";
+ sha256 = "sha256:0vwj0aayg60wm98d91fg3hmj90730liljy4cn8771dpxvz8m07bw";
};
- patches = [ ./jsoo.patch ];
-
- postPatch = ''
- substituteInPlace Makefile --replace js_of_ocaml.ppx js_of_ocaml-ppx
- '';
-
- buildInputs = [ ocaml findlib ppx_tools js_of_ocaml js_of_ocaml-ppx ];
- propagatedBuildInputs = [ iri re ];
-
- createFindlibDestdir = true;
-
- dontStrip = true;
+ propagatedBuildInputs = [ iri re sedlex_2 uutf ];
meta = with lib; {
description = "XML templating library for OCaml";
homepage = "https://www.good-eris.net/xtmpl/";
license = licenses.lgpl3;
- platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ];
};
}
diff --git a/pkgs/development/ocaml-modules/xtmpl/jsoo.patch b/pkgs/development/ocaml-modules/xtmpl/jsoo.patch
deleted file mode 100644
index 7546dbca924a..000000000000
--- a/pkgs/development/ocaml-modules/xtmpl/jsoo.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/xtmpl_js.ml b/xtmpl_js.ml
-index e0d3894..991d1b3 100644
---- a/xtmpl_js.ml
-+++ b/xtmpl_js.ml
-@@ -25,6 +25,8 @@
-
- (** *)
-
-+open Js_of_ocaml
-+
- let log s = Firebug.console##log (Js.string s);;
-
- module X = Xtmpl_rewrite
-diff --git a/xtmpl_js.mli b/xtmpl_js.mli
-index d709896..5ed471c 100644
---- a/xtmpl_js.mli
-+++ b/xtmpl_js.mli
-@@ -25,6 +25,8 @@
-
- (** Convenient functions to use in JS code *)
-
-+open Js_of_ocaml
-+
- (** Create a new tree of DOM nodes from a given XML tree.
- Errors are logged to the firebug console.
- @param doc Default is [Dom_html.document].
diff --git a/pkgs/development/ocaml-modules/xtmpl/ppx.nix b/pkgs/development/ocaml-modules/xtmpl/ppx.nix
new file mode 100644
index 000000000000..b6f5bd65000f
--- /dev/null
+++ b/pkgs/development/ocaml-modules/xtmpl/ppx.nix
@@ -0,0 +1,14 @@
+{ buildDunePackage, xtmpl, ppxlib }:
+
+buildDunePackage {
+ pname = "xtmpl_ppx";
+ minimalOCamlVersion = "4.11";
+
+ inherit (xtmpl) src version useDune2;
+
+ buildInputs = [ ppxlib xtmpl ];
+
+ meta = xtmpl.meta // {
+ description = "Xml templating library, ppx extension";
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8171f460f451..a412cb147232 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -28661,7 +28661,7 @@ with pkgs;
stalonetray = callPackage ../applications/window-managers/stalonetray {};
- inherit (ocaml-ng.ocamlPackages_4_07) stog;
+ inherit (ocamlPackages) stog;
stp = callPackage ../applications/science/logic/stp { };
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index b80eb3f0e559..aed626868651 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -932,6 +932,8 @@ let
ocf = callPackage ../development/ocaml-modules/ocf { };
+ ocf_ppx = callPackage ../development/ocaml-modules/ocf/ppx.nix { };
+
ocp-build = callPackage ../development/tools/ocaml/ocp-build { };
ocp-indent = callPackage ../development/tools/ocaml/ocp-indent { };
@@ -1404,6 +1406,8 @@ let
xtmpl = callPackage ../development/ocaml-modules/xtmpl { };
+ xtmpl_ppx = callPackage ../development/ocaml-modules/xtmpl/ppx.nix { };
+
yaml = callPackage ../development/ocaml-modules/yaml { };
yaml-sexp = callPackage ../development/ocaml-modules/yaml/yaml-sexp.nix { };