diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/higlo/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/higlo/install.patch | 14 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/iri/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocf/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocf/ppx.nix | 14 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/xtmpl/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/xtmpl/jsoo.patch | 26 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/xtmpl/ppx.nix | 14 |
8 files changed, 63 insertions, 116 deletions
diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix index 3c4b7a37f99..19b2fa8942a 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 bbdaace293b..00000000000 --- 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 0845e4c1841..6a00fb453df 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 ee14a83d57c..30f589e7561 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 00000000000..0b1f6998cca --- /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 f1c1f15dc72..7c2f0a01e53 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 7546dbca924..00000000000 --- 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 00000000000..b6f5bd65000 --- /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"; + }; +} |