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
This commit is contained in:
Vincent Laporte 2021-12-23 14:23:10 +01:00 committed by Vincent Laporte
parent c4377767bb
commit d50c9666ca
13 changed files with 94 additions and 162 deletions

View File

@ -1,32 +1,44 @@
{ lib, stdenv, fetchFromGitLab, ocaml, findlib, ocf, ptime, { lib, buildDunePackage, fetchFromGitLab, ocaml
uutf, uri, ppx_blob, xtmpl, ocaml_lwt, higlo, omd , 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"; pname = "stog";
version = "0.18.0"; version = "0.20.0";
useDune2 = true;
minimalOCamlVersion = "4.12";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "framagit.org"; domain = "framagit.org";
owner = "zoggy"; owner = "zoggy";
repo = "stog"; repo = "stog";
rev = version; rev = version;
sha256 = "154gl3ljxqlw8wz1vmsyv8180igrl5bjq0wir7ybrnzq2cdflkv0"; sha256 = "sha256:0krj5w4y05bcfx7hk9blmap8avl31gp7yi01lpqzs6ync23mvm0x";
}; };
buildInputs = [ ocaml uutf ]; buildInputs = [ fmt lwt_ppx menhir ocf_ppx ppx_blob xtmpl_ppx ];
propagatedBuildInputs = [ findlib omd ppx_blob ocf ptime uri xtmpl ocaml_lwt higlo ]; propagatedBuildInputs = [
dune-build-info
createFindlibDestdir = true; dune-site
higlo
patches = [ ./install.patch ./uri.patch ]; logs
lwt
ocf
ppx_blob
ptime
uri
uutf
xtmpl
];
meta = with lib; { meta = with lib; {
description = "XML documents and web site compiler"; description = "XML documents and web site compiler";
homepage = "https://www.good-eris.net/stog"; homepage = "https://www.good-eris.net/stog";
license = licenses.lgpl3; license = licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ]; maintainers = with maintainers; [ regnat ];
}; };
} }

View File

@ -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

View File

@ -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 =

View File

@ -1,27 +1,23 @@
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }: { lib, buildDunePackage, fetchFromGitLab, sedlex_2, xtmpl }:
stdenv.mkDerivation rec { buildDunePackage rec {
pname = "higlo"; pname = "higlo";
version = "0.6"; version = "0.8";
src = fetchFromGitHub { useDune2 = true;
src = fetchFromGitLab {
domain = "framagit.org";
owner = "zoggy"; owner = "zoggy";
repo = "higlo"; repo = "higlo";
rev = "release-${version}"; rev = version;
sha256 = "0m0qyk2ydivai54502s45sdw9w4xr0j3jpwyc4vqk62a7iz9ihxh"; sha256 = "sha256:09hsbwy5asacgh4gdj0vjpy4kzfnq3qji9szbsbyswsf1nbyczir";
}; };
buildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ sedlex_2 xtmpl ];
propagatedBuildInputs = [ xtmpl ulex ];
createFindlibDestdir = true;
patches = ./install.patch;
meta = with lib; { meta = with lib; {
description = "OCaml library for syntax highlighting"; description = "OCaml library for syntax highlighting";
homepage = "https://zoggy.github.io/higlo/"; inherit (src.meta) homepage;
license = licenses.lgpl3; license = licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ]; maintainers = with maintainers; [ regnat ];
}; };
} }

View File

@ -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 \

View File

@ -1,34 +1,26 @@
{ stdenv, lib, fetchFromGitLab, ocaml, findlib { lib, buildDunePackage, fetchFromGitLab
, sedlex, uunf, uutf , sedlex_2, uunf, uutf
}: }:
if !lib.versionAtLeast ocaml.version "4.03" buildDunePackage rec {
then throw "iri is not available for OCaml ${ocaml.version}" pname = "iri";
else version = "0.6.0";
useDune2 = true;
stdenv.mkDerivation rec {
version = "0.4.0";
name = "ocaml${ocaml.version}-iri-${version}";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "framagit.org"; domain = "framagit.org";
owner = "zoggy"; owner = "zoggy";
repo = "ocaml-iri"; repo = "ocaml-iri";
rev = version; rev = version;
sha256 = "0fsmfmzmyggm0h77a7mb0n41vqi6q4ln1xzsv72zbvysa7l8w84q"; sha256 = "sha256:0zk8nnwcyljkc1a556byncv6cn1vqhk4267z1lm15flh1k7chyax";
}; };
buildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ sedlex_2 uunf uutf ];
propagatedBuildInputs = [ sedlex uunf uutf ];
createFindlibDestdir = true;
meta = { meta = {
description = "IRI (RFC3987) native OCaml implementation"; description = "IRI (RFC3987) native OCaml implementation";
license = lib.licenses.lgpl3; license = lib.licenses.lgpl3;
maintainers = [ lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
inherit (src.meta) homepage; inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
}; };
} }

View File

@ -1,37 +1,24 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }: { lib, buildDunePackage, fetchFromGitLab, yojson }:
if lib.versionOlder ocaml.version "4.03" buildDunePackage rec {
|| lib.versionAtLeast ocaml.version "4.08"
then throw "ocf not supported for ocaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
pname = "ocf"; pname = "ocf";
version = "0.5.0"; version = "0.8.0";
src = fetchFromGitHub { useDune2 = true;
minimalOCamlVersion = "4.03";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "zoggy"; owner = "zoggy";
repo = "ocf"; repo = "ocf";
rev = "release-${version}"; rev = version;
sha256 = "1fhq9l2nmr39hxzpavc0jssmba71nnmhsncdn4dsbh2ylv29w56y"; sha256 = "sha256:00ap3q5yjqmpk87lxqv1j2wkc7583ynhjr1jjrfn9r0j2h9pfd60";
}; };
buildInputs = [ ocaml findlib ppx_tools ];
propagatedBuildInputs = [ yojson ]; propagatedBuildInputs = [ yojson ];
createFindlibDestdir = true;
dontStrip = true;
patches = [(fetchpatch {
url = "https://github.com/zoggy/ocf/commit/3a231c7a6c5e535a77c25e207af8952793436444.patch";
sha256 = "0nc8cggc5gxhch9amaz3s71lxs1xbgi7fs9p90cng04dsgr64xk5";
})
];
meta = with lib; { meta = with lib; {
description = "OCaml library to read and write configuration options in JSON syntax"; 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; license = licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ]; maintainers = with maintainers; [ regnat ];
}; };
} }

View File

@ -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";
};
}

View File

@ -1,39 +1,23 @@
{ lib, stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml { lib, buildDunePackage, fetchFromGitLab, iri, re, sedlex_2, uutf }:
, js_of_ocaml-ppx, re }:
if lib.versionOlder ocaml.version "4.03" buildDunePackage rec {
|| lib.versionAtLeast ocaml.version "4.11" pname = "xtmpl";
then throw "xtmpl not supported for ocaml ${ocaml.version}" version = "0.19.0";
else useDune2 = true;
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-xtmpl-${version}";
version = "0.17.0";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "framagit.org"; domain = "framagit.org";
owner = "zoggy"; owner = "zoggy";
repo = "xtmpl"; repo = "xtmpl";
rev = version; rev = version;
sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221"; sha256 = "sha256:0vwj0aayg60wm98d91fg3hmj90730liljy4cn8771dpxvz8m07bw";
}; };
patches = [ ./jsoo.patch ]; propagatedBuildInputs = [ iri re sedlex_2 uutf ];
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;
meta = with lib; { meta = with lib; {
description = "XML templating library for OCaml"; description = "XML templating library for OCaml";
homepage = "https://www.good-eris.net/xtmpl/"; homepage = "https://www.good-eris.net/xtmpl/";
license = licenses.lgpl3; license = licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ regnat ]; maintainers = with maintainers; [ regnat ];
}; };
} }

View File

@ -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].

View File

@ -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";
};
}

View File

@ -28661,7 +28661,7 @@ with pkgs;
stalonetray = callPackage ../applications/window-managers/stalonetray {}; stalonetray = callPackage ../applications/window-managers/stalonetray {};
inherit (ocaml-ng.ocamlPackages_4_07) stog; inherit (ocamlPackages) stog;
stp = callPackage ../applications/science/logic/stp { }; stp = callPackage ../applications/science/logic/stp { };

View File

@ -932,6 +932,8 @@ let
ocf = callPackage ../development/ocaml-modules/ocf { }; ocf = callPackage ../development/ocaml-modules/ocf { };
ocf_ppx = callPackage ../development/ocaml-modules/ocf/ppx.nix { };
ocp-build = callPackage ../development/tools/ocaml/ocp-build { }; ocp-build = callPackage ../development/tools/ocaml/ocp-build { };
ocp-indent = callPackage ../development/tools/ocaml/ocp-indent { }; ocp-indent = callPackage ../development/tools/ocaml/ocp-indent { };
@ -1404,6 +1406,8 @@ let
xtmpl = callPackage ../development/ocaml-modules/xtmpl { }; xtmpl = callPackage ../development/ocaml-modules/xtmpl { };
xtmpl_ppx = callPackage ../development/ocaml-modules/xtmpl/ppx.nix { };
yaml = callPackage ../development/ocaml-modules/yaml { }; yaml = callPackage ../development/ocaml-modules/yaml { };
yaml-sexp = callPackage ../development/ocaml-modules/yaml/yaml-sexp.nix { }; yaml-sexp = callPackage ../development/ocaml-modules/yaml/yaml-sexp.nix { };