From 131e9f59e825aa3f1100619191a64d1e147ec263 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 9 Jul 2018 17:15:33 +0000 Subject: [PATCH 1/2] ocamlPackages.ppx_tools_versioned: remove spurious dependency to camlp4 --- .../ocaml-modules/ppx_tools_versioned/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix b/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix index 5d27dc35396..363b774aaeb 100644 --- a/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix @@ -1,11 +1,9 @@ -{ stdenv, buildOcaml, fetchFromGitHub, ocaml-migrate-parsetree }: +{ stdenv, fetchFromGitHub, ocaml, findlib, ocaml-migrate-parsetree }: -buildOcaml rec { - name = "ppx_tools_versioned"; +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ppx_tools_versioned-${version}"; version = "5.1"; - minimumSupportedOcamlVersion = "4.02"; - src = fetchFromGitHub { owner = "let-def"; repo = "ppx_tools_versioned"; @@ -13,6 +11,8 @@ buildOcaml rec { sha256 = "1c7kvca67qpyr4hiy492yik5x31lmkhyhy5wpl0l0fbx7fr7l624"; }; + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ ocaml-migrate-parsetree ]; createFindlibDestdir = true; From de1a8ddb3c58ef477940054224646c7ed550a7cd Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 9 Jul 2018 17:15:42 +0000 Subject: [PATCH 2/2] ocamlPackages.iri: init at 0.4.0 iri is an OCaml implementation of Internationalized Resource Identifiers (IRIs). Homepage: https://framagit.org/zoggy/ocaml-iri --- .../development/ocaml-modules/iri/default.nix | 34 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/ocaml-modules/iri/default.nix diff --git a/pkgs/development/ocaml-modules/iri/default.nix b/pkgs/development/ocaml-modules/iri/default.nix new file mode 100644 index 00000000000..15f3a5613b5 --- /dev/null +++ b/pkgs/development/ocaml-modules/iri/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitLab, ocaml, findlib +, sedlex, uunf, uutf +}: + +if !stdenv.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}"; + + src = fetchFromGitLab { + domain = "framagit.org"; + owner = "zoggy"; + repo = "ocaml-iri"; + rev = version; + sha256 = "0fsmfmzmyggm0h77a7mb0n41vqi6q4ln1xzsv72zbvysa7l8w84q"; + }; + + buildInputs = [ ocaml findlib ]; + + propagatedBuildInputs = [ sedlex uunf uutf ]; + + createFindlibDestdir = true; + + meta = { + description = "IRI (RFC3987) native OCaml implementation"; + license = stdenv.lib.licenses.lgpl3; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a0e91a8e093..fb51cb94944 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -321,6 +321,8 @@ let inifiles = callPackage ../development/ocaml-modules/inifiles { }; + iri = callPackage ../development/ocaml-modules/iri { }; + jingoo = callPackage ../development/ocaml-modules/jingoo { pcre = ocaml_pcre; };