diff options
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/stog/default.nix | 40 | ||||
-rw-r--r-- | pkgs/applications/misc/stog/install.patch | 18 | ||||
-rw-r--r-- | pkgs/applications/misc/stog/uri.patch | 13 |
3 files changed, 26 insertions, 45 deletions
diff --git a/pkgs/applications/misc/stog/default.nix b/pkgs/applications/misc/stog/default.nix index 442750837bb..91a77d8de6f 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 a2407d3079f..00000000000 --- 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 08063a38add..00000000000 --- 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 = |