diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/ocaml-modules | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/ocaml-modules')
490 files changed, 15133 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/afl-persistent/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/afl-persistent/default.nix new file mode 100644 index 000000000000..5ac352e0762c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/afl-persistent/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, opaline }: + +stdenv.mkDerivation rec { + pname = "afl-persistent"; + version = "1.3"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "stedolan"; + repo = "ocaml-${pname}"; + rev = "v${version}"; + sha256 = "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"; + }; + + buildInputs = [ ocaml findlib ]; + + # don't run tests in buildPhase + # don't overwrite test binary + postPatch = '' + sed -i 's/ && \.\/test$//' build.sh + sed -i '/^ocamlopt.*test.ml -o test$/ s/$/2/' build.sh + patchShebangs build.sh + ''; + + buildPhase = "./build.sh"; + installPhase = '' + ${opaline}/bin/opaline -prefix $out -libdir $out/lib/ocaml/${ocaml.version}/site-lib/ ${pname}.install + ''; + + doCheck = true; + checkPhase = "./_build/test && ./_build/test2"; + + meta = with stdenv.lib; { + homepage = "https://github.com/stedolan/ocaml-afl-persistent"; + description = "persistent-mode afl-fuzz for ocaml"; + license = licenses.mit; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/default.nix new file mode 100644 index 000000000000..3ebf0f3ed6bd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl +, astring, cmdliner, fmt, uuidm, re, stdlib-shims +}: + +buildDunePackage rec { + pname = "alcotest"; + version = "1.0.1"; + + src = fetchurl { + url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-${version}.tbz"; + sha256 = "1xlklxb83gamqbg8j5dzm5jk4mvcwkspxajh93p6vpw9ia1li1qc"; + }; + + propagatedBuildInputs = [ astring cmdliner fmt uuidm re stdlib-shims ]; + + meta = with lib; { + homepage = "https://github.com/mirage/alcotest"; + description = "A lightweight and colourful test framework"; + license = licenses.isc; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/lwt.nix new file mode 100644 index 000000000000..f005421a6fc8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/alcotest/lwt.nix @@ -0,0 +1,16 @@ +{ lib, buildDunePackage, alcotest, logs, ocaml_lwt }: + +buildDunePackage { + pname = "alcotest-lwt"; + + inherit (alcotest) version src; + + propagatedBuildInputs = [ alcotest logs ocaml_lwt ]; + + doCheck = true; + + meta = alcotest.meta // { + description = "Lwt-based helpers for Alcotest"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-async/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-async/default.nix new file mode 100644 index 000000000000..ac900a8dd186 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-async/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, angstrom, async }: + +buildDunePackage rec { + pname = "angstrom-async"; + + inherit (angstrom) version src; + + minimumOCamlVersion = "4.04.1"; + + propagatedBuildInputs = [ angstrom async ]; + + doCheck = true; + + meta = { + inherit (angstrom.meta) homepage license; + description = "Async support for Angstrom"; + maintainers = with stdenv.lib.maintainers; [ romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-lwt-unix/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-lwt-unix/default.nix new file mode 100644 index 000000000000..d249c4512914 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-lwt-unix/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, angstrom, ocaml_lwt }: + +buildDunePackage rec { + pname = "angstrom-lwt-unix"; + + inherit (angstrom) version src; + + minimumOCamlVersion = "4.03"; + + propagatedBuildInputs = [ angstrom ocaml_lwt ]; + + doCheck = true; + + meta = { + inherit (angstrom.meta) homepage license; + description = "Lwt_unix support for Angstrom"; + maintainers = with stdenv.lib.maintainers; [ romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-unix/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-unix/default.nix new file mode 100644 index 000000000000..0d4ab400dd3e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom-unix/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, angstrom }: + +buildDunePackage rec { + pname = "angstrom-unix"; + + inherit (angstrom) version src; + + minimumOCamlVersion = "4.03"; + + propagatedBuildInputs = [ angstrom ]; + + doCheck = true; + + meta = { + inherit (angstrom.meta) homepage license; + description = "Unix support for Angstrom"; + maintainers = with stdenv.lib.maintainers; [ romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom/default.nix new file mode 100644 index 000000000000..75eb2255ee78 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/angstrom/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, result, bigstringaf, ppx_let }: + +buildDunePackage rec { + pname = "angstrom"; + version = "0.15.0"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = pname; + rev = version; + sha256 = "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"; + }; + + checkInputs = [ alcotest ppx_let ]; + propagatedBuildInputs = [ bigstringaf result ]; + doCheck = lib.versionAtLeast ocaml.version "4.05"; + + meta = { + homepage = "https://github.com/inhabitedtype/angstrom"; + description = "OCaml parser combinators built for speed and memory efficiency"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix new file mode 100644 index 000000000000..7b9f01751517 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation rec { + + version = "0.7"; + + name = "ocaml${ocaml.version}-ansiterminal-${version}"; + + src = fetchurl { + url = "https://github.com/Chris00/ANSITerminal/releases/download/${version}/ANSITerminal-${version}.tar.gz"; + sha256 = "03pqfxvw9pa9720l8i5fgxky1qx70kw6wxbczd5i50xi668lh0i9"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + + buildPhase = "ocaml setup.ml -build"; + + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/Chris00/ANSITerminal"; + description = "A module allowing to use the colors and cursor movements on ANSI terminals"; + longDescription = '' + ANSITerminal is a module allowing to use the colors and cursor + movements on ANSI terminals. It also works on the windows shell (but + this part is currently work in progress). + ''; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/apron/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/apron/default.nix new file mode 100644 index 000000000000..0da1ab74e199 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/apron/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, perl, gmp, mpfr, ppl, ocaml, findlib, camlidl, mlgmpidl }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-apron-${version}"; + version = "0.9.13"; + src = fetchFromGitHub { + owner = "antoinemine"; + repo = "apron"; + rev = "v${version}"; + sha256 = "14ymjahqdxj26da8wik9d5dzlxn81b3z1iggdl7rn2nn06jy7lvy"; + }; + + buildInputs = [ perl gmp mpfr ppl ocaml findlib camlidl ]; + propagatedBuildInputs = [ mlgmpidl ]; + + prefixKey = "-prefix "; + preBuild = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs"; + + meta = { + license = stdenv.lib.licenses.lgpl21; + homepage = "http://apron.cri.ensmp.fr/library/"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + description = "Numerical abstract domain library"; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix new file mode 100644 index 000000000000..556c749011fa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchurl +, cstruct, zarith, bigarray-compat, stdlib-shims, ptime, alcotest +}: + +buildDunePackage rec { + minimumOCamlVersion = "4.05"; + + pname = "asn1-combinators"; + version = "0.2.3"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v${version}/asn1-combinators-v${version}.tbz"; + sha256 = "1z73hc17f5m2i4bfxw0g94fsri67f8vha812mm8klz4ggs8y7d6r"; + }; + + propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ]; + + doCheck = true; + checkInputs = [ alcotest ]; + + meta = with lib; { + homepage = "https://github.com/mirleft/ocaml-asn1-combinators"; + description = "Combinators for expressing ASN.1 grammars in OCaml"; + license = licenses.isc; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/astring/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/astring/default.nix new file mode 100644 index 000000000000..b63601608919 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/astring/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: + +stdenv.mkDerivation rec { + version = "0.8.3"; + name = "ocaml${ocaml.version}-astring-${version}"; + + src = fetchurl { + url = "https://erratique.ch/software/astring/releases/astring-${version}.tbz"; + sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + homepage = "https://erratique.ch/software/astring"; + description = "Alternative String module for OCaml"; + longDescription = '' + Astring exposes an alternative String module for OCaml. This module tries + to balance minimality and expressiveness for basic, index-free, string + processing and provides types and functions for substrings, string sets + and string maps. + + Remaining compatible with the OCaml String module is a non-goal. + The String module exposed by Astring has exception safe functions, removes + deprecated and rarely used functions, alters some signatures and names, + adds a few missing functions and fully exploits OCaml's newfound string + immutability. + ''; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix new file mode 100644 index 000000000000..84b137ada7c3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix @@ -0,0 +1,27 @@ +{ stdenv, menhir, easy-format, fetchFromGitHub, buildDunePackage, which, biniou, yojson }: + +buildDunePackage rec { + pname = "atd"; + version = "2.0.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mjambon"; + repo = pname; + rev = version; + sha256 = "0alzmk97rxg7s6irs9lvf89dy9n3r769my5n4j9p9qyigcdgjaia"; + }; + + createFindlibDestdir = true; + + buildInputs = [ which menhir ]; + propagatedBuildInputs = [ easy-format biniou yojson ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/mjambon/atd"; + description = "Syntax for cross-language type definitions"; + license = licenses.bsd3; + maintainers = with maintainers; [ aij jwilberding ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atdgen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atdgen/default.nix new file mode 100644 index 000000000000..d8ef2fec9990 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/atdgen/default.nix @@ -0,0 +1,26 @@ +{ buildDunePackage, atd, biniou, yojson }: + +let runtime = + buildDunePackage { + pname = "atdgen-runtime"; + inherit (atd) version src; + + propagatedBuildInputs = [ biniou yojson ]; + + meta = { inherit (atd.meta) license; }; + } +; in + +buildDunePackage { + pname = "atdgen"; + inherit (atd) version src; + + buildInputs = [ atd ]; + + propagatedBuildInputs = [ runtime ]; + + meta = { + description = "Generates efficient JSON serializers, deserializers and validators"; + inherit (atd.meta) license; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix new file mode 100644 index 000000000000..66b1dd67a9f2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix @@ -0,0 +1,76 @@ +{ stdenv, fetchFromGitHub, fetchurl +, ocaml, findlib, ocamlbuild, ocaml_oasis, + bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp, + utop, libxml2, + ppx_tools_versioned, + which, makeWrapper, writeText +, z3 +}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.07" +then throw "BAP is not available for OCaml ${ocaml.version}" +else + +if stdenv.lib.versionAtLeast core_kernel.version "0.13" +then throw "BAP needs core_kernel-0.12 (hence OCaml 4.07)" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-bap-${version}"; + version = "2.1.0"; + src = fetchFromGitHub { + owner = "BinaryAnalysisPlatform"; + repo = "bap"; + rev = "v${version}"; + sha256 = "10fkr6p798ad18j4h9bvp9dg4pmjdpv3hmj7k389i0vhqniwi5xq"; + }; + + sigs = fetchurl { + url = "https://github.com/BinaryAnalysisPlatform/bap/releases/download/v${version}/sigs.zip"; + sha256 = "0d69jd28z4g64mglq94kj5imhmk5f6sgcsh9q2nij3b0arpcliwk"; + }; + + createFindlibDestdir = true; + + setupHook = writeText "setupHook.sh" '' + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/" + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/" + ''; + + nativeBuildInputs = [ which makeWrapper ]; + + buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis + llvm ppx_tools_versioned + z3 + utop libxml2 ]; + + propagatedBuildInputs = [ bitstring camlzip cmdliner ppx_jane core_kernel ezjsonm fileutils ocaml_lwt ocamlgraph ocurl re uri zarith piqi parsexp + piqi-ocaml uuidm frontc ounit ]; + + installPhase = '' + export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR; + export PATH=$PATH:$out/bin + export CAML_LD_LIBRARY_PATH=''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/ + mkdir -p $out/lib/bap + make install + rm $out/bin/baptop + makeWrapper ${utop}/bin/utop $out/bin/baptop --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH --add-flags "-ppx ppx-bap -short-paths -require \"bap.top\"" + wrapProgram $out/bin/bapbuild --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH + ln -s $sigs $out/share/bap/sigs.zip + ''; + + disableIda = "--disable-ida"; + + patches = [ ./dont-add-curses.patch ]; + + configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ]; + + BAPBUILDFLAGS = "-j $(NIX_BUILD_CORES)"; + + meta = with stdenv.lib; { + description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages."; + homepage = "https://github.com/BinaryAnalysisPlatform/bap/"; + maintainers = [ maintainers.maurer ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch new file mode 100644 index 000000000000..438a1bfc6dc0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bap/dont-add-curses.patch @@ -0,0 +1,32 @@ +From e6f6d1529d1725e8c1ed3c96eecc4aea43417aea Mon Sep 17 00:00:00 2001 +From: Matthew Maurer <matthew.r.maurer@gmail.com> +Date: Sun, 19 Apr 2020 15:50:01 -0700 +Subject: [PATCH] Remove attempt to work around libcurses dependency issues. + +BAP doesn't actually link against libcurses, LLVM does. By adding +-lcurses to this file, we accidentally broke linking on any systems +where LLVM got linked against libncurses (not libcurses) without a +libcurses compatibility shim. + +Overall, we should get -l flags from llvm-config, not attempt to +shoehorn them in later, as this is fragile. +--- + oasis/llvm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/oasis/llvm b/oasis/llvm +index 966c407..fba3fb4 100644 +--- a/oasis/llvm ++++ b/oasis/llvm +@@ -31,7 +31,7 @@ Library bap_llvm + Bap_llvm_ogre_samples, + Bap_llvm_ogre_types + CCOpt: $cc_optimization +- CCLib: $llvm_lib $cxxlibs $llvm_ldflags -lcurses ++ CCLib: $llvm_lib $cxxlibs $llvm_ldflags + CSources: llvm_disasm.h, + llvm_disasm.c, + llvm_stubs.c, +-- +2.22.0 + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/base64/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/base64/default.nix new file mode 100644 index 000000000000..b2e3e0c5e74d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/base64/default.nix @@ -0,0 +1,33 @@ +{ lib, fetchpatch, fetchzip, buildDunePackage, alcotest, bos }: + +let version = "3.2.0"; in + +buildDunePackage rec { + pname = "base64"; + inherit version; + + src = fetchzip { + url = "https://github.com/mirage/ocaml-base64/archive/v${version}.tar.gz"; + sha256 = "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"; + }; + + minimumOCamlVersion = "4.03"; + + buildInputs = [ bos ]; + + # Fix test-suite for alcotest ≥ 1.0 + patches = [(fetchpatch { + url = "https://github.com/mirage/ocaml-base64/commit/8d334d02aa52875158fae3e2fb8fe0a5596598d0.patch"; + sha256 = "0lvqdp98qavpzis1wgwh3ijajq79hq47898gsrk37fpyjbrdzf5q"; + })]; + + doCheck = true; + checkInputs = [ alcotest ]; + + meta = { + homepage = "https://github.com/mirage/ocaml-base64"; + description = "Base64 encoding and decoding in OCaml"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix new file mode 100644 index 000000000000..43fc0696e2e7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, qtest, num }: + +let version = "3.1.0"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-batteries-${version}"; + + src = fetchurl { + url = "https://github.com/ocaml-batteries-team/batteries-included/releases/download/v${version}/batteries-${version}.tar.gz"; + sha256 = "0bq1np3ai3r559s3vivn45yid25fwz76rvbmsg30j57j7cyr3jqm"; + }; + + # Fix a test case + patches = [(fetchpatch { + url = "https://github.com/ocaml-batteries-team/batteries-included/commit/7cbd9617d4efa5b3d647b1cc99d9a25fa01ac6dd.patch"; + sha256 = "0q4kq10psr7n1xdv4rspk959n1a5mk9524pzm5v68ab2gkcgm8sk"; + + })]; + + buildInputs = [ ocaml findlib ocamlbuild ]; + checkInputs = [ qtest ]; + propagatedBuildInputs = [ num ]; + + doCheck = stdenv.lib.versionAtLeast ocaml.version "4.04" && !stdenv.isAarch64; + checkTarget = "test"; + + createFindlibDestdir = true; + + meta = { + homepage = "http://batteries.forge.ocamlcore.org/"; + description = "OCaml Batteries Included"; + longDescription = '' + A community-driven effort to standardize on an consistent, documented, + and comprehensive development platform for the OCaml programming + language. + ''; + license = stdenv.lib.licenses.lgpl21Plus; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/benchmark/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/benchmark/default.nix new file mode 100644 index 000000000000..518a8756158b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/benchmark/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ocaml_pcre }: + +let version = "1.4"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-benchmark-${version}"; + + src = fetchzip { + url = "https://github.com/Chris00/ocaml-benchmark/releases/download/${version}/benchmark-${version}.tar.gz"; + sha256 = "16wi8ld7c3mq77ylpgbnj8qqqqimyzwxs47v06vyrwpma5pab5xa"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ocaml_pcre ]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://ocaml-benchmark.forge.ocamlcore.org/"; + platforms = ocaml.meta.platforms or []; + description = "Benchmark running times of code"; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix new file mode 100644 index 000000000000..6d833b48f269 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchFromGitHub }: + +buildDunePackage rec { + pname = "bigarray-compat"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "mirage"; + repo = pname; + rev = "v${version}"; + sha256 = "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"; + }; + + meta = { + description = "Compatibility library to use Stdlib.Bigarray when possible"; + inherit (src.meta) homepage; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-overlap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-overlap/default.nix new file mode 100644 index 000000000000..e02b1159a9c7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigarray-overlap/default.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchurl +, bigarray-compat, alcotest, astring, fpath, bos, findlib, pkg-config +}: + +buildDunePackage rec { + pname = "bigarray-overlap"; + version = "0.2.0"; + + src = fetchurl { + url = "https://github.com/dinosaure/overlap/releases/download/v${version}/bigarray-overlap-v${version}.tbz"; + sha256 = "1v86avafsbyxjccy0y9gny31s2jzb0kd42v3mhcalklx5f044lcy"; + }; + + minimumOCamlVersion = "4.07"; + useDune2 = true; + + propagatedBuildInputs = [ bigarray-compat ]; + + checkInputs = [ alcotest astring fpath bos findlib pkg-config ]; + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/dinosaure/overlap"; + description = "A minimal library to know that 2 bigarray share physically the same memory or not"; + license = licenses.mit; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstring/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstring/default.nix new file mode 100644 index 000000000000..98687262c33b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstring/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage }: + +buildDunePackage rec { + pname = "bigstring"; + version = "0.2"; + + minimumOCamlVersion = "4.03"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "ocaml-bigstring"; + rev = version; + sha256 = "0ypdf29cmwmjm3djr5ygz8ls81dl41a4iz1xx5gbcdpbrdiapb77"; + }; + + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/c-cube/ocaml-bigstring"; + description = "Bigstring built on top of bigarrays, and convenient functions"; + license = licenses.bsd2; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstringaf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstringaf/default.nix new file mode 100644 index 000000000000..9f6810379aef --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bigstringaf/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigarray-compat }: + +buildDunePackage rec { + pname = "bigstringaf"; + version = "0.6.0"; + + minimumOCamlVersion = "4.03"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = pname; + rev = version; + sha256 = "04b088vrqzmxsyan9f9nr8721bxip4b930cgvb5zkbbmrw3ylmwc"; + }; + + checkInputs = [ alcotest ]; + propagatedBuildInputs = [ bigarray-compat ]; + doCheck = lib.versionAtLeast ocaml.version "4.05"; + + meta = { + description = "Bigstring intrinsics and fast blits based on memcpy/memmove"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bin_prot/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bin_prot/default.nix new file mode 100644 index 000000000000..0dddb653e09e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bin_prot/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildOcaml, fetchurl, ocaml, type_conv }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}" +else + +buildOcaml rec { + name = "bin_prot"; + version = "112.24.00"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/bin_prot/archive/${version}.tar.gz"; + sha256 = "dc0c978a825c7c123990af3317637c218f61079e6f35dc878260651084f1adb4"; + }; + + propagatedBuildInputs = [ type_conv ]; + + hasSharedObjects = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/bin_prot"; + description = "Binary protocol generator "; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix new file mode 100644 index 000000000000..ed216d8236aa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix @@ -0,0 +1,36 @@ +{stdenv, fetchurl, ocaml, findlib, easy-format}: +let + pname = "biniou"; + version = "1.0.9"; + webpage = "http://mjambon.com/${pname}.html"; +in + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11"; + +stdenv.mkDerivation rec { + + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://mjambon.com/releases/${pname}/${name}.tar.gz"; + sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb"; + }; + + buildInputs = [ ocaml findlib easy-format ]; + + createFindlibDestdir = true; + + makeFlags = [ "PREFIX=$(out)" ]; + + preBuild = '' + mkdir $out/bin + ''; + + meta = with stdenv.lib; { + description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve"; + homepage = webpage; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/default.nix new file mode 100644 index 000000000000..b97c78a399bf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biniou/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, easy-format }: + +buildDunePackage rec { + pname = "biniou"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = pname; + rev = version; + sha256 = "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"; + }; + + propagatedBuildInputs = [ easy-format ]; + + postPatch = '' + patchShebangs . + ''; + + meta = { + inherit (src.meta) homepage; + description = "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + license = stdenv.lib.licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biocaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biocaml/default.nix new file mode 100644 index 000000000000..be62a1c6d2cd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/biocaml/default.nix @@ -0,0 +1,36 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, fetchpatch +, ounit, async, base64, camlzip, cfstream +, core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm }: + +buildDunePackage rec { + pname = "biocaml"; + version = "0.10.1"; + + owner = "biocaml"; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + inherit owner; + repo = pname; + rev = "v${version}"; + sha256 = "1f19nc8ld0iv45jjnsvaah3ddj88s2n9wj8mrz726kzg85cfr8xj"; + }; + + # fix compilation without and disable -unsafe-string, needed for Ocaml 4.10: + patches = [ (fetchpatch { + url = "https://github.com/biocaml/biocaml/commit/597fa7b0d203684e45ffe03f56c74335b6173ffc.patch"; + sha256 = "0b8jdg215cv2k4y3ww7vak2ag5v6v9w8b76qjivr5d1qxz47mqxv"; + }) ]; + + buildInputs = [ ppx_jane ppx_sexp_conv ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ async base64 camlzip cfstream core rresult uri xmlm ]; + + meta = with stdenv.lib; { + description = "Bioinformatics library for Ocaml"; + homepage = "http://${pname}.org"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.gpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx-ocamlbuild/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx-ocamlbuild/default.nix new file mode 100644 index 000000000000..6a98267d89a5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx-ocamlbuild/default.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, bisect_ppx, ocamlbuild }: + +buildDunePackage { + minimumOCamlVersion = "4.02"; + inherit (bisect_ppx) version src meta; + pname = "bisect_ppx-ocamlbuild"; + propagatedBuildInputs = [ ocamlbuild ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix new file mode 100644 index 000000000000..ce52c427cd07 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, ocaml-migrate-parsetree, ppx_tools_versioned }: + +buildDunePackage rec { + pname = "bisect_ppx"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "aantron"; + repo = "bisect_ppx"; + rev = version; + sha256 = "1plhm4pvrhpapz5zaks194ji1fgzmp13y942g10pbn9m7kgkqg4h"; + }; + + buildInputs = [ + ocaml-migrate-parsetree + ppx_tools_versioned + ]; + + meta = { + description = "Code coverage for OCaml"; + license = stdenv.lib.licenses.mpl20; + homepage = "https://github.com/aantron/bisect_ppx"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bistro/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bistro/default.nix new file mode 100644 index 000000000000..9603f283ee4f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bistro/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchFromGitHub, fetchpatch, buildDunePackage +, base64, bos, core, lwt_react, ocamlgraph, rresult, tyxml +}: + +buildDunePackage rec { + pname = "bistro"; + version = "0.5.0"; + src = fetchFromGitHub { + owner = "pveber"; + repo = pname; + rev = "v${version}"; + sha256 = "114gq48cpj2mvycypa9lfyqqb26wa2gkdfwkcqhnx7m6sdwv9a38"; + }; + + # The following patch adds support for core.v0.13 + patches = [(fetchpatch { + url = "https://github.com/pveber/bistro/commit/0931db43a146ad7829dff5120161a775f732a878.patch"; + sha256 = "06y0sxbbab1mssc1xfjjv12lpv4rny5iqv9qkdqyzrvzpl1bdvnd"; + })]; + + propagatedBuildInputs = [ base64 bos core lwt_react ocamlgraph rresult tyxml ]; + + minimumOCamlVersion = "4.07"; + + meta = { + inherit (src.meta) homepage; + description = "Build and execute typed scientific workflows"; + maintainers = [ lib.maintainers.vbgl ]; + license = lib.licenses.gpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitstring/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitstring/default.nix new file mode 100644 index 000000000000..2f413d37352c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitstring/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, ppx_tools_versioned, ounit }: + +buildDunePackage rec { + pname = "bitstring"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "xguerin"; + repo = pname; + rev = "v${version}"; + sha256 = "0r49qax7as48jgknzaq6p9rbpmrvnmlic713wzz5bj60j5h0396f"; + }; + + buildInputs = [ ppx_tools_versioned ounit ]; + doCheck = true; + + meta = with stdenv.lib; { + description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml"; + homepage = "https://github.com/xguerin/bitstring"; + license = licenses.lgpl21Plus; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitv/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitv/default.nix new file mode 100644 index 000000000000..359d83b4762a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bitv/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchzip, autoreconfHook, which, ocaml, findlib }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "bitv is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-bitv-${version}"; + version = "1.3"; + + src = fetchzip { + url = "https://github.com/backtracking/bitv/archive/${version}.tar.gz"; + sha256 = "0vkh1w9fpi5m1sgiqg6r38j3fqglhdajmbyiyr91113lrpljm75i"; + }; + + buildInputs = [ autoreconfHook which ocaml findlib ]; + + createFindlibDestdir = true; + + meta = { + description = "A bit vector library for OCaml"; + license = stdenv.lib.licenses.lgpl21; + homepage = "https://github.com/backtracking/bitv"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix new file mode 100644 index 000000000000..f5dc099b1403 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, which, camlp4 }: + +let inherit (stdenv.lib) getVersion versionAtLeast; in + +assert versionAtLeast (getVersion ocaml) "4.00.0"; +assert versionAtLeast (getVersion findlib) "1.3.3"; + +if versionAtLeast ocaml.version "4.06" +then throw "bolt is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + + name = "bolt-1.4"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1043/${name}.tar.gz"; + sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy"; + }; + + buildInputs = [ ocaml findlib ocamlbuild which camlp4 ]; + + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/bolt/bolt.1.4/files/opam.patch"; + sha256 = "08cl39r98w312sw23cskd5wian6zg20isn9ki41hnbcgkazhi7pb"; + }) + ]; + + postPatch = '' + patch myocamlbuild.ml <<EOF +70,74c70 +< let camlp4of = +< try +< let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in +< Filename.concat path_bin "camlp4of" +< with _ -> "camlp4of" in +--- +> let camlp4of = "camlp4of" in +EOF + ''; + + # The custom `configure` script does not expect the --prefix + # option. Installation is handled by ocamlfind. + dontAddPrefix = true; + + createFindlibDestdir = true; + + buildFlags = [ "all" ]; + + doCheck = true; + checkTarget = "tests"; + + meta = with stdenv.lib; { + homepage = "http://bolt.x9c.fr"; + description = "A logging tool for the OCaml language"; + longDescription = '' + Bolt is a logging tool for the OCaml language. It is inspired by and + modeled after the famous log4j logging framework for Java. + ''; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix new file mode 100644 index 000000000000..ca6c362b6fa5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg +, astring, fmt, fpath, logs, rresult +}: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-bos-${version}"; + version = "0.2.0"; + src = fetchurl { + url = "https://erratique.ch/software/bos/releases/bos-${version}.tbz"; + sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg ]; + propagatedBuildInputs = [ astring fmt fpath logs rresult ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "Basic OS interaction for OCaml"; + homepage = "https://erratique.ch/software/bos"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix new file mode 100644 index 000000000000..bf129c7bc442 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchurl, buildDunePackage, ocaml +, pkgconfig, cairo +}: + +buildDunePackage rec { + pname = "cairo2"; + version = "0.6.1"; + + src = fetchurl { + url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tbz"; + sha256 = "1ik4qf4b9443sliq2z7x9acd40rmzvyzjh3bh98wvjklxbb84a9i"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ cairo ]; + + doCheck = !(stdenv.isDarwin + # https://github.com/Chris00/ocaml-cairo/issues/19 + || lib.versionAtLeast ocaml.version "4.10"); + + meta = { + homepage = "https://github.com/Chris00/ocaml-cairo"; + description = "Binding to Cairo, a 2D Vector Graphics Library"; + longDescription = '' + This is a binding to Cairo, a 2D graphics library with support for + multiple output devices. Currently supported output targets include + the X Window System, Quartz, Win32, image buffers, PostScript, PDF, + and SVG file output. + ''; + license = lib.licenses.lgpl3; + maintainers = with lib.maintainers; [ jirkamarsik vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/calendar/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/calendar/default.nix new file mode 100644 index 000000000000..f23081a5f195 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/calendar/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, ocaml, findlib}: + +stdenv.mkDerivation { + name = "ocaml-calendar-2.5"; + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/915/calendar-2.5.tar.bz2"; + sha256 = "04pvhwb664g3s644c7v7419a3kvf5s3pynkhmk5j59dvlfm1yf0f"; + }; + + buildInputs = [ocaml findlib]; + + createFindlibDestdir = true; + + meta = { + homepage = "https://forge.ocamlcore.org/projects/calendar/"; + description = "An Objective Caml library managing dates and times"; + license = "LGPL"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix new file mode 100644 index 000000000000..e62acc3cd63f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, omake, ocaml, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }: + +let + pname = "camlimages"; + version = "4.0.1"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz"; + sha256 = "b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4"; + }; + + buildInputs = [ ocaml omake findlib graphicsmagick ghostscript ]; + + propagatedBuildInputs = [libtiff libjpeg libpng giflib freetype libXpm ]; + + createFindlibDestdir = true; + + preConfigure = '' + rm ./configure + ''; + + buildPhase = '' + omake + ''; + + installPhase = '' + omake install + ''; + + meta = with stdenv.lib; { + branch = "4.0"; + homepage = "https://bitbucket.org/camlspotter/camlimages"; + description = "OCaml image processing library"; + license = licenses.lgpl2; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix new file mode 100644 index 000000000000..5874e7a52d35 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitLab, buildDunePackage, dune-configurator, cppo, lablgtk, stdio }: + +buildDunePackage rec { + pname = "camlimages"; + version = "5.0.3"; + + useDune2 = true; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitLab { + owner = "camlspotter"; + repo = pname; + rev = version; + sha256 = "1ng9pkvrzlibfyf97iqvmbsqcykz8v1ln106xhq9nigih5i68zyd"; + }; + + buildInputs = [ dune-configurator cppo lablgtk stdio ]; + + meta = with lib; { + branch = "5.0"; + inherit (src.meta) homepage; + description = "OCaml image processing library"; + license = licenses.lgpl2; + maintainers = [ maintainers.vbgl maintainers.mt-caret ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlpdf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlpdf/default.nix new file mode 100644 index 000000000000..7e231001f24f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlpdf/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, which, ocaml, findlib }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "camlpdf is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + version = "2.3.1"; + name = "ocaml${ocaml.version}-camlpdf-${version}"; + src = fetchFromGitHub { + owner = "johnwhitington"; + repo = "camlpdf"; + rev = "v${version}"; + sha256 = "1q69hhk63z836jbkv4wsng27w35w0qpz01c7ax0mqm8d8kmnr0v4"; + }; + + buildInputs = [ which ocaml findlib ]; + + # Version number in META file is wrong + patchPhase = '' + patch -p 0 META <<EOF + 3c3 + < version="1.7.1" + --- + > version="${version}" + EOF + ''; + + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs + ''; + + meta = with stdenv.lib; { + description = "An OCaml library for reading, writing and modifying PDF files"; + homepage = "https://github.com/johnwhitington/camlpdf"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [vbgl]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/META b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/META new file mode 100644 index 000000000000..44c5168ae518 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/META @@ -0,0 +1,6 @@ +version="@VERSION@" +description="reading and writing ZIP, JAR and GZIP files" +requires="unix" +archive(byte)="zip.cma" +archive(native)="zip.cmxa" +linkopts = "" diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/default.nix new file mode 100644 index 000000000000..7de8968e0610 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/default.nix @@ -0,0 +1,67 @@ +{stdenv, fetchurl, zlib, ocaml, findlib}: + +let + param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "1.07"; + url = "https://github.com/xavierleroy/camlzip/archive/rel107.tar.gz"; + sha256 = "1pdz3zyiczm6c46zfgag2frwq3ljlq044p3a2y4wm2wb4pgz8k9g"; + patches = []; + installTargets = [ "install-findlib" ]; + } else { + version = "1.05"; + download_id = "1037"; + url = "http://forge.ocamlcore.org/frs/download.php/${param.download_id}/camlzip-${param.version}.tar.gz"; + sha256 = "930b70c736ab5a7ed1b05220102310a0a2241564786657abe418e834a538d06b"; + patches = [./makefile_1_05.patch]; + installTargets = [ "install" ]; + }; +in + +stdenv.mkDerivation { + name = "camlzip-${param.version}"; + + src = fetchurl { + inherit (param) url; + inherit (param) sha256; + }; + + buildInputs = [ocaml findlib]; + + propagatedBuildInputs = [zlib]; + + inherit (param) patches; + + createFindlibDestdir = true; + + postPatch = '' + substitute ${./META} META --subst-var-by VERSION "${param.version}" + substituteInPlace Makefile \ + --subst-var-by ZLIB_LIBDIR "${zlib.out}/lib" \ + --subst-var-by ZLIB_INCLUDE "${zlib.dev}/include" + ''; + + buildFlags = [ "all" "allopt" ]; + + inherit (param) installTargets; + + postInstall = '' + ln -s $out/lib/ocaml/${ocaml.version}/site-lib/{,caml}zip + ''; + + meta = { + homepage = "http://cristal.inria.fr/~xleroy/software.html#camlzip"; + description = "A library for handling ZIP and GZIP files in OCaml"; + longDescription = '' + This Objective Caml library provides easy access to compressed files in + ZIP and GZIP format, as well as to Java JAR files. It provides functions + for reading from and writing to compressed files in these formats. + ''; + license = "LGPL+linking exceptions"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/makefile_1_05.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/makefile_1_05.patch new file mode 100644 index 000000000000..87d0c8bec334 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camlzip/makefile_1_05.patch @@ -0,0 +1,54 @@ +diff -Nuar camlzip-1.04/Makefile camlzip-1.04.nixpkgs/Makefile +--- camlzip-1.04/Makefile 2002-04-22 17:28:57.000000000 +0200 ++++ camlzip-1.04.nixpkgs/Makefile 2010-12-12 18:30:49.000000000 +0100 +@@ -4,14 +4,10 @@ + ZLIB_LIB=-lz + + # The directory containing the Zlib library (libz.a or libz.so) +-ZLIB_LIBDIR=/usr/local/lib ++ZLIB_LIBDIR=@ZLIB_LIBDIR@ + + # The directory containing the Zlib header file (zlib.h) +-ZLIB_INCLUDE=/usr/local/include +- +-# Where to install the library. By default: sub-directory 'zip' of +-# OCaml's standard library directory. +-INSTALLDIR=`$(OCAMLC) -where`/zip ++ZLIB_INCLUDE=@ZLIB_INCLUDE@ + + ### End of configuration section + +@@ -19,10 +15,13 @@ + OCAMLOPT=ocamlopt + OCAMLDEP=ocamldep + OCAMLMKLIB=ocamlmklib ++OCAMLFIND=ocamlfind + + OBJS=zlib.cmo zip.cmo gzip.cmo + C_OBJS=zlibstubs.o + ++LIBINSTALL_FILES = $(wildcard *.mli *.cmi *.cma *.cmxa *.a *.so) ++ + all: libcamlzip.a zip.cma + + allopt: libcamlzip.a zip.cmxa +@@ -55,18 +54,7 @@ + rm -f *.o *.a + + install: +- mkdir -p $(INSTALLDIR) +- cp zip.cma zip.cmi gzip.cmi zip.mli gzip.mli libcamlzip.a $(INSTALLDIR) +- if test -f dllcamlzip.so; then \ +- cp dllcamlzip.so $(INSTALLDIR); \ +- ldconf=`$(OCAMLC) -where`/ld.conf; \ +- installdir=$(INSTALLDIR); \ +- if test `grep -s -c $$installdir'$$' $$ldconf || :` = 0; \ +- then echo $$installdir >> $$ldconf; fi \ +- fi +- +-installopt: +- cp zip.cmxa zip.a zip.cmx gzip.cmx $(INSTALLDIR) ++ $(OCAMLFIND) install zip META $(LIBINSTALL_FILES) + + depend: + gcc -MM -I$(ZLIB_INCLUDE) *.c > .depend diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.2.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.2.nix new file mode 100644 index 000000000000..6b18220dc8a9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.2.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, ocaml, findlib, camlp4}: + +if stdenv.lib.versionAtLeast ocaml.version "4.05" +then throw "camomile-0.8.2 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "camomile"; + version = "0.8.2"; + + src = fetchurl { + url = "mirror://sourceforge/camomile/camomile-${version}.tar.bz2"; + sha256 = "0x43pjxx70kgip86mmdn08s97k4qzdqc8i79xfyyx28smy1bsa00"; + }; + + buildInputs = [ocaml findlib camlp4]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://camomile.sourceforge.net/"; + description = "A comprehensive Unicode library for OCaml"; + license = stdenv.lib.licenses.lgpl21; + branch = "0.8.2"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.5.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.5.nix new file mode 100644 index 000000000000..b975482ecf3e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/0.8.5.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, fetchpatch, ocaml, findlib, camlp4}: + +stdenv.mkDerivation { + pname = "camomile"; + version = "0.8.5"; + + src = fetchurl { + url = "https://github.com/yoriyuki/Camomile/releases/download/rel-0.8.5/camomile-0.8.5.tar.bz2"; + sha256 = "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045"; + }; + + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/camomile/camomile.0.8.5/files/4.05-typing-fix.patch"; + sha256 = "167279lia6qx62mdcyc5rjsi4gf4yi52wn9mhgd9y1v3754z7fwb"; + })]; + + buildInputs = [ocaml findlib camlp4]; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/yoriyuki/Camomile/tree/master/Camomile"; + description = "A comprehensive Unicode library for OCaml"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/default.nix new file mode 100644 index 000000000000..ff0cb4aa3fe0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/camomile/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, cppo }: + +buildDunePackage rec { + pname = "camomile"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = "yoriyuki"; + repo = pname; + rev = version; + sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; + }; + + buildInputs = [ cppo ]; + + configurePhase = "ocaml configure.ml --share $out/share/camomile"; + + meta = { + inherit (src.meta) homepage; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + license = stdenv.lib.licenses.lgpl21; + description = "A Unicode library for OCaml"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/default.nix new file mode 100644 index 000000000000..0ec1949f5627 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, m4, core_kernel, ounit }: + +buildDunePackage rec { + pname = "cfstream"; + version = "1.3.1"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = version; + sha256 = "0qnxfp6y294gjsccx7ksvwn9x5q20hi8sg24rjypzsdkmlphgdnd"; + }; + + patches = [ ./git_commit.patch ]; + + buildInputs = [ m4 ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ core_kernel ]; + + doCheck = true; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Simple Core-inspired wrapper for standard library Stream module"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/git_commit.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/git_commit.patch new file mode 100644 index 000000000000..596cfdc70927 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cfstream/git_commit.patch @@ -0,0 +1,13 @@ +diff --git a/lib/dune b/lib/dune +index 2266b87..344c704 100644 +--- a/lib/dune ++++ b/lib/dune +@@ -8,7 +8,7 @@ + (rule + (targets GIT_COMMIT) + (deps (:x ../bin/git_commit.sh)) +- (action (with-stdout-to %{targets} (run %{x}))) ++ (action (with-stdout-to %{targets} (run echo None))) + ) + + (rule diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/charInfo_width/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/charInfo_width/default.nix new file mode 100644 index 000000000000..7a78573412fe --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/charInfo_width/default.nix @@ -0,0 +1,19 @@ +{ lib, fetchzip, buildDunePackage, camomile, result }: + +buildDunePackage rec { + pname = "charInfo_width"; + version = "1.1.0"; + src = fetchzip { + url = "https://bitbucket.org/zandoye/charinfo_width/get/${version}.tar.bz2"; + sha256 = "19mnq9a1yr16srqs8n6hddahr4f9d2gbpmld62pvlw1ps7nfrp9w"; + }; + + propagatedBuildInputs = [ camomile result ]; + + meta = { + homepage = "https://bitbucket.org/zandoye/charinfo_width/"; + description = "Determine column width for a character"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix new file mode 100644 index 000000000000..731dd476c5d7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchurl, buildDunePackage +, bigarray-compat, optint +, cmdliner, fmt, rresult +, alcotest +}: + +buildDunePackage rec { + version = "0.1.1"; + pname = "checkseum"; + + src = fetchurl { + url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz"; + sha256 = "0aa2r1l65a5hcgciw6n8r5ij4gpgg0cf9k24isybxiaiz63k94d3"; + }; + + buildInputs = [ cmdliner fmt rresult ]; + propagatedBuildInputs = [ bigarray-compat optint ]; + checkInputs = lib.optionals doCheck [ alcotest ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/mirage/checkseum"; + description = "ADLER-32 and CRC32C Cyclic Redundancy Check"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cil/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cil/default.nix new file mode 100644 index 000000000000..9903c237e632 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cil/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "cil is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-cil-1.7.3"; + src = fetchurl { + url = "mirror://sourceforge/cil/cil-1.7.3.tar.gz"; + sha256 = "05739da0b0msx6kmdavr3y2bwi92jbh3szc35d7d8pdisa8g5dv9"; + }; + + buildInputs = [ perl ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + preConfigure = '' + substituteInPlace Makefile.in --replace 'MACHDEPCC=gcc' 'MACHDEPCC=$(CC)' + export FORCE_PERL_PREFIX=1 + ''; + prefixKey = "-prefix="; + + meta = with stdenv.lib; { + homepage = "http://kerneis.github.io/cil/"; + description = "A front-end for the C programming language that facilitates program analysis and transformation"; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cmdliner/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cmdliner/default.nix new file mode 100644 index 000000000000..7c94dcf54356 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: + +let + pname = "cmdliner"; +in + +assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" then { + version = "1.0.4"; + sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"; + } else { + version = "1.0.2"; + sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; + } +; in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + inherit (param) version; + + src = fetchurl { + url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; + inherit (param) sha256; + }; + + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ topkg ]; + propagatedBuildInputs = [ result ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + homepage = "https://erratique.ch/software/cmdliner"; + description = "An OCaml module for the declarative definition of command line interfaces"; + license = licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix new file mode 100644 index 000000000000..246397b60810 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix @@ -0,0 +1,22 @@ +{ stdenv, buildDunePackage, async, cohttp, conduit-async, uri, ppx_sexp_conv +, logs, magic-mime }: + +if !stdenv.lib.versionAtLeast cohttp.version "0.99" then + cohttp +else if !stdenv.lib.versionAtLeast async.version "0.13" then + throw "cohttp-async needs async-0.13 (hence OCaml >= 4.08)" +else + + buildDunePackage { + pname = "cohttp-async"; + useDune2 = true; + inherit (cohttp) version src; + + buildInputs = [ ppx_sexp_conv ]; + + propagatedBuildInputs = [ async cohttp conduit-async logs magic-mime uri ]; + + meta = cohttp.meta // { + description = "CoHTTP implementation for the Async concurrency library"; + }; + } diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix new file mode 100644 index 000000000000..6cb802e437d7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchurl, buildDunePackage +, ppx_fields_conv, ppx_sexp_conv, stdlib-shims +, base64, fieldslib, jsonm, re, stringext, uri-sexp +}: + +buildDunePackage rec { + pname = "cohttp"; + version = "2.5.4"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${version}/cohttp-v${version}.tbz"; + sha256 = "1q04spmki5zis5p5m1vs77i3k7ijm134j62g61071vblwx25z17a"; + }; + + buildInputs = [ jsonm ppx_fields_conv ppx_sexp_conv ]; + + propagatedBuildInputs = [ base64 fieldslib re stringext uri-sexp stdlib-shims ]; + + meta = { + description = "HTTP(S) library for Lwt, Async and Mirage"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/ocaml-cohttp"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix new file mode 100644 index 000000000000..3a99ed9536f0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix @@ -0,0 +1,19 @@ +{ stdenv, buildDunePackage, cohttp-lwt +, conduit-lwt-unix, ppx_sexp_conv +, cmdliner, fmt, magic-mime +}: + +if !stdenv.lib.versionAtLeast cohttp-lwt.version "0.99" +then cohttp-lwt +else + +buildDunePackage { + pname = "cohttp-lwt-unix"; + inherit (cohttp-lwt) version src meta; + + useDune2 = true; + + buildInputs = [ cmdliner ppx_sexp_conv ]; + + propagatedBuildInputs = [ cohttp-lwt conduit-lwt-unix fmt magic-mime ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix new file mode 100644 index 000000000000..1f261be62022 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix @@ -0,0 +1,16 @@ +{ stdenv, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv, logs }: + +if !stdenv.lib.versionAtLeast cohttp.version "0.99" +then cohttp +else if !stdenv.lib.versionAtLeast ppx_sexp_conv.version "0.13" +then throw "cohttp-lwt is not available for ppx_sexp_conv version ${ppx_sexp_conv.version}" +else + +buildDunePackage { + pname = "cohttp-lwt"; + inherit (cohttp) version src meta; + + buildInputs = [ uri ppx_sexp_conv ]; + + propagatedBuildInputs = [ cohttp ocaml_lwt logs ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix new file mode 100644 index 000000000000..55787e123923 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix @@ -0,0 +1,22 @@ +{stdenv, buildOcaml, fetchurl, type_conv}: + +buildOcaml rec { + name = "comparelib"; + version = "113.00.00"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/comparelib/archive/${version}.tar.gz"; + sha256 = "02l343drgi4200flfx73nzdk61zajwidsqjk9n80b2d37lvhazlf"; + }; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/comparelib"; + description = "Syntax extension for deriving \"compare\" functions automatically"; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix new file mode 100644 index 000000000000..f16819ed8aef --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix @@ -0,0 +1,19 @@ +{ stdenv, buildDunePackage, async, async_ssl, ppx_sexp_conv, conduit }: + +if !stdenv.lib.versionAtLeast conduit.version "1.0" +then conduit +else + +buildDunePackage { + pname = "conduit-async"; + useDune2 = true; + inherit (conduit) version src; + + buildInputs = [ ppx_sexp_conv ]; + + propagatedBuildInputs = [ async async_ssl conduit ]; + + meta = conduit.meta // { + description = "A network connection establishment library for Async"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix new file mode 100644 index 000000000000..27b2a329b26e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, buildDunePackage +, ppx_sexp_conv, sexplib, astring, uri, logs +, ipaddr, ipaddr-sexp +}: + +buildDunePackage rec { + pname = "conduit"; + version = "2.2.2"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-conduit/releases/download/v2.2.2/conduit-v2.2.2.tbz"; + sha256 = "1zb83w2pq9c8xrappfxa6y5q93772f5dj22x78camsm77a2c2z55"; + }; + + buildInputs = [ ppx_sexp_conv ]; + propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri ]; + + meta = { + description = "A network connection establishment library"; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ alexfmpe vbgl ]; + homepage = "https://github.com/mirage/ocaml-conduit"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix new file mode 100644 index 000000000000..b3c7e7fa86f9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix @@ -0,0 +1,20 @@ +{ stdenv, buildDunePackage +, conduit-lwt, ppx_sexp_conv, ocaml_lwt, uri, ipaddr, ipaddr-sexp +, lwt_ssl, tls +}: + +buildDunePackage { + pname = "conduit-lwt-unix"; + inherit (conduit-lwt) version src minimumOCamlVersion; + + useDune2 = true; + + buildInputs = [ ppx_sexp_conv ]; + + propagatedBuildInputs = + [ conduit-lwt ocaml_lwt uri ipaddr ipaddr-sexp tls lwt_ssl ]; + + meta = conduit-lwt.meta // { + description = "A network connection establishment library for Lwt_unix"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt.nix new file mode 100644 index 000000000000..9bcd98e06a49 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt.nix @@ -0,0 +1,14 @@ +{ stdenv, buildDunePackage, ppx_sexp_conv, conduit, ocaml_lwt, sexplib }: + +buildDunePackage { + pname = "conduit-lwt"; + inherit (conduit) version src minimumOCamlVersion; + + buildInputs = [ ppx_sexp_conv ]; + + propagatedBuildInputs = [ conduit ocaml_lwt sexplib ]; + + meta = conduit.meta // { + description = "A network connection establishment library for Lwt"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/config-file/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/config-file/default.nix new file mode 100644 index 000000000000..724c5b1e2d6a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/config-file/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ocaml, findlib, camlp4 }: + +stdenv.mkDerivation { + name = "ocaml-config-file-1.2"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1387/config-file-1.2.tar.gz"; + sha256 = "1b02yxcnsjhr05ssh2br2ka4hxsjpdw34ldl3nk33wfnkwk7g67q"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://config-file.forge.ocamlcore.org/"; + platforms = ocaml.meta.platforms or []; + description = "An OCaml library used to manage the configuration file(s) of an application"; + license = stdenv.lib.licenses.lgpl2Plus; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/data.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/data.nix new file mode 100644 index 000000000000..9cbaabd9cf1e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/data.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, containers +, gen, iter, qcheck +}: + +buildDunePackage { + pname = "containers-data"; + + inherit (containers) src version; + + doCheck = true; + checkInputs = [ gen iter qcheck ]; + + propagatedBuildInputs = [ containers ]; + + meta = containers.meta // { + description = "A set of advanced datatypes for containers"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix new file mode 100644 index 000000000000..970122dd79f3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix @@ -0,0 +1,38 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml +, seq +, gen, iter, ounit, qcheck, uutf +}: + +buildDunePackage rec { + version = "3.0"; + pname = "containers"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "ocaml-containers"; + rev = "v${version}"; + sha256 = "0c75d5csgc68qqbsdz4279nlin111zrjbg4d47k32ska28myvpqn"; + }; + + propagatedBuildInputs = [ seq ]; + + checkInputs = [ gen iter ounit qcheck uutf ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/c-cube/ocaml-containers"; + description = "A modular standard library focused on data structures"; + longDescription = '' + Containers is a standard library (BSD license) focused on data structures, + combinators and iterators, without dependencies on unix. Every module is + independent and is prefixed with 'CC' in the global namespace. Some modules + extend the stdlib (e.g. CCList provides safe map/fold_right/append, and + additional functions on lists). + + It also features optional libraries for dealing with strings, and + helpers for unix and threads. + ''; + license = lib.licenses.bsd2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cow/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cow/default.nix new file mode 100644 index 000000000000..787854f8e416 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cow/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchurl, buildDunePackage, alcotest +, uri, xmlm, omd, ezjsonm }: + +buildDunePackage rec { + minimumOCamlVersion = "4.02.3"; + + version = "2.4.0"; + pname = "cow"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-cow/releases/download/v${version}/cow-v${version}.tbz"; + sha256 = "1x77lwpskda4zyikwxh500xjn90pgdwz6jm7ca7f36pyav4vl6zx"; + }; + + propagatedBuildInputs = [ xmlm uri ezjsonm omd ]; + checkInputs = [ alcotest ]; + doCheck = true; + + meta = with lib; { + description = "Caml on the Web"; + longDescription = '' + Writing web-applications requires a lot of skills: HTML, XML, JSON and + Markdown, to name but a few! This library provides OCaml combinators + for these web formats. + ''; + license = licenses.isc; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpdf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpdf/default.nix new file mode 100644 index 000000000000..e40f6531e1fd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpdf/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }: + +let version = "2.3.1"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-cpdf-${version}"; + + src = fetchFromGitHub { + owner = "johnwhitington"; + repo = "cpdf-source"; + rev = "v${version}"; + sha256 = "1gwz0iy28f67kbqap2q10nf98dalwbi03vv5j893z2an7pb4w68z"; + }; + + prePatch = '' + substituteInPlace META --replace 'version="1.7"' 'version="${version}"' + ''; + + buildInputs = [ ocaml findlib ncurses ]; + propagatedBuildInputs = [ camlpdf ]; + + createFindlibDestdir = true; + + postInstall = '' + mkdir -p $out/bin + cp cpdf $out/bin + mkdir -p $out/share/ + cp -r doc $out/share + cp cpdfmanual.pdf $out/share/doc/cpdf/ + ''; + + meta = with stdenv.lib; { + homepage = "https://www.coherentpdf.com/"; + platforms = ocaml.meta.platforms or []; + description = "PDF Command Line Tools"; + license = licenses.unfree; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpu/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpu/default.nix new file mode 100644 index 000000000000..716e40e16e9f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpu/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, autoconf }: + +buildDunePackage rec { + pname = "cpu"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "UnixJunkie"; + repo = pname; + rev = "v${version}"; + sha256 = "1vir6gh1bhvxgj2fcn69c38yhw3jgk7dyikmw789m5ld2csnyjiv"; + }; + + preConfigure = '' + autoconf + autoheader + ''; + + buildInputs = [ autoconf ]; + + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Core pinning library"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpuid/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpuid/default.nix new file mode 100644 index 000000000000..8adca8b956f6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cpuid/default.nix @@ -0,0 +1,20 @@ +{ lib, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "cpuid"; + version = "0.1.2"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/pqwy/cpuid/releases/download/v${version}/cpuid-v${version}.tbz"; + sha256 = "08ng4mva6qblb5ipkrxbr0my7ndkc4qwcbswkqgbgir864s74m93"; + }; + + meta = { + homepage = "https://github.com/pqwy/cpuid"; + description = "Detect CPU features from OCaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/crowbar/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/crowbar/default.nix new file mode 100644 index 000000000000..0189026e346b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/crowbar/default.nix @@ -0,0 +1,32 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ocplib-endian, cmdliner, afl-persistent +, calendar, fpath, pprint, uutf, uunf, uucp }: + +buildDunePackage rec { + pname = "crowbar"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "stedolan"; + repo = pname; + rev = "v${version}"; + sha256 = "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"; + }; + + minimumOCamlVersion = "4.08"; + + # disable xmldiff tests, so we don't need to package unmaintained and legacy pkgs + postPatch = "rm -rf examples/xmldiff"; + + propagatedBuildInputs = [ ocplib-endian cmdliner afl-persistent ]; + checkInputs = [ calendar fpath pprint uutf uunf uucp ]; + # uunf is broken on aarch64 + doCheck = !stdenv.isAarch64; + + meta = with stdenv.lib; { + description = "Property fuzzing for OCaml"; + homepage = "https://github.com/stedolan/crowbar"; + license = licenses.mit; + maintainers = [ maintainers.sternenseemann ]; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptgps/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptgps/default.nix new file mode 100644 index 000000000000..2d9ac2a7b193 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptgps/default.nix @@ -0,0 +1,37 @@ +{stdenv, fetchurl, ocaml, findlib}: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "cryptgps is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + pname = "ocaml-cryptgps"; + version = "0.2.1"; + + src = fetchurl { + url = "http://download.camlcity.org/download/cryptgps-0.2.1.tar.gz"; + sha256 = "1mp7i42cm9w9grmcsa69m3h1ycpn6a48p43y4xj8rsc12x9nav3s"; + }; + + buildInputs = [ocaml findlib]; + + dontConfigure = true; # Skip configure phase + + createFindlibDestdir = true; + + meta = { + homepage = "http://projects.camlcity.org/projects/cryptgps.html"; + description = "Cryptographic functions for OCaml"; + longDescription = '' + This library implements the symmetric cryptographic algorithms + Blowfish, DES, and 3DES. The algorithms are written in O'Caml, + i.e. this is not a binding to some C library, but the implementation + itself. + ''; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptokit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptokit/default.nix new file mode 100644 index 000000000000..69f8445e2173 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cryptokit/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, zlib, ocaml, findlib, ocamlbuild, zarith, ncurses }: + +assert stdenv.lib.versionAtLeast ocaml.version "3.12"; + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "1.14"; + url = "https://github.com/xavierleroy/cryptokit/archive/release114.tar.gz"; + sha256 = "0wkh72idkb7dahiwyl94hhbq27cc7x9fnmxkpnbqli6wi8wd7d05"; + inherit zarith; + } else { + version = "1.10"; + url = "http://forge.ocamlcore.org/frs/download.php/1493/cryptokit-1.10.tar.gz"; + sha256 = "1k2f2ixm7jcsgrzn9lz1hm9qqgq71lk9lxy3v3cwsd8xdrj3jrnv"; + zarith = null; + }; +in + +stdenv.mkDerivation { + pname = "cryptokit"; + inherit (param) version; + + src = fetchurl { + inherit (param) url sha256; + }; + + buildInputs = [ ocaml findlib ocamlbuild ncurses ]; + propagatedBuildInputs = [ param.zarith zlib ]; + + buildFlags = [ "setup.data" "build" ]; + + preBuild = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs"; + + meta = { + homepage = "http://pauillac.inria.fr/~xleroy/software.html"; + description = "A library of cryptographic primitives for OCaml"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix new file mode 100644 index 000000000000..0ca094382228 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchurl, buildDunePackage, result }: + +buildDunePackage rec { + pname = "csexp"; + version = "1.3.2"; + + minimumOCamlVersion = "4.02.3"; + + src = fetchurl { + url = "https://github.com/ocaml-dune/csexp/releases/download/${version}/csexp-${version}.tbz"; + sha256 = "0jhwrxfjb0x31xj4g4b89fzw34sq19j0rq2hs2zyh1vz4xxl47zj"; + }; + + propagatedBuildInputs = [ result ]; + + meta = with lib; { + homepage = "https://github.com/ocaml-dune/csexp"; + description = "Minimal support for Canonical S-expressions"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix new file mode 100644 index 000000000000..1cea58abee20 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, ocaml, ocamlbuild, ocplib-endian, sexplib, findlib, ppx_tools +, async ? null, lwt ? null +}: + +assert stdenv.lib.versionAtLeast ocaml.version "4.01"; + +let version = "1.9.0"; in + +let opt = b: "--${if b != null then "en" else "dis"}able"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-cstruct-${version}"; + + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-cstruct"; + rev = "v${version}"; + sha256 = "1c1j21zgmxi9spq23imy7byn50qr7hlds1cfpzxlsx9dp309jngy"; + }; + + configureFlags = [ "${opt lwt}-lwt" "${opt async}-async" "${opt ppx_tools}-ppx" ]; + + buildInputs = [ ocaml findlib ocamlbuild ppx_tools lwt async ]; + propagatedBuildInputs = [ ocplib-endian sexplib ]; + + createFindlibDestdir = true; + dontStrip = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/mirage/ocaml-cstruct"; + description = "Map OCaml arrays onto C-like structs"; + license = stdenv.lib.licenses.isc; + maintainers = [ maintainers.vbgl maintainers.ericbmerritt ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix new file mode 100644 index 000000000000..01a32fc09a20 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix @@ -0,0 +1,18 @@ +{ lib, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "cstruct"; + version = "4.0.0"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz"; + sha256 = "1q4fsc2m6d96yf42g3wb3gcnhpnxw800df5mh3yr25pprj8y4m1a"; + }; + + meta = { + description = "Access C-like structures directly from OCaml"; + license = lib.licenses.isc; + homepage = "https://github.com/mirage/ocaml-cstruct"; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/lwt.nix new file mode 100644 index 000000000000..5a10d7cae48d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/lwt.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, cstruct, lwt }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else + +buildDunePackage { + pname = "cstruct-lwt"; + inherit (cstruct) version src meta; + + minimumOCamlVersion = "4.02"; + + propagatedBuildInputs = [ cstruct lwt ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix new file mode 100644 index 000000000000..22fe4ac47cf3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/ppx.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, cstruct, sexplib, ppx_tools_versioned }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else + +buildDunePackage { + pname = "ppx_cstruct"; + inherit (cstruct) version src meta; + + minimumOCamlVersion = "4.03"; + + propagatedBuildInputs = [ cstruct ppx_tools_versioned sexplib ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix new file mode 100644 index 000000000000..d0df442013ff --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix @@ -0,0 +1,16 @@ +{ lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else + +buildDunePackage rec { + pname = "cstruct-sexp"; + inherit (cstruct) version src meta; + + doCheck = lib.versionAtLeast ocaml.version "4.03"; + checkInputs = lib.optional doCheck alcotest; + + propagatedBuildInputs = [ cstruct sexplib ]; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix new file mode 100644 index 000000000000..7cb5d6658696 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/cstruct/unix.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, cstruct }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else + +buildDunePackage { + pname = "cstruct-unix"; + inherit (cstruct) version src meta; + + minimumOCamlVersion = "4.06"; + + propagatedBuildInputs = [ cstruct ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix new file mode 100644 index 000000000000..9b6152692631 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-csv-1.5"; + + src = fetchzip { + url = "https://github.com/Chris00/ocaml-csv/releases/download/1.5/csv-1.5.tar.gz"; + sha256 = "1ca7jgg58j24pccs5fshis726s06fdcjshnwza5kwxpjgdbvc63g"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests"; + + buildPhase = "ocaml setup.ml -build"; + + doCheck = true; + checkPhase = "ocaml setup.ml -test"; + + installPhase = "ocaml setup.ml -install"; + + meta = with stdenv.lib; { + description = "A pure OCaml library to read and write CSV files"; + homepage = "https://github.com/Chris00/ocaml-csv"; + license = licenses.lgpl21; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix new file mode 100644 index 000000000000..2d017b9a916b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "csv"; + version = "2.4"; + + src = fetchurl { + url = "https://github.com/Chris00/ocaml-${pname}/releases/download/${version}/csv-${version}.tbz"; + sha256 = "13m9n8mdss6jfbiw7d5bybxn4n85vmg4zw7dc968qrgjfy0w9zhk"; + }; + + meta = { + description = "A pure OCaml library to read and write CSV files"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + homepage = "https://github.com/Chris00/ocaml-csv"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/lwt.nix new file mode 100644 index 000000000000..2fa9296d7e44 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/csv/lwt.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, ocaml, csv, ocaml_lwt }: + +if !lib.versionAtLeast ocaml.version "4.02" +then throw "csv-lwt is not available for OCaml ${ocaml.version}" +else + +buildDunePackage { + pname = "csv-lwt"; + inherit (csv) src version meta; + + propagatedBuildInputs = [ csv ocaml_lwt ]; + + doCheck = lib.versionAtLeast ocaml.version "4.03"; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ctypes/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ctypes/default.nix new file mode 100644 index 000000000000..e541f0741a6e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ctypes/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchzip, ocaml, findlib, libffi, pkgconfig, ncurses, integers }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "ctypes is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ctypes-${version}"; + version = "0.16.0"; + + src = fetchzip { + url = "https://github.com/ocamllabs/ocaml-ctypes/archive/${version}.tar.gz"; + sha256 = "0qh2gfx5682wkk2nm1ybspzz9c2xvlnnf6iv08a89kbwa1hvdqrg"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib ncurses ]; + propagatedBuildInputs = [ integers libffi ]; + + buildPhase = '' + make XEN=false libffi.config ctypes-base ctypes-stubs + make XEN=false ctypes-foreign + ''; + + installPhase = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs + make install XEN=false + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/ocamllabs/ocaml-ctypes"; + description = "Library for binding to C libraries using pure OCaml"; + license = licenses.mit; + maintainers = [ maintainers.ericbmerritt ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix new file mode 100644 index 000000000000..a17ea72140ff --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix @@ -0,0 +1,29 @@ +{ lib, buildDunePackage, fetchFromGitHub, ocaml +, result, alcotest, cohttp-lwt-unix, odoc, curl }: + +buildDunePackage rec { + pname = "curly"; + version = "unstable-2019-11-14"; + + minimumOCamlVersion = "4.02"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "rgrinberg"; + repo = pname; + rev = "33a538c89ef8279d4591454a7f699a4183dde5d0"; + sha256 = "10pxbvf5xrsajaxrccxh2lqhgp3yaf61z9w03rvb2mq44nc2dggz"; + }; + + propagatedBuildInputs = [ result ]; + checkInputs = [ alcotest cohttp-lwt-unix ]; + # test dependencies are only available for >= 4.05 + doCheck = lib.versionAtLeast ocaml.version "4.05"; + + postPatch = '' + substituteInPlace src/curly.ml \ + --replace "exe=\"curl\"" "exe=\"${curl}/bin/curl\"" + ''; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curses/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curses/default.nix new file mode 100644 index 000000000000..2c989caa3e8d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curses/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, ocaml, findlib, ncurses }: + +stdenv.mkDerivation rec { + pname = "ocaml-curses"; + version = "1.0.4"; + + src = fetchurl { + url = "http://ocaml.phauna.org/distfiles/ocaml-curses-${version}.ogunden1.tar.gz"; + sha256 = "08wq1r93lincdfzlriyc5nl2p4q7ca4h6ygzgp1nhkgd93pgk9v2"; + }; + + propagatedBuildInputs = [ ncurses ]; + + buildInputs = [ ocaml findlib ]; + + # Fix build for recent ncurses versions + NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1"; + + createFindlibDestdir = true; + + postPatch = '' + substituteInPlace curses.ml --replace "pp gcc" "pp $CC" + ''; + + buildPhase = "make all opt"; + + meta = with stdenv.lib; { + description = "OCaml Bindings to curses/ncurses"; + homepage = "https://opam.ocaml.org/packages/curses/curses.1.0.4/"; + license = licenses.gpl2; + maintainers = [ maintainers.volth ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix new file mode 100644 index 000000000000..753f894e0850 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchurl, buildDunePackage +, checkseum, cmdliner +, alcotest, bos, camlzip, mmap, re +}: + +buildDunePackage rec { + version = "0.9.0"; + pname = "decompress"; + + src = fetchurl { + url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-v${version}.tbz"; + sha256 = "0fryhcvv96vfca51c7kqdn3n3canqsbbvfbi75ya6lca4lmpipbh"; + }; + + buildInputs = [ cmdliner ]; + propagatedBuildInputs = [ checkseum ]; + checkInputs = lib.optionals doCheck [ alcotest bos camlzip mmap re ]; + doCheck = true; + + meta = { + description = "Pure OCaml implementation of Zlib"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/decompress"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix new file mode 100644 index 000000000000..d02104decba3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix @@ -0,0 +1,32 @@ +{ lib, fetchurl, fetchpatch, buildDunePackage +, bigarray-compat, eqaf, stdlib-shims +, alcotest +}: + +buildDunePackage rec { + pname = "digestif"; + version = "0.8.0"; + + src = fetchurl { + url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-v${version}.tbz"; + sha256 = "09g4zngqiw97cljv8ds4m063wcxz3y7c7vzaprsbpjzi0ja5jdcy"; + }; + + # Fix tests with alcotest ≥ 1 + patches = [ (fetchpatch { + url = "https://github.com/mirage/digestif/commit/b65d996c692d75da0a81323253429e07d14b72b6.patch"; + sha256 = "0sf7qglcp19dhs65pwrrc7d9v57icf18jsrhpmvwskx8b4dchfiv"; + })]; + + buildInputs = lib.optional doCheck alcotest; + propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ]; + + doCheck = true; + + meta = { + description = "Simple hash algorithms in OCaml"; + homepage = "https://github.com/mirage/digestif"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dispatch/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dispatch/default.nix new file mode 100644 index 000000000000..5de61169c365 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dispatch/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchFromGitHub, alcotest, result }: + +buildDunePackage rec { + pname = "dispatch"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = "ocaml-dispatch"; + rev = "${version}"; + sha256 = "05kb9zcihk50r2haqz8vrlr7kmaka6vrs4j1z500lmnl877as6qr"; + }; + + propagatedBuildInputs = [ result ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + description = "Path-based dispatching for client- and server-side applications"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/client.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/client.nix new file mode 100644 index 000000000000..a6dc40de24ea --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/client.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, dns, ocaml_lwt, mirage-clock, mirage-time +, mirage-random, mirage-stack, mirage-crypto-rng, mtime, randomconv +, cstruct, fmt, logs, rresult, domain-name, ipaddr, alcotest }: + +buildDunePackage { + pname = "dns-client"; + inherit (dns) src version; + + useDune2 = true; + + propagatedBuildInputs = [ cstruct fmt logs dns rresult randomconv domain-name ipaddr + ocaml_lwt mirage-stack mirage-random mirage-time mirage-clock + mtime mirage-crypto-rng ]; + checkInputs = [ alcotest ]; + doCheck = true; + + meta = dns.meta // { + description = "Pure DNS resolver API"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix new file mode 100644 index 000000000000..09753c14b35d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchurl, alcotest +, cstruct, domain-name, duration, gmap, ipaddr, logs, lru, metrics, ptime, rresult, astring, fmt +}: + +buildDunePackage rec { + pname = "dns"; + version = "4.6.2"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-dns/releases/download/v${version}/dns-v${version}.tbz"; + sha256 = "0prypr5c589vay4alri78g0sarh06z35did26wn3s3di17d5761q"; + }; + + propagatedBuildInputs = [ rresult astring fmt logs ptime domain-name gmap cstruct ipaddr lru duration metrics ]; + + doCheck = true; + checkInputs = lib.optional doCheck alcotest; + + meta = { + description = "An Domain Name System (DNS) library"; + homepage = "https://github.com/mirage/ocaml-dns"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix new file mode 100644 index 000000000000..824da3030685 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-dolmen-${version}"; + version = "0.2"; + src = fetchFromGitHub { + owner = "Gbury"; + repo = "dolmen"; + rev = "v${version}"; + sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ menhir ]; + + makeFlags = [ "-C" "src" ]; + + createFindlibDestdir = true; + + meta = { + description = "An OCaml library providing clean and flexible parsers for input languages"; + license = stdenv.lib.licenses.bsd2; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolog/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolog/default.nix new file mode 100644 index 000000000000..f9eef4774f5f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dolog/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +let version = "3.0"; in + +stdenv.mkDerivation { + pname = "ocaml-dolog"; + inherit version; + src = fetchzip { + url = "https://github.com/UnixJunkie/dolog/archive/v${version}.tar.gz"; + sha256 = "0gx2s4509vkkkaikl2yp7k5x7bqv45s1y1vsy408d8rakd7yl1zb"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + doCheck = true; + checkTarget = "test"; + + meta = { + homepage = "https://github.com/UnixJunkie/dolog"; + description = "Minimalistic lazy logger in OCaml"; + platforms = ocaml.meta.platforms or []; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/domain-name/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/domain-name/default.nix new file mode 100644 index 000000000000..cb0105ff46fa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/domain-name/default.nix @@ -0,0 +1,29 @@ +{ lib, buildDunePackage, fetchurl +, alcotest +, astring, fmt +}: + +buildDunePackage rec { + pname = "domain-name"; + version = "0.3.0"; + + src = fetchurl { + url = "https://github.com/hannesm/domain-name/releases/download/v${version}/domain-name-v${version}.tbz"; + sha256 = "12kc9p2a2fi1ipc2hyhbzivxpph3npglxwdgvhd6v20rqqdyvnad"; + }; + + minimumOCamlVersion = "4.03"; + + buildInputs = [ alcotest ]; + + propagatedBuildInputs = [ astring fmt ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/hannesm/domain-name"; + description = "RFC 1035 Internet domain names"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dtoa/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dtoa/default.nix new file mode 100644 index 000000000000..b26cbec25edb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dtoa/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "dtoa"; + version = "0.3.2"; + + minimumOCamlVersion = "4.02"; + + src = fetchurl { + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn"; + }; + + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + + meta = with stdenv.lib; { + homepage = "https://github.com/flowtype/ocaml-dtoa"; + description = "Converts OCaml floats into strings (doubles to ascii, \"d to a\"), using the efficient Grisu3 algorithm."; + license = licenses.mit; + maintainers = [ maintainers.eqyiel ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duff/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duff/default.nix new file mode 100644 index 000000000000..1c6b59961ef2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duff/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchurl, buildDunePackage +, cstruct, fmt +, bos, cmdliner, fpath, logs +, alcotest +}: + +buildDunePackage rec { + pname = "duff"; + version = "0.2"; + src = fetchurl { + url = "https://github.com/mirage/duff/releases/download/v${version}/duff-v${version}.tbz"; + sha256 = "0bi081w4349cqc1n9jsjh1lrcqlnv3nycmvh9fniscv8lz1c0gjq"; + }; + + buildInputs = [ bos cmdliner fpath logs ] ++ lib.optional doCheck alcotest; + propagatedBuildInputs = [ cstruct fmt ]; + + doCheck = true; + + meta = { + description = "Pure OCaml implementation of libXdiff (Rabin’s fingerprint)"; + homepage = "https://github.com/mirage/duff"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix new file mode 100644 index 000000000000..844d06e30389 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib +, easy-format +}: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-dum-${version}"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "mjambon"; + repo = "dum"; + rev = "v${version}"; + sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr"; + }; + + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ easy-format ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/mjambon/dum"; + description = "Inspect the runtime representation of arbitrary OCaml values"; + license = licenses.lgpl21Plus; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix new file mode 100644 index 000000000000..65c55da6e3b3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, dune_2, dune-glob, dune-private-libs }: + +buildDunePackage rec { + pname = "dune-action-plugin"; + inherit (dune_2) src version patches; + + useDune2 = true; + + dontAddPrefix = true; + + propagatedBuildInputs = [ dune-glob dune-private-libs ]; + + meta = with lib; { + inherit (dune_2.meta) homepage; + description = "API for writing dynamic Dune actions"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-build-info/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-build-info/default.nix new file mode 100644 index 000000000000..5d9f105782b4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-build-info/default.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage, dune_2 }: + +buildDunePackage rec { + pname = "dune-build-info"; + inherit (dune_2) src version patches; + + useDune2 = true; + + dontAddPrefix = true; + + meta = with lib; { + inherit (dune_2.meta) homepage; + description = "Embed build information inside executables"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-configurator/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-configurator/default.nix new file mode 100644 index 000000000000..f5303db9a3b5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-configurator/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, dune_2, csexp, result }: + +buildDunePackage rec { + pname = "dune-configurator"; + + useDune2 = true; + + inherit (dune_2) src version patches; + + minimumOCamlVersion = "4.03"; + + dontAddPrefix = true; + + propagatedBuildInputs = [ csexp result ]; + + meta = with lib; { + description = "Helper library for gathering system configuration"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix new file mode 100644 index 000000000000..c7c6f9be4ee0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, dune_2, dune-private-libs }: + +buildDunePackage rec { + pname = "dune-glob"; + inherit (dune_2) src version patches; + + useDune2 = true; + + dontAddPrefix = true; + + propagatedBuildInputs = [ dune-private-libs ]; + + meta = with lib; { + inherit (dune_2.meta) homepage; + description = "Glob string matching language supported by dune"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix new file mode 100644 index 000000000000..8a635efa3a59 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, dune_2 }: + +buildDunePackage rec { + pname = "dune-private-libs"; + + useDune2 = true; + + inherit (dune_2) src version patches; + + minimumOCamlVersion = "4.08"; + + dontAddPrefix = true; + + meta = with lib; { + description = "Private libraries of Dune"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix new file mode 100644 index 000000000000..7b3c1c65fc80 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl, alcotest }: + +buildDunePackage rec { + pname = "duration"; + version = "0.1.3"; + + src = fetchurl { + url = "https://github.com/hannesm/duration/releases/download/${version}/duration-${version}.tbz"; + sha256 = "0m9r0ayhpl98g9vdxrbjdcllns274jilic5v8xj1x7dphw21p95h"; + }; + + doCheck = true; + checkInputs = lib.optional doCheck alcotest; + + meta = { + homepage = "https://github.com/hannesm/duration"; + description = "Conversions to various time units"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dypgen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dypgen/default.nix new file mode 100644 index 000000000000..ead672fa15ca --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/dypgen/default.nix @@ -0,0 +1,36 @@ +{stdenv, fetchurl, ocaml, findlib}: + +let + pname = "dypgen"; +in + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "20120619-1"; + + src = fetchurl { + url = "http://dypgen.free.fr/dypgen-20120619-1.tar.bz2"; + sha256 = "ecb53d6e469e9ec4d57ee6323ff498d45b78883ae13618492488e7c5151fdd97"; + }; + + buildInputs = [ocaml findlib]; + + createFindlibDestdir = true; + + buildPhase = '' + make + ''; + + makeFlags = [ "BINDIR=$(out)/bin" "MANDIR=$(out)/usr/share/man/man1" "DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; + + meta = { + homepage = "http://dypgen.free.fr"; + description = "Dypgen GLR self extensible parser generator"; + license = stdenv.lib.licenses.cecill-b; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earley/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earley/default.nix new file mode 100644 index 000000000000..c7b2d09d6674 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earley/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchFromGitHub, ocaml, buildDunePackage +, stdlib-shims +}: + +buildDunePackage rec { + version = "3.0.0"; + pname = "earley"; + src = fetchFromGitHub { + owner = "rlepigre"; + repo = "ocaml-earley"; + rev = version; + sha256 = "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"; + }; + + minimumOCamlVersion = "4.07"; + useDune2 = true; + + buildInputs = [ stdlib-shims ]; + + doCheck = true; + + meta = { + description = "Parser combinators based on Earley Algorithm"; + license = lib.licenses.cecill-b; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/rlepigre/ocaml-earley"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix new file mode 100644 index 000000000000..decbb4117670 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchurl, ocaml, buildDunePackage, angstrom, angstrom-lwt-unix, + batteries, cmdliner, lwt_ppx, ocaml_lwt, ppx_deriving_yojson, + ppx_tools_versioned, yojson }: + +if lib.versionAtLeast ocaml.version "4.08" +then throw "earlybird is not available for OCaml ${ocaml.version}" +else + +buildDunePackage rec { + pname = "earlybird"; + version = "0.1.5"; + + minimumOCamlVersion = "4.04"; + + src = fetchurl { + url = "https://github.com/hackwaly/ocamlearlybird/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "10yflmsicw4sdmm075zjpbmxpwm9fvibnl3sl18zjpwnm6l9sv7d"; + }; + + buildInputs = [ angstrom angstrom-lwt-unix batteries cmdliner lwt_ppx ocaml_lwt ppx_deriving_yojson ppx_tools_versioned yojson ]; + + meta = { + homepage = "https://github.com/hackwaly/ocamlearlybird"; + description = "OCaml debug adapter"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/easy-format/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/easy-format/default.nix new file mode 100644 index 000000000000..5c1155a723bd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/easy-format/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchzip, ocaml, findlib }: +let + pname = "easy-format"; + version = "1.2.0"; +in +stdenv.mkDerivation { + + name = "${pname}-${version}"; + + src = fetchzip { + url = "https://github.com/mjambon/${pname}/archive/v${version}.tar.gz"; + sha256 = "00ga7mrlycjc99gzp3bgx6iwhf7i6j8856f8xzrf1yas7zwzgzm9"; + }; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + doCheck = true; + checkTarget = "test"; + + meta = with stdenv.lib; { + description = "A high-level and functional interface to the Format module of the OCaml standard library"; + homepage = "https://github.com/ocaml-community/${pname}"; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix new file mode 100644 index 000000000000..dacd3a758623 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ctypes, libcxx }: + +buildDunePackage rec { + pname = "eigen"; + version = "0.2.0"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "owlbarn"; + repo = pname; + rev = version; + sha256 = "1zaw03as14hyvfpyj6bjrfbcxp2ljdbqcqqgm53kms244mig425f"; + }; + + minimumOCamlVersion = "4.02"; + + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + + propagatedBuildInputs = [ ctypes ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Minimal/incomplete Ocaml interface to Eigen3, mostly for Owl"; + platforms = platforms.x86_64; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix new file mode 100644 index 000000000000..b41743f542d8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, perl, gmp, mpfr, ocaml, findlib, camlidl, apron }: + +stdenv.mkDerivation rec { + version = "1.1"; + name = "ocaml${ocaml.version}-elina-${version}"; + src = fetchurl { + url = "http://files.sri.inf.ethz.ch/elina-${version}.tar.gz"; + sha256 = "1nymykskq1yx87y4xl6hl9i4q6kv0qaq25rniqgl1bfn883p1ysc"; + }; + + buildInputs = [ perl ocaml findlib ]; + + propagatedBuildInputs = [ apron camlidl gmp mpfr ]; + + prefixKey = "--prefix "; + configureFlags = [ + "--use-apron" + "--use-opam" + "--apron-prefix" apron + ] + ++ stdenv.lib.optional stdenv.isDarwin "--absolute-dylibs" + ; + + createFindlibDestdir = true; + + meta = { + description = "ETH LIbrary for Numerical Analysis"; + homepage = "http://elina.ethz.ch/"; + license = stdenv.lib.licenses.lgpl3; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/default.nix new file mode 100644 index 000000000000..4734d83d55f7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/default.nix @@ -0,0 +1,59 @@ +{ stdenv, fetchzip, which, ocsigen_server, ocaml, + lwt_react, + opaline, ppx_deriving, findlib +, js_of_ocaml-ocamlbuild, js_of_ocaml-ppx, js_of_ocaml-ppx_deriving_json +, js_of_ocaml-lwt +, js_of_ocaml-tyxml +, lwt_ppx +}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.07" +then throw "eliom is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec +{ + pname = "eliom"; + version = "6.12.1"; + + src = fetchzip { + url = "https://github.com/ocsigen/eliom/archive/${version}.tar.gz"; + sha256 = "04c1sz113015gyhj3w7flw7l4bv0v50q6n04kk8dybcravzy2xgx"; + }; + + buildInputs = [ ocaml which findlib js_of_ocaml-ocamlbuild js_of_ocaml-ppx_deriving_json opaline + ]; + + propagatedBuildInputs = [ + js_of_ocaml-lwt + js_of_ocaml-ppx + js_of_ocaml-tyxml + lwt_ppx + lwt_react + ocsigen_server + ppx_deriving + ]; + + installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; + + setupHook = [ ./setup-hook.sh ]; + + meta = { + homepage = "http://ocsigen.org/eliom/"; + description = "OCaml Framework for programming Web sites and client/server Web applications"; + + longDescription =''Eliom is a framework for programming Web sites + and client/server Web applications. It introduces new concepts to + simplify programming common behaviours and uses advanced static + typing features of OCaml to check many properties of the Web site + at compile time. If you want to write a Web application, Eliom + makes possible to write the whole application as a single program + (client and server parts). A syntax extension is used to + distinguish both parts and the client side is compiled to JS using + Ocsigen Js_of_ocaml.''; + + license = stdenv.lib.licenses.lgpl21; + + maintainers = [ stdenv.lib.maintainers.gal_bolle ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/setup-hook.sh new file mode 100644 index 000000000000..9868ab93f791 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eliom/setup-hook.sh @@ -0,0 +1,5 @@ +addOcsigenDistilleryTemplate() { + addToSearchPathWithCustomDelimiter : ELIOM_DISTILLERY_PATH $1/eliom-distillery-templates +} + +addEnvHooks "$hostOffset" addOcsigenDistilleryTemplate diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix new file mode 100644 index 000000000000..865c5448c5bd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix @@ -0,0 +1,32 @@ +{ lib, fetchzip, buildDunePackage, camlp5 +, ppxlib, ppx_deriving, re, perl, ncurses +}: + +buildDunePackage rec { + pname = "elpi"; + version = "1.11.4"; + + src = fetchzip { + url = "https://github.com/LPCIC/elpi/releases/download/v${version}/elpi-v${version}.tbz"; + sha256 = "1hmjp2z52j17vwhhdkj45n9jx11jxkdg2dwa0n04yyw0qqy4m7c1"; + }; + + minimumOCamlVersion = "4.04"; + + buildInputs = [ perl ncurses ppxlib ]; + + propagatedBuildInputs = [ camlp5 ppx_deriving re ]; + + meta = { + description = "Embeddable λProlog Interpreter"; + license = lib.licenses.lgpl21Plus; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/LPCIC/elpi"; + }; + + postPatch = '' + substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols" + ''; + + useDune2 = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/encore/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/encore/default.nix new file mode 100644 index 000000000000..dd05982c3cab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/encore/default.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, fetchurl, ocaml +, fmt, bigstringaf, bigarray-compat +, bigarray-overlap, angstrom, ke, alcotest }: + +buildDunePackage rec { + pname = "encore"; + version = "0.5"; + + src = fetchurl { + url = "https://github.com/mirage/encore/releases/download/v${version}/encore-v${version}.tbz"; + sha256 = "15n0dla149k9h7migs76wap08z5402qcvxyqxzl887ha6isj3p9n"; + }; + + useDune2 = true; + + propagatedBuildInputs = [ angstrom ke fmt bigstringaf bigarray-compat bigarray-overlap ]; + checkInputs = [ alcotest ]; + doCheck = true; + + meta = { + homepage = "https://github.com/mirage/encore"; + description = "Library to generate encoder/decoder which ensure isomorphism"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix new file mode 100644 index 000000000000..22a6d12792c7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-enumerate-111.08.00"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/111.08.00/individual/enumerate-111.08.00.tar.gz"; + sha256 = "0b6mx5p01lcpimvak4wx6aj2119707wsfzd83rwgb91bhpgzh156"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ type_conv camlp4 ]; + + createFindlibDestdir = true; + + meta = { + homepage = "https://ocaml.janestreet.com/"; + description = "Quotation expanders for enumerating finite types"; + license = stdenv.lib.licenses.asl20; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix new file mode 100644 index 000000000000..d86dc01dcb71 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchurl, buildDunePackage, cstruct, bigarray-compat }: + +buildDunePackage rec { + minimumOCamlVersion = "4.03"; + pname = "eqaf"; + version = "0.7"; + + src = fetchurl { + url = "https://github.com/mirage/eqaf/releases/download/v${version}/eqaf-v${version}.tbz"; + sha256 = "1q09pwhs121vpficl2af1yzs4y7dd9bc1lcxbqyfc4x4m6p6drhh"; + }; + + propagatedBuildInputs = [ cstruct bigarray-compat ]; + + meta = { + description = "Constant time equal function to avoid timing attacks in OCaml"; + homepage = "https://github.com/mirage/eqaf"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix new file mode 100644 index 000000000000..ebfcbc90a504 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "erm_xml is not available for OCaml ${ocaml.version}" +else + +let version = "0.3+20180112"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-erm_xml-${version}"; + + src = fetchzip { + url = "https://github.com/hannesm/xml/archive/bbabdade807d8281fc48806da054b70dfe482479.tar.gz"; + sha256 = "1gawpmg8plip0wia0xq60m024dn7l3ykwbjpbqx9f9bdmx74n1rr"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/hannesm/xml"; + description = "XML Parser for discrete data"; + platforms = ocaml.meta.platforms or []; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xmpp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xmpp/default.nix new file mode 100644 index 000000000000..c3534d146f8a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/erm_xmpp/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, camlp4, ocamlbuild +, erm_xml, mirage-crypto, mirage-crypto-rng, base64 +}: + +stdenv.mkDerivation rec { + version = "0.3+20200317"; + name = "ocaml${ocaml.version}-erm_xmpp-${version}"; + + src = fetchFromGitHub { + owner = "hannesm"; + repo = "xmpp"; + rev = "7fa5bea252671fd88625c6af109998b879ca564f"; + sha256 = "0spzyd9kbyizzwl8y3mq8z19zlkzxnkh2fppry4lyc7vaw7bqrwq"; + }; + + buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + propagatedBuildInputs = [ erm_xml mirage-crypto mirage-crypto-rng base64 ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/hannesm/xmpp"; + description = "OCaml based XMPP implementation (fork)"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/estring/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/estring/default.nix new file mode 100644 index 000000000000..4cd27f272b3c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/estring/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildOcaml, ocaml, fetchurl }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "estring is not available for OCaml ${ocaml.version}" +else + +buildOcaml rec { + name = "estring"; + version = "1.3"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1012/estring-${version}.tar.gz"; + sha256 = "0b6znz5igm8pp28w4b7sgy82rpd9m5aw6ss933rfbw1mrh05gvcg"; + }; + + meta = with stdenv.lib; { + homepage = "http://estring.forge.ocamlcore.org/"; + description = "Extension for string literals"; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/0.9.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/0.9.nix new file mode 100644 index 000000000000..886f346012c1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/0.9.nix @@ -0,0 +1,51 @@ +{stdenv, fetchurl, ocaml, findlib, ounit, expat}: + +let + pname = "ocaml-expat"; + testcase = fetchurl { + url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml"; + sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1"; + }; + +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.9.1"; + + src = fetchurl { + url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz"; + sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz"; + }; + + buildInputs = [ocaml findlib ounit expat]; + + createFindlibDestdir = true; + + patches = [ ./unittest.patch ]; + + postPatch = '' + substituteInPlace "unittest.ml" \ + --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}" + substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \ + --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \ + --replace "gcc" "\$(CC)" + ''; + + dontConfigure = true; # Skip configure + + buildPhase = '' + make all allopt + ''; + + doCheck = true; + + checkTarget = "testall"; + + meta = { + homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/"; + description = "An ocaml wrapper for the Expat XML parsing library"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/default.nix new file mode 100644 index 000000000000..6058c87e7bd5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, expat, ocaml, findlib, ounit }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-expat-${version}"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "whitequark"; + repo = "ocaml-expat"; + rev = "v${version}"; + sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q"; + }; + + prePatch = '' + substituteInPlace Makefile --replace "gcc" "\$(CC)" + ''; + + buildInputs = [ ocaml findlib expat ounit ]; + + doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06"; + checkTarget = "testall"; + + createFindlibDestdir = true; + + meta = { + description = "OCaml wrapper for the Expat XML parsing library"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/unittest.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/unittest.patch new file mode 100644 index 000000000000..489b745c503a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/expat/unittest.patch @@ -0,0 +1,15 @@ +--- old/Makefile 2005-03-13 09:00:29.000000000 -0500 ++++ new/Makefile 2010-08-26 14:20:34.515785557 -0400 +@@ -67,10 +67,10 @@ + testall: test testopt + .PHONY: test + test: unittest +- ./unittest ++ LD_LIBRARY_PATH=. ./unittest + .PHONY: testopt + testopt: unittest.opt +- ./unittest.opt ++ LD_LIBRARY_PATH=. ./unittest.opt + unittest: all unittest.ml + $(OCAMLFIND) ocamlc -o unittest -package oUnit -ccopt -L. -linkpkg \ + $(ARCHIVE) unittest.ml diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/extlib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/extlib/default.nix new file mode 100644 index 000000000000..546fc904ffce --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/extlib/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, ocaml, findlib, cppo, minimal ? true }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11"; + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-extlib-1.7.6"; + + src = fetchurl { + url = "http://ygrek.org.ua/p/release/ocaml-extlib/extlib-1.7.6.tar.gz"; + sha256 = "0wfs20v1yj5apdbj7214wdsr17ayh0qqq7ihidndvc8nmmwfa1dz"; + }; + + buildInputs = [ ocaml findlib cppo ]; + + createFindlibDestdir = true; + + dontConfigure = true; # Skip configure + # De facto, option minimal=1 seems to be the default. See the README. + buildPhase = "make ${if minimal then "minimal=1" else ""} build"; + installPhase = "make ${if minimal then "minimal=1" else ""} install"; + + meta = { + homepage = "https://github.com/ygrek/ocaml-extlib"; + description = "Enhancements to the OCaml Standard Library modules"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezjsonm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezjsonm/default.nix new file mode 100644 index 000000000000..781af8a4c98b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezjsonm/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchzip, buildDunePackage, jsonm, hex, sexplib }: + +buildDunePackage rec { + pname = "ezjsonm"; + version = "0.6.0"; + + src = fetchzip { + url = "https://github.com/mirage/${pname}/archive/${version}.tar.gz"; + sha256 = "18g64lhai0bz65b9fil12vlgfpwa9b5apj7x6d7n4zzm18qfazvj"; + }; + + propagatedBuildInputs = [ jsonm hex sexplib ]; + + meta = { + description = "An easy interface on top of the Jsonm library"; + homepage = "https://github.com/mirage/ezjsonm"; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezxmlm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezxmlm/default.nix new file mode 100644 index 000000000000..1740bd77fdb2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ezxmlm/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, xmlm }: + +buildDunePackage rec { + pname = "ezxmlm"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = "avsm"; + repo = pname; + rev = "v${version}"; + sha256 = "1dgr61f0hymywikn67inq908x5adrzl3fjx3v14l9k46x7kkacl9"; + }; + + propagatedBuildInputs = [ xmlm ]; + + meta = with stdenv.lib; { + description = "Combinators to use with xmlm for parsing and selection"; + longDescription = '' + An "easy" interface on top of the xmlm library. This version provides + more convenient (but far less flexible) input and output functions + that go to and from [string] values. This avoids the need to write signal + code, which is useful for quick scripts that manipulate XML. + + More advanced users should go straight to the Xmlm library and use it + directly, rather than be saddled with the Ezxmlm interface. Since the + types in this library are more specific than Xmlm, it should interoperate + just fine with it if you decide to switch over. + ''; + maintainers = [ maintainers.carlosdagos ]; + inherit (src.meta) homepage; + license = licenses.isc; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix new file mode 100644 index 000000000000..8834de53a8fa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix @@ -0,0 +1,19 @@ +{ lib, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "facile"; + version = "1.1.4"; + + src = fetchurl { + url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz"; + sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp"; + }; + + doCheck = true; + + meta = { + homepage = "http://opti.recherche.enac.fr/facile/"; + license = lib.licenses.lgpl21Plus; + description = "A Functional Constraint Library"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faillib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faillib/default.nix new file mode 100644 index 000000000000..2a4d03e87aea --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faillib/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "faillib-111.17.00 is not available for OCaml ${ocaml.version}" +else + +buildOcaml rec { + minimumSupportedOcamlVersion = "4.00"; + name = "faillib"; + version = "111.17.00"; + + src = fetchurl { + url = "https://github.com/janestreet/faillib/archive/${version}.tar.gz"; + sha256 = "12dvaxkmgf7yzzvbadcyk1n17llgh6p8qr33867d21npaljy7l9v"; + }; + + propagatedBuildInputs = [ camlp4 herelib ]; + + doCheck = true; + checkPhase = "make test"; + + meta = with stdenv.lib; { + homepage = "https://ocaml.janestreet.com/"; + description = "Library for dealing with failure in OCaml"; + license = licenses.asl20; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faraday/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faraday/default.nix new file mode 100644 index 000000000000..0c3eb5459cb2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/faraday/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigstringaf }: + +buildDunePackage rec { + pname = "faraday"; + version = "0.7.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = pname; + rev = version; + sha256 = "0z6ikwlqad91iac0q5z88p3wzq5k15y86ckzmhdq1aqwrcm14bq2"; + }; + + checkInputs = lib.optional doCheck alcotest; + propagatedBuildInputs = [ bigstringaf ]; + doCheck = lib.versions.majorMinor ocaml.version != "4.07"; + + meta = { + description = "Serialization library built for speed and memory efficiency"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/farfadet/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/farfadet/default.nix new file mode 100644 index 000000000000..96423a213a19 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/farfadet/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg +, faraday +}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.3" +then throw "farfadet is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-farfadet-${version}"; + version = "0.3"; + + src = fetchurl { + url = "https://github.com/oklm-wsh/Farfadet/releases/download/v${version}/farfadet-${version}.tbz"; + sha256 = "0nlafnp0pwx0n4aszpsk6nvcvqi9im306p4jhx70si7k3xprlr2j"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ faraday ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "A printf-like for Faraday library"; + homepage = "https://github.com/oklm-wsh/Farfadet"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fdkaac/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fdkaac/default.nix new file mode 100644 index 000000000000..d3915b65935e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fdkaac/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildDunePackage, dune-configurator +, fdk_aac +}: + +buildDunePackage rec { + pname = "fdkaac"; + version = "0.3.2"; + src = fetchFromGitHub { + owner = "savonet"; + repo = "ocaml-fdkaac"; + rev = version; + sha256 = "10i6hsjkrpw7zgx99zvvka3sapd7zy53k7z4b6khj9rdrbrgznv8"; + }; + + useDune2 = true; + + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ fdk_aac ]; + + meta = { + description = "OCaml binding for the fdk-aac library"; + inherit (src.meta) homepage; + license = lib.licenses.gpl2Only; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix new file mode 100644 index 000000000000..ac7e6640eeab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, fetchurl, alcotest, asn1-combinators, benchmark +, bigarray-compat, cstruct, eqaf, hex, ppx_deriving_yojson, rresult +, stdlib-shims, yojson, dune-configurator }: + +buildDunePackage rec { + pname = "fiat-p256"; + version = "0.2.1"; + + src = fetchurl { + url = "https://github.com/mirage/fiat/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0086h9qkvnqfm8acrxqbki54z619nj73x7f0d01v5vg2naznx7w9"; + }; + + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ bigarray-compat cstruct eqaf hex ]; + checkInputs = [ alcotest asn1-combinators benchmark + ppx_deriving_yojson rresult stdlib-shims yojson ]; + doCheck = true; + + meta = with lib; { + description = "Primitives for Elliptic Curve Cryptography taken from Fiat"; + homepage = "https://github.com/mirage/fiat"; + license = licenses.mit; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fieldslib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fieldslib/default.nix new file mode 100644 index 000000000000..90b75faa54c2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fieldslib/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }: + +assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml); + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-fieldslib-109.20.03"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/fieldslib-109.20.03.tar.gz"; + sha256 = "1dkzk0wf26rhvji80dz1r56dp6x9zqrnp87wldd4pj56jli94vir"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ type_conv camlp4 ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://ocaml.janestreet.com/"; + description = "OCaml syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"; + license = licenses.asl20; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix new file mode 100644 index 000000000000..031680b1e337 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-fileutils-0.5.3"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1728/ocaml-fileutils-0.5.3.tar.gz"; + sha256 = "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ounit ]; + + configureFlags = [ "--enable-tests" ]; + doCheck = true; + checkTarget = "test"; + + createFindlibDestdir = true; + + preInstall = "make doc"; + + meta = { + homepage = "https://forge.ocamlcore.org/projects/ocaml-fileutils/"; + platforms = ocaml.meta.platforms or []; + description = "Library to provide pure OCaml functions to manipulate real file (POSIX like) and filename"; + license = stdenv.lib.licenses.lgpl21Plus; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix new file mode 100644 index 000000000000..d1a2b93cee16 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; + +stdenv.mkDerivation { + + name = "ocaml-fix-20130611"; + + src = fetchurl { + url = "http://gallium.inria.fr/~fpottier/fix/fix-20130611.tar.gz"; + sha256 = "1phlqcs1nb93x9cf0w0hnq2ck4dmn71zm4mxf60w96vb9yb9qzp0"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "http://gallium.inria.fr/~fpottier/fix/"; + description = "A simple OCaml module for computing the least solution of a system of monotone equations"; + license = licenses.cecill-c; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fmt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fmt/default.nix new file mode 100644 index 000000000000..6b457a9d6dc2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fmt/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.05" +then throw "fmt is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + version = "0.8.9"; + pname = "ocaml${ocaml.version}-fmt"; + + src = fetchurl { + url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz"; + sha256 = "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg cmdliner ]; + propagatedBuildInputs = [ seq stdlib-shims ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + homepage = "https://erratique.ch/software/fmt"; + license = licenses.isc; + description = "OCaml Format pretty-printer combinators"; + inherit (ocaml.meta) platforms; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix new file mode 100644 index 000000000000..ce17cc60ebf8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, pkgconfig, fontconfig, ocaml }: + +stdenv.mkDerivation { + name = "ocaml-fontconfig-20131103"; + src = fetchFromGitHub { + owner = "flh"; + repo = "ocaml-fontconfig"; + rev = "42daf1697ffcee9c89ee4be3103b6427f7a7b7e5"; + sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml fontconfig ]; + makeFlags = [ + "OCAML_STDLIB_DIR=$(out)/lib/ocaml/${stdenv.lib.getVersion ocaml}/site-lib/" + "OCAML_HAVE_OCAMLOPT=yes" + ]; + + meta = { + description = "Fontconfig bindings for OCaml"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fpath/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fpath/default.nix new file mode 100644 index 000000000000..4694e3ac6377 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/fpath/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, astring }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "fpath is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-fpath-0.7.3"; + src = fetchurl { + url = "https://erratique.ch/software/fpath/releases/fpath-0.7.3.tbz"; + sha256 = "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ astring ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "An OCaml module for handling file system paths with POSIX and Windows conventions"; + homepage = "https://erratique.ch/software/fpath"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/frontc/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/frontc/default.nix new file mode 100644 index 000000000000..e68f6a28cb47 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/frontc/default.nix @@ -0,0 +1,40 @@ +{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, ocaml, findlib }: + +let + meta_file = fetchurl { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/META"; + sha256 = "0s2wsinycldk8y5p09xd0hsgbhckhy7bkghzl63bph6mwv64kq2d"; + }; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-FrontC-${version}"; + version = "3.4.1"; + + src = fetchFromGitHub { + owner = "BinaryAnalysisPlatform"; + repo = "FrontC"; + rev = "V_3_4_1"; + sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak"; + }; + + buildInputs = [ ocaml findlib ]; + + meta = with lib; { + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + description = "C Parsing Library"; + license = licenses.lgpl21; + maintainers = [ maintainers.maurer ]; + }; + + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/opam.patch"; + sha256 = "0v4f6740jbj1kxg1y03dzfa3x3gsrhv06wpzdj30gl4ki5fvj4hs"; + }) + ]; + + makeFlags = [ "PREFIX=$(out)" "OCAML_SITE=$(OCAMLFIND_DESTDIR)" ]; + + postInstall = "cp ${meta_file} $OCAMLFIND_DESTDIR/FrontC/META"; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/default.nix new file mode 100644 index 000000000000..330ab26e8e64 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, buildDunePackage, alcotest, cmdliner +, rresult, astring, fmt, ocamlgraph, logs, bos, fpath, ptime +}: + +buildDunePackage rec { + pname = "functoria"; + version = "3.1.0"; + + minimumOCamlVersion = "4.04"; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "15jdqdj1vfi0x9gjydrrnbwzwbzw34w1iir032jrji820xlblky2"; + }; + + propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ]; + checkInputs = [ alcotest ]; + + doCheck = true; + + meta = with stdenv.lib; { + description = "A DSL to organize functor applications"; + homepage = "https://github.com/mirage/functoria"; + license = licenses.isc; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/runtime.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/runtime.nix new file mode 100644 index 000000000000..806ae82b6ef4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functoria/runtime.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage, functoria, cmdliner, fmt, alcotest }: + +buildDunePackage { + pname = "functoria-runtime"; + + inherit (functoria) version src; + + propagatedBuildInputs = [ cmdliner fmt ]; + checkInputs = [ alcotest functoria]; + doCheck = true; + + meta = with lib; { + inherit (functoria.meta) homepage license; + description = "Runtime support library for functoria-generated code"; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix new file mode 100644 index 000000000000..934a88254e27 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, ocaml, findlib }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11"; + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" then { + version = "0.6"; + sha256 = "18wpyxblz9jh5bfp0hpffnd0q8cq1b0dqp0f36vhqydfknlnpx8y"; + } else { + version = "0.5"; + sha256 = "1j17rhifdjv1z262dma148ywg34x0zjn8vczdrnkwajsm4qg1hw3"; + }; +in + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-functory-${param.version}"; + + src = fetchurl { + url = "https://www.lri.fr/~filliatr/functory/download/functory-${param.version}.tar.gz"; + inherit (param) sha256; + }; + + buildInputs = [ ocaml findlib ]; + + installTargets = [ "ocamlfind-install" ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://www.lri.fr/~filliatr/functory/"; + description = "A distributed computing library for Objective Caml which facilitates distributed execution of parallelizable computations in a seamless fashion"; + license = licenses.lgpl21; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix new file mode 100644 index 000000000000..b01d4b4a04c2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, buildDunePackage +, ocurl, cryptokit, ocaml_extlib, yojson, ocamlnet, xmlm +}: + +buildDunePackage rec { + pname = "gapi-ocaml"; + version = "0.3.19"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "astrada"; + repo = pname; + rev = "v${version}"; + sha256 = "04arif1p1vj5yr24cwicj70b7yx17hrgf4pl47vqg8ngcrdh71v9"; + }; + + propagatedBuildInputs = [ ocurl cryptokit ocaml_extlib ocamlnet yojson ]; + buildInputs = [ xmlm ]; + + meta = { + description = "OCaml client for google services"; + homepage = "http://gapi-ocaml.forge.ocamlcore.org"; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ bennofs ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gen/default.nix new file mode 100644 index 000000000000..9e37d9b9a2d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gen/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, ounit }: + +let version = "0.5"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-gen-${version}"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "gen"; + rev = version; + sha256 = "14b8vg914nb0yp1hgxzm29bg692m0gqncjj43b599s98s1cwl92h"; + }; + + buildInputs = [ ocaml findlib ocamlbuild qtest ounit ]; + + configureFlags = [ + "--enable-tests" + ]; + + doCheck = true; + checkTarget = "test"; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/c-cube/gen"; + description = "Simple, efficient iterators for OCaml"; + license = stdenv.lib.licenses.bsd3; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/genspio/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/genspio/default.nix new file mode 100644 index 000000000000..7e7b3a0b9aee --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/genspio/default.nix @@ -0,0 +1,32 @@ +{ lib, fetchFromGitHub, buildDunePackage +, nonstd, sosa +}: + +buildDunePackage rec { + pname = "genspio"; + version = "0.0.2"; + + src = fetchFromGitHub { + owner = "hammerlab"; + repo = pname; + rev = "${pname}.${version}"; + sha256 = "0cp6p1f713sfv4p2r03bzvjvakzn4ili7hf3a952b3w1k39hv37x"; + }; + + minimumOCamlVersion = "4.03"; + + propagatedBuildInputs = [ nonstd sosa ]; + + configurePhase = '' + ocaml please.mlt configure + ''; + + doCheck = true; + + meta = with lib; { + homepage = https://smondet.gitlab.io/genspio-doc/; + description = "Typed EDSL to generate POSIX Shell scripts"; + license = licenses.asl20; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gg/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gg/default.nix new file mode 100644 index 000000000000..d4c28be2f798 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gg/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }: + +let + inherit (stdenv.lib) getVersion versionAtLeast; + + pname = "gg"; + version = "0.9.1"; + webpage = "https://erratique.ch/software/${pname}"; +in + +assert versionAtLeast (getVersion ocaml) "4.01.0"; + +stdenv.mkDerivation { + + name = "ocaml-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "0czj41sr8jsivl3z8wyblf9k971j3kx2wc3s0c1nhzcc8allg9i2"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opaline ]; + + createFindlibDestdir = true; + + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + + installPhase = "opaline -libdir $OCAMLFIND_DESTDIR"; + + meta = with stdenv.lib; { + description = "Basic types for computer graphics in OCaml"; + longDescription = '' + Gg is an OCaml module providing basic types for computer graphics. It + defines types and functions for floats, vectors, points, sizes, + matrices, quaternions, axis aligned boxes, colors, color spaces, and + raster data. + ''; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-http/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-http/default.nix new file mode 100644 index 000000000000..3b127c650063 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-http/default.nix @@ -0,0 +1,15 @@ +{ buildDunePackage, git, cohttp, cohttp-lwt }: + +buildDunePackage { + pname = "git-http"; + inherit (git) version src minimumOCamlVersion; + + useDune2 = true; + + propagatedBuildInputs = [ git cohttp cohttp-lwt ]; + + meta = { + description = "Client implementation of the “Smart” HTTP Git protocol in pure OCaml"; + inherit (git.meta) homepage license maintainers; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-unix/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-unix/default.nix new file mode 100644 index 000000000000..0633b8af8f05 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git-unix/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildDunePackage, git-http, cohttp, cohttp-lwt-unix +, mmap, cmdliner, mtime, alcotest, mirage-crypto-rng, tls +, io-page, git-binary +}: + +buildDunePackage { + pname = "git-unix"; + inherit (git-http) version src minimumOCamlVersion; + + useDune2 = true; + + propagatedBuildInputs = [ mmap cmdliner git-http cohttp cohttp-lwt-unix mtime ]; + checkInputs = [ alcotest mirage-crypto-rng tls io-page git-binary ]; + doCheck = !stdenv.isAarch64; + + meta = { + description = "Unix backend for the Git protocol(s)"; + inherit (git-http.meta) homepage license maintainers; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git/default.nix new file mode 100644 index 000000000000..d28e8ef2e7b4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/git/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, buildDunePackage +, alcotest, mtime, mirage-crypto-rng, tls, git-binary +, angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt, checkseum +, fpath, hex, ke, logs, lru, ocaml_lwt, ocamlgraph, ocplib-endian, uri, rresult +, stdlib-shims +}: + +buildDunePackage rec { + pname = "git"; + version = "2.1.3"; + + minimumOCamlVersion = "4.07"; + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-git/releases/download/${version}/git-${version}.tbz"; + sha256 = "1ppllv65vrkfrmx46aiq5879isffcjmg92z9rv2kh92a83h4lqax"; + }; + + propagatedBuildInputs = [ + angstrom astring checkseum cstruct decompress digestif encore duff fmt fpath + hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult stdlib-shims + ]; + checkInputs = [ alcotest mtime mirage-crypto-rng tls git-binary ]; + doCheck = !stdenv.isAarch64; + + meta = with stdenv; { + description = "Git format and protocol in pure OCaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/ocaml-git"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmap/default.nix new file mode 100644 index 000000000000..2585dfcaa968 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmap/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fetchurl, alcotest }: + +buildDunePackage rec { + pname = "gmap"; + version = "0.3.0"; + + src = fetchurl { + url = "https://github.com/hannesm/gmap/releases/download/${version}/gmap-${version}.tbz"; + sha256 = "073wa0lrb0jj706j87cwzf1a8d1ff14100mnrjs8z3xc4ri9xp84"; + }; + + minimumOCamlVersion = "4.03"; + + buildInputs = [ alcotest ]; + + doCheck = true; + + meta = { + description = "Heterogenous maps over a GADT"; + homepage = "https://github.com/hannesm/gmap"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix new file mode 100644 index 000000000000..f01f3e8cad53 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix @@ -0,0 +1,35 @@ +{stdenv, fetchurl, ocaml, findlib, gdome2, libxslt, pkgconfig}: + +let + pname = "gmetadom"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.2.6"; + + src = fetchurl { + url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${pname}-${version}.tar.gz"; + sha256 = "0skmlv0pnqvg99wzzzi1h4zhwzd82xg7xpkj1kwpfy7bzinjh7ig"; + }; + + patches = [ ./gcc-4.3.patch ]; + + dontDisableStatic = true; + + preConfigure='' + configureFlags="--with-ocaml-lib-prefix=$out/lib/ocaml/${ocaml.version}/site-lib" + ''; + + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ocaml findlib gdome2 libxslt]; + propagatedBuildInputs = [gdome2]; + + meta = { + homepage = "http://gmetadom.sourceforge.net/"; + description = "A collection of librares, each library providing a DOM implementation"; + license = stdenv.lib.licenses.lgpl21Plus; + maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/gcc-4.3.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/gcc-4.3.patch new file mode 100644 index 000000000000..d8d1d4631632 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gmetadom/gcc-4.3.patch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## gcc-4.3.dpatch by Stefano Zacchiroli <zack@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: ensure sources build with gcc-4.3 + +@DPATCH@ +diff -urNad trunk~/src/shared/Traits.hh.in trunk/src/shared/Traits.hh.in +--- trunk~/src/shared/Traits.hh.in 2003-01-14 12:41:55.000000000 +0100 ++++ trunk/src/shared/Traits.hh.in 2008-05-01 15:45:39.000000000 +0200 +@@ -26,6 +26,7 @@ + */ + + #include <string> ++#include <cstring> + + #include "@DOM_NAMESPACE@Char.hh" + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gnuplot/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gnuplot/default.nix new file mode 100644 index 000000000000..d939b884e875 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gnuplot/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fetchFromGitHub, gnuplot, iso8601 }: + +buildDunePackage rec { + pname = "gnuplot"; + version = "0.7"; + + minimumOCamlVersion = "4.03"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "ocaml-${pname}"; + rev = "v${version}"; + sha256 = "02pzi3lb57ysrdsba743s3vmnapjbxgq8ynlzpxbbs6cn1jj6ch9"; + }; + + propagatedBuildInputs = [ gnuplot iso8601 ]; + + meta = with lib; { + inherit (src.meta) homepage; + description = "Ocaml bindings to Gnuplot"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphics/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphics/default.nix new file mode 100644 index 000000000000..6a3217431b43 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphics/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildDunePackage, dune-configurator, libX11 }: + +buildDunePackage rec { + + pname = "graphics"; + version = "5.1.0"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/ocaml/graphics/releases/download/${version}/graphics-${version}.tbz"; + sha256 = "16z997mp0ccilaqqvmz3wp7vx0ghaf4ik9qklgd4piklcl1yv5n5"; + }; + + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ libX11 ]; + + meta = { + homepage = "https://github.com/ocaml/graphics"; + description = "A set of portable drawing primitives"; + license = lib.licenses.lgpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/cohttp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/cohttp.nix new file mode 100644 index 000000000000..09f4757041af --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/cohttp.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, ocaml-crunch +, astring, cohttp, digestif, graphql, ocplib-endian +, alcotest, cohttp-lwt-unix, graphql-lwt +}: + +buildDunePackage rec { + pname = "graphql-cohttp"; + + inherit (graphql) version src; + + useDune2 = true; + + nativeBuildInputs = [ ocaml-crunch ]; + propagatedBuildInputs = [ astring cohttp digestif graphql ocplib-endian ]; + + checkInputs = lib.optionals doCheck [ alcotest cohttp-lwt-unix graphql-lwt ]; + + doCheck = true; + + meta = graphql.meta // { + description = "Run GraphQL servers with “cohttp”"; + }; + +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/default.nix new file mode 100644 index 000000000000..22b7bf35f8e1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, alcotest, graphql_parser, rresult, yojson }: + +buildDunePackage rec { + pname = "graphql"; + + inherit (graphql_parser) version src; + + propagatedBuildInputs = [ graphql_parser rresult yojson ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = graphql_parser.meta // { + description = "Build GraphQL schemas and execute queries against them"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/lwt.nix new file mode 100644 index 000000000000..37d75f9e22ea --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/lwt.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, alcotest, graphql, ocaml_lwt }: + +buildDunePackage rec { + pname = "graphql-lwt"; + + inherit (graphql) version src; + + propagatedBuildInputs = [ graphql ocaml_lwt ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = graphql.meta // { + description = "Build GraphQL schemas with Lwt support"; + }; + +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/parser.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/parser.nix new file mode 100644 index 000000000000..4172ccd8d043 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql/parser.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchurl, alcotest, fmt, menhir, re }: + +buildDunePackage rec { + pname = "graphql_parser"; + version = "0.13.0"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/andreas/ocaml-graphql-server/releases/download/${version}/graphql-${version}.tbz"; + sha256 = "0gb5y99ph0nz5y3pc1gxq1py4wji2hyf2ydbp0hv23v00n50hpsm"; + }; + + nativeBuildInputs = [ menhir ]; + propagatedBuildInputs = [ fmt re ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + homepage = "https://github.com/andreas/ocaml-graphql-server"; + description = "Library for parsing GraphQL queries"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql_ppx/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql_ppx/default.nix new file mode 100644 index 000000000000..f75465e99a27 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/graphql_ppx/default.nix @@ -0,0 +1,32 @@ +{ lib, buildDunePackage, fetchFromGitHub, alcotest, cppo +, ocaml-migrate-parsetree, ppx_tools_versioned, reason, yojson }: + +buildDunePackage rec { + pname = "graphql_ppx"; + version = "1.0.1"; + + minimumOCamlVersion = "4.06"; + + src = fetchFromGitHub { + owner = "reasonml-community"; + repo = "graphql-ppx"; + rev = "v${version}"; + sha256 = "0lvmv1sb0ca9mja6di1dbmsgjqgj3w9var4amv1iz9nhwjjx4cpi"; + }; + + propagatedBuildInputs = + [ cppo ocaml-migrate-parsetree ppx_tools_versioned reason yojson ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = false; + + useDune2 = true; + + meta = { + homepage = "https://github.com/reasonml-community/graphql_ppx"; + description = "GraphQL PPX rewriter for Bucklescript/ReasonML"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ Zimmi48 jtcoolen ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gsl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gsl/default.nix new file mode 100644 index 000000000000..c292c3d6ab5f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gsl/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, buildDunePackage, pkg-config, gsl +, dune-configurator +}: + +buildDunePackage rec { + pname = "gsl"; + version = "1.24.3"; + + minimumOCamlVersion = "4.08"; + + src = fetchurl { + url = "https://github.com/mmottl/gsl-ocaml/releases/download/${version}/gsl-${version}.tbz"; + sha256 = "1mpzcgbrha2l8iikqbmn32668v2mnnsykxg5n5jgs0qnskn2nvrn"; + }; + + buildInputs = [ dune-configurator gsl pkg-config ]; + + meta = { + homepage = "https://mmottl.github.io/gsl-ocaml/"; + description = "OCaml bindings to the GNU Scientific Library"; + license = lib.licenses.gpl3Plus; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gtktop/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gtktop/default.nix new file mode 100644 index 000000000000..b0e17a28e51e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/gtktop/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, camlp4, findlib, lablgtk-extras }: + +let pname = "gtktop-2.0"; in + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-${pname}"; + + src = fetchurl { + url = "http://zoggy.github.io/gtktop/${pname}.tar.gz"; + sha256 = "0cpmnavvham9mwxknm6df90g9qxabcvn2kfwlf9mncqa0z3rknz6"; + }; + + buildInputs = [ ocaml camlp4 findlib ]; + propagatedBuildInputs = [ lablgtk-extras ]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://zoggy.github.io/gtktop/"; + description = "A small OCaml library to ease the creation of graphical toplevels"; + license = stdenv.lib.licenses.lgpl3; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hacl_x25519/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hacl_x25519/default.nix new file mode 100644 index 000000000000..46a04a51fcab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hacl_x25519/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fetchurl, benchmark, cstruct +, alcotest , eqaf, hex, ppx_blob, ppx_deriving_yojson, stdlib-shims, yojson }: + +buildDunePackage rec { + pname = "hacl_x25519"; + version = "0.2.0"; + + src = fetchurl { + url = "https://github.com/mirage/hacl/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0ppq56i2yhxzz38w120aynnkx10kncl86zvqip9zx0v4974k3k4x"; + }; + + useDune2 = true; + propagatedBuildInputs = [ eqaf cstruct ]; + checkInputs = [ alcotest benchmark hex ppx_blob ppx_deriving_yojson stdlib-shims yojson ]; + doCheck = true; + + meta = with lib; { + description = "Primitives for Elliptic Curve Cryptography taken from Project Everest"; + homepage = "https://github.com/mirage/hacl"; + license = licenses.mit; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/herelib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/herelib/default.nix new file mode 100644 index 000000000000..a99b6cb711e4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/herelib/default.nix @@ -0,0 +1,20 @@ +{stdenv, buildOcaml, fetchurl}: + +buildOcaml rec { + version = "112.35.00"; + name = "herelib"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/herelib/archive/${version}.tar.gz"; + sha256 = "03rrlpjmnd8d1rzzmd112355m7a5bwn3vf90xkbc6gkxlad9cxbs"; + }; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/herelib"; + description = "Syntax extension for inserting the current location"; + license = stdenv.lib.licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hex/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hex/default.nix new file mode 100644 index 000000000000..8e9dd2db2500 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hex/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, buildDunePackage, cstruct }: + +buildDunePackage rec { + pname = "hex"; + version = "1.3.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/hex-v${version}.tbz"; + sha256 = "193567pn58df3b824vmfanncdfgf9cxzl7q3rq39zl9szvzhvkja"; + }; + + propagatedBuildInputs = [ cstruct ]; + doCheck = true; + + meta = { + description = "Mininal OCaml library providing hexadecimal converters"; + homepage = "https://github.com/mirage/ocaml-hex"; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hidapi/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hidapi/default.nix new file mode 100644 index 000000000000..cd95b34fa2bd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hidapi/default.nix @@ -0,0 +1,27 @@ +{ pkgs, lib, fetchurl, buildDunePackage, pkg-config +, bigstring, +}: + +buildDunePackage rec { + pname = "hidapi"; + version = "1.1.1"; + + src = fetchurl { + url = "https://github.com/vbmithr/ocaml-hidapi/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "1j7rd7ajrzla76r3sxljx6fb18f4f4s3jd7vhv59l2ilxyxycai2"; + }; + + minimumOCamlVersion = "4.03"; + + buildInputs = [ pkgs.hidapi pkg-config ]; + propagatedBuildInputs = [ bigstring ]; + + doCheck = true; + + meta = with lib; { + homepage = https://github.com/vbmithr/ocaml-hidapi; + description = "Bindings to Signal11's hidapi library"; + license = licenses.isc; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/default.nix new file mode 100644 index 000000000000..ecda6338beed --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }: + +stdenv.mkDerivation rec { + pname = "higlo"; + version = "0.6"; + src = fetchFromGitHub { + owner = "zoggy"; + repo = "higlo"; + rev = "release-${version}"; + sha256 = "0m0qyk2ydivai54502s45sdw9w4xr0j3jpwyc4vqk62a7iz9ihxh"; + }; + + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ xtmpl ulex ]; + + createFindlibDestdir = true; + + patches = ./install.patch; + + meta = with stdenv.lib; { + description = "OCaml library for syntax highlighting"; + homepage = "https://zoggy.github.io/higlo/"; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ regnat ]; + }; +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/install.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/install.patch new file mode 100644 index 000000000000..bbdaace293bf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/higlo/install.patch @@ -0,0 +1,14 @@ +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/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hkdf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hkdf/default.nix new file mode 100644 index 000000000000..9832a5f4c41b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hkdf/default.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, fetchurl, cstruct, mirage-crypto, alcotest }: + +buildDunePackage rec { + pname = "hkdf"; + version = "1.0.4"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/hannesm/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0nzx6vzbc1hh6vx1ly8df4b16lgps6zjpp9mjycsnnn49bddc9mr"; + }; + + useDune2 = true; + + propagatedBuildInputs = [ cstruct mirage-crypto ]; + checkInputs = [ alcotest ]; + doCheck = true; + + meta = with lib; { + description = "HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)"; + homepage = "https://github.com/hannesm/ocaml-hkdf"; + license = licenses.mit; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hmap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hmap/default.nix new file mode 100644 index 000000000000..563d39909c8c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/hmap/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, fetchurl +, findlib +, ocaml +, ocamlbuild +, topkg +}: + +let + minimumSupportedOcamlVersion = "4.02.0"; +in +assert lib.versionOlder minimumSupportedOcamlVersion ocaml.version; + +stdenv.mkDerivation rec { + pname = "hmap"; + version = "0.8.1"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchurl { + url = "http://erratique.ch/software/hmap/releases/${pname}-${version}.tbz"; + sha256 = "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a"; + }; + + buildInputs = [ ocaml ocamlbuild findlib topkg ]; + + inherit (topkg) installPhase; + + buildPhase = "${topkg.run} build --tests true"; + + doCheck = true; + + checkPhase = "${topkg.run} test"; + + meta = { + description = "Heterogeneous value maps for OCaml"; + homepage = "https://erratique.ch/software/hmap"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.pmahoney ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/http/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/http/default.nix new file mode 100644 index 000000000000..3936eb13c2fb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/http/default.nix @@ -0,0 +1,39 @@ +{stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ocaml-http is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-http-0.1.5"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz"; + sha256 = "09q12b0j01iymflssxigsqggbsp8dqh9pfvkm76dv860544mygws"; + }; + + buildInputs = [ocaml findlib camlp4]; + propagatedBuildInputs = [ocaml_pcre ocamlnet]; + + createFindlibDestdir = true; + + prePatch = '' + BASH=$(type -tp bash) + echo $BASH + substituteInPlace Makefile --replace "SHELL=/bin/bash" "SHELL=$BASH" + ''; + + dontConfigure = true; # Skip configure phase + + buildPhase = '' + make all opt + ''; + + meta = with stdenv.lib; { + homepage = "http://ocaml-http.forge.ocamlcore.org/"; + platforms = ocaml.meta.platforms or []; + description = "Do it yourself (OCaml) HTTP daemon"; + license = licenses.lgpl2; + maintainers = with maintainers; [ roconnor vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/httpaf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/httpaf/default.nix new file mode 100644 index 000000000000..42e7c1eac1b6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/httpaf/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, angstrom, faraday, alcotest }: + +buildDunePackage rec { + pname = "httpaf"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = pname; + rev = version; + sha256 = "0i2r004ihj00hd97475y8nhjqjln58xx087zcjl0dfp0n7q80517"; + }; + + checkInputs = lib.optional doCheck alcotest; + propagatedBuildInputs = [ angstrom faraday ]; + doCheck = lib.versions.majorMinor ocaml.version != "4.07"; + + meta = { + description = "A high-performance, memory-efficient, and scalable web server for OCaml"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/default.nix new file mode 100644 index 000000000000..12b8a757e16f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, decompress }: + +buildDunePackage rec { + minimumOCamlVersion = "4.07"; + version = "20191011"; + pname = "imagelib"; + src = fetchFromGitHub { + owner = "rlepigre"; + repo = "ocaml-imagelib"; + rev = "03fed7733825cef7e0465163f398f6af810e2e75"; + sha256 = "0h7vgyss42nhlfqpbdnb54nxq86rskqi2ilx8b87r0hi19hqx463"; + }; + + patches = [ (fetchpatch { + url = "https://github.com/rlepigre/ocaml-imagelib/pull/24/commits/4704fd44adcda62e0d96ea5b1927071326aa6111.patch"; + sha256 = "0ipjab1hfa2v2pnd8g1k3q2ia0plgiw7crm3fa4w2aqpzdyabkb9"; + }) ]; + + propagatedBuildInputs = [ decompress ]; + + meta = { + description = "Image formats such as PNG and PPM in OCaml"; + license = lib.licenses.lgpl3; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/unix.nix new file mode 100644 index 000000000000..48986b15a8f8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/imagelib/unix.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, imagelib }: + +buildDunePackage { + pname = "imagelib-unix"; + inherit (imagelib) version src meta; + + propagatedBuildInputs = [ imagelib ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/index/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/index/default.nix new file mode 100644 index 000000000000..f4b1844d684c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/index/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, buildDunePackage, fmt, logs, mtime, stdlib-shims }: + +buildDunePackage rec { + pname = "index"; + version = "1.2.1"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz"; + sha256 = "1a9b6rsazrjy07syxl9ix5002i95mlvx5vk7nl2x9cs6s0zw906d"; + }; + + buildInputs = [ stdlib-shims ]; + propagatedBuildInputs = [ fmt logs mtime ]; + + meta = { + homepage = "https://github.com/mirage/index"; + description = "A platform-agnostic multi-level index"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inifiles/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inifiles/default.nix new file mode 100644 index 000000000000..eeeaab8092fc --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inifiles/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocaml_pcre }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-inifiles-1.2"; + + src = fetchurl { + url = "http://archive.ubuntu.com/ubuntu/pool/universe/o/ocaml-inifiles/ocaml-inifiles_1.2.orig.tar.gz"; + sha256 = "0jhzgiypmh6hwsv1zpiq77fi0cvcmwbiy5x0yg7mz6p3dh1dmkns"; + }; + + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocaml-inifiles/ocaml-inifiles.1.2/files/ocaml-inifiles.diff"; + sha256 = "037kk3172s187w8vwsykdxlpklxzc7m7np57sapk499d8adzdgwn"; + })]; + + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ ocaml_pcre ]; + + buildFlags = [ "all" "opt" ]; + + createFindlibDestdir = true; + + meta = { + description = "A small OCaml library to read and write .ini files"; + license = stdenv.lib.licenses.lgpl21Plus; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inotify/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inotify/default.nix new file mode 100644 index 000000000000..44b34beb79d6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/inotify/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ocamlbuild +, ocaml_lwt # optional lwt support +, ounit, fileutils # only for tests +}: + +stdenv.mkDerivation rec { + version = "2.3"; + name = "ocaml${ocaml.version}-inotify-${version}"; + + src = fetchFromGitHub { + owner = "whitequark"; + repo = "ocaml-inotify"; + rev = "v${version}"; + sha256 = "1s6vmqpx19hxzsi30jvp3h7p56rqnxfhfddpcls4nz8sqca1cz5y"; + }; + + patches = [ (fetchpatch { + url = "https://github.com/whitequark/ocaml-inotify/commit/716c8002cc1652f58eb0c400ae92e04003cba8c9.patch"; + sha256 = "04lfxrrsmk2mc704kaln8jqx93jc4bkxhijmfy2d4cmk1cim7r6k"; + }) ]; + + buildInputs = [ ocaml findlib ocamlbuild ocaml_lwt ]; + checkInputs = [ ounit fileutils ]; + + configureFlags = [ "--enable-lwt" + (stdenv.lib.optionalString doCheck "--enable-tests") ]; + + postConfigure = stdenv.lib.optionalString doCheck '' + echo '<lib_test/test_inotify_lwt.*>: pkg_threads' | tee -a _tags + ''; + + doCheck = true; + checkTarget = "test"; + + createFindlibDestdir = true; + + meta = { + description = "Bindings for Linux’s filesystem monitoring interface, inotify"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/integers/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/integers/default.nix new file mode 100644 index 000000000000..a949b339c729 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/integers/default.nix @@ -0,0 +1,18 @@ +{ lib, fetchzip, buildDunePackage }: + +buildDunePackage rec { + pname = "integers"; + version = "0.3.0"; + + src = fetchzip { + url = "https://github.com/ocamllabs/ocaml-integers/archive/${version}.tar.gz"; + sha256 = "1yhif5zh4srh63mhimfx3p5ljpb3lixjdd3i9pjnbj2qgpzlqj8p"; + }; + + meta = { + description = "Various signed and unsigned integer types for OCaml"; + license = lib.licenses.mit; + homepage = "https://github.com/ocamllabs/ocaml-integers"; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/default.nix new file mode 100644 index 000000000000..31ae0cfc19ed --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, buildDunePackage, cstruct, bigarray-compat, ounit }: + +buildDunePackage rec { + pname = "io-page"; + version = "2.3.0"; + + minimumOCamlVersion = "4.02.3"; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "1hx27pwf419hrhwaw9cphbnl8akz8yy73hqj49l15g2k7shah1cn"; + }; + + propagatedBuildInputs = [ cstruct bigarray-compat ]; + checkInputs = [ ounit ]; + doCheck = true; + + meta = { + homepage = "https://github.com/mirage/io-page"; + license = stdenv.lib.licenses.isc; + description = "IO memory page library for Mirage backends"; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/unix.nix new file mode 100644 index 000000000000..b3f7f878b276 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/io-page/unix.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage, io-page, cstruct, ounit }: + +buildDunePackage { + pname = "io-page-unix"; + + inherit (io-page) version src minimumOCamlVersion; + + propagatedBuildInputs = [ cstruct io-page ]; + checkInputs = [ ounit ]; + doCheck = true; + + meta = with lib; { + inherit (io-page.meta) homepage license; + description = "Support for efficient handling of I/O memory pages on Unix"; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix new file mode 100644 index 000000000000..b6240d39ebd3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage +, ipaddr, cstruct +}: + +buildDunePackage rec { + pname = "ipaddr-cstruct"; + + inherit (ipaddr) version src minimumOCamlVersion; + + propagatedBuildInputs = [ ipaddr cstruct ]; + + doCheck = true; + + meta = ipaddr.meta // { + description = "A library for manipulation of IP address representations using Cstructs"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix new file mode 100644 index 000000000000..a4a6f9fc7a14 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage +, macaddr, domain-name, stdlib-shims +, ounit, ppx_sexp_conv +}: + +buildDunePackage rec { + pname = "ipaddr"; + + inherit (macaddr) version src minimumOCamlVersion; + + propagatedBuildInputs = [ macaddr domain-name stdlib-shims ]; + + checkInputs = [ ppx_sexp_conv ounit ]; + doCheck = true; + + meta = macaddr.meta // { + description = "A library for manipulation of IP (and MAC) address representations "; + maintainers = with lib.maintainers; [ alexfmpe ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix new file mode 100644 index 000000000000..8d6186d6338f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage +, ipaddr, ipaddr-cstruct, ounit, ppx_sexp_conv +}: + +buildDunePackage rec { + pname = "ipaddr-sexp"; + + inherit (ipaddr) version src minimumOCamlVersion; + + propagatedBuildInputs = [ ipaddr ]; + + checkInputs = [ ipaddr-cstruct ounit ppx_sexp_conv ]; + doCheck = true; + + meta = ipaddr.meta // { + description = "A library for manipulation of IP address representations usnig sexp"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iri/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iri/default.nix new file mode 100644 index 000000000000..15f3a5613b55 --- /dev/null +++ b/infra/libkookie/nixpkgs/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/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin-watcher/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin-watcher/default.nix new file mode 100644 index 000000000000..55dc9ca866be --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin-watcher/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildDunePackage +, astring, fmt, logs, ocaml_lwt +}: + +buildDunePackage rec { + pname = "irmin-watcher"; + version = "0.4.1"; + + src = fetchurl { + url = "https://github.com/mirage/irmin-watcher/releases/download/${version}/irmin-watcher-${version}.tbz"; + sha256 = "00d4ph4jbsw6adp3zqdrwi099hfcf7p1xzi0685qr7bgcmandjfv"; + }; + + propagatedBuildInputs = [ astring fmt logs ocaml_lwt ]; + + meta = { + homepage = "https://github.com/mirage/irmin-watcher"; + description = "Portable Irmin watch backends using FSevents or Inotify"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/default.nix new file mode 100644 index 000000000000..2e3e27df7ffb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchurl, buildDunePackage +, astring, base64, digestif, fmt, jsonm, logs, ocaml_lwt, ocamlgraph, uri +, alcotest, hex, ppx_irmin +}: + +buildDunePackage { + pname = "irmin"; + + inherit (ppx_irmin) src version; + + useDune2 = true; + minimumOCamlVersion = "4.07"; + + propagatedBuildInputs = [ astring base64 digestif fmt jsonm logs ocaml_lwt ocamlgraph uri ]; + + checkInputs = [ alcotest hex ppx_irmin ]; + doCheck = true; + + meta = ppx_irmin.meta // { + description = "A distributed database built on the same principles as Git"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/fs.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/fs.nix new file mode 100644 index 000000000000..0e9596751b82 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/fs.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, irmin, irmin-test }: + +buildDunePackage rec { + + pname = "irmin-fs"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ irmin ]; + + useDune2 = true; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Generic file-system backend for Irmin"; + }; + +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix new file mode 100644 index 000000000000..b222bc53e3a2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, git, irmin, irmin-mem, irmin-test, git-unix }: + +buildDunePackage rec { + + pname = "irmin-git"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ git irmin ]; + + checkInputs = lib.optionals doCheck [ git-unix irmin-mem irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "Git backend for Irmin"; + }; + +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix new file mode 100644 index 000000000000..6e4598dd986a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, cohttp-lwt, graphql-cohttp, graphql-lwt, irmin }: + +buildDunePackage rec { + + pname = "irmin-graphql"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ cohttp-lwt graphql-cohttp graphql-lwt irmin ]; + + # test requires network + doCheck = false; + + meta = irmin.meta // { + description = "GraphQL server for Irmin"; + }; + +} + + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix new file mode 100644 index 000000000000..24e9f52aa086 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage, cohttp-lwt, irmin, webmachine +, checkseum, git-unix, irmin-git, irmin-mem, irmin-test +}: + +buildDunePackage rec { + + pname = "irmin-http"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ cohttp-lwt irmin webmachine ]; + + checkInputs = lib.optionals doCheck [ checkseum git-unix irmin-git irmin-mem irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "HTTP client and server for Irmin"; + }; + +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/mem.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/mem.nix new file mode 100644 index 000000000000..1b8947849a92 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/mem.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, irmin, irmin-test }: + +buildDunePackage rec { + + pname = "irmin-mem"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ irmin ]; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Generic in-memory Irmin stores"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/pack.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/pack.nix new file mode 100644 index 000000000000..b0081eb366e4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/pack.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, alcotest-lwt, index, irmin, irmin-test, ocaml_lwt }: + +buildDunePackage rec { + minimumOCamlVersion = "4.02.3"; + + pname = "irmin-pack"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ index irmin ocaml_lwt ]; + + checkInputs = lib.optionals doCheck [ alcotest-lwt irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "Irmin backend which stores values in a pack file"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix new file mode 100644 index 000000000000..35aa659fbc8a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix @@ -0,0 +1,29 @@ +{ lib, fetchurl, buildDunePackage, ppxlib, ocaml-syntax-shims }: + +buildDunePackage rec { + pname = "ppx_irmin"; + version = "2.2.0"; + + src = fetchurl { + url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz"; + sha256 = "0gzw918b661qkvd140hilww9jsc49rxsxz1k4iihyvikjn202km4"; + }; + + minimumOCamlVersion = "4.06"; + + useDune2 = true; + + buildInputs = [ ocaml-syntax-shims ]; + propagatedBuildInputs = [ ppxlib ]; + + # tests depend on irmin, would create mutual dependency + # opt to test irmin instead of ppx_irmin + doCheck = false; + + meta = { + homepage = "https://irmin.org/"; + description = "PPX deriver for Irmin generics"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/test.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/test.nix new file mode 100644 index 000000000000..b8a3f3ae2457 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/test.nix @@ -0,0 +1,17 @@ +{ buildDunePackage, alcotest, cmdliner, irmin, metrics-unix, mtime }: + +buildDunePackage { + + pname = "irmin-test"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ alcotest cmdliner irmin metrics-unix mtime ]; + + meta = irmin.meta // { + description = "Irmin test suite"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix new file mode 100644 index 000000000000..7a09eaabd3ec --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage +, checkseum, cmdliner, git-unix, yaml +, irmin, irmin-fs, irmin-git, irmin-graphql, irmin-http, irmin-mem, irmin-pack, irmin-watcher +, irmin-test +}: + +buildDunePackage rec { + + pname = "irmin-unix"; + + inherit (irmin) version src; + + useDune2 = true; + + propagatedBuildInputs = [ checkseum cmdliner git-unix yaml + irmin irmin-fs irmin-git irmin-graphql irmin-http irmin-mem irmin-pack irmin-watcher + ]; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Unix backends for Irmin"; + }; + +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iso8601/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iso8601/default.nix new file mode 100644 index 000000000000..2a2953673f93 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iso8601/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +let version = "0.2.4"; in + +stdenv.mkDerivation { + pname = "ocaml-iso8601"; + inherit version; + src = fetchzip { + url = "https://github.com/sagotch/ISO8601.ml/archive/${version}.tar.gz"; + sha256 = "0ypdd1p04xdjxxx3b61wp7abswfrq3vcvwwaxvywxwqljw0dhydi"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + createFindlibDestdir = true; + + meta = { + homepage = "https://ocaml-community.github.io/ISO8601.ml/"; + description = "ISO 8601 and RFC 3999 date parsing for OCaml"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix new file mode 100644 index 000000000000..66f3f26285ed --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml, mdx, qtest, result }: + +buildDunePackage rec { + pname = "iter"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = pname; + rev = version; + sha256 = "0j2sg50byn0ppmf6l36ksip7zx1d3gv7sc4hbbxs2rmx39jr7vxh"; + }; + + buildInputs = lib.optionals doCheck [ mdx.bin qtest ]; + propagatedBuildInputs = [ result ]; + + doCheck = lib.versionAtLeast ocaml.version "4.07"; + + meta = { + homepage = "https://github.com/c-cube/sequence"; + description = "Simple sequence (iterator) datatype and combinators"; + longDescription = '' + Simple sequence datatype, intended to transfer a finite number of + elements from one data structure to another. Some transformations on sequences, + like `filter`, `map`, `take`, `drop` and `append` can be performed before the + sequence is iterated/folded on. + ''; + license = lib.licenses.bsd2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.12.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.12.nix new file mode 100644 index 000000000000..4585a3b8596c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.12.nix @@ -0,0 +1,506 @@ +{ janePackage +, ctypes +, num +, octavius +, ppxlib +, re +, openssl +}: + +rec { + + ocaml-compiler-libs = janePackage { + pname = "ocaml-compiler-libs"; + hash = "0g9y1ljjsj1nw0lz460ivb6qmz9vhcmfl8krlmqfrni6pc7b0r6f"; + meta.description = "OCaml compiler libraries repackaged"; + }; + + sexplib0 = janePackage { + pname = "sexplib0"; + hash = "13xdd0pvypxqn0ldwdgikmlinrp3yfh8ixknv1xrpxbx3np4qp0g"; + meta.description = "Library containing the definition of S-expressions and some base converters"; + }; + + base = janePackage { + pname = "base"; + version = "0.12.2"; + hash = "0gl89zpgsf3n30nb6v5cns27g2bfg4rf3s2427gqvwbkr5gcf7ri"; + meta.description = "Full standard library replacement for OCaml"; + propagatedBuildInputs = [ sexplib0 ]; + }; + + stdio = janePackage { + pname = "stdio"; + hash = "1pn8jjcb79n6crpw7dkp68s4lz2mw103lwmfslil66f05jsxhjhg"; + meta.description = "Standard IO library for OCaml"; + propagatedBuildInputs = [ base ]; + }; + + ppx_sexp_conv = janePackage { + pname = "ppx_sexp_conv"; + hash = "0idzp1kzds0gnilschzs9ydi54if8y5xpn6ajn710vkipq26qcld"; + meta.description = "[@@deriving] plugin to generate S-expression conversion functions"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_here = janePackage { + pname = "ppx_here"; + hash = "07qbchwif1i9ii8z7v1bib57d3mjv0b27i8iixw78i83wnsycmdx"; + meta.description = "Expands [%here] into its location"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_compare = janePackage { + pname = "ppx_compare"; + hash = "0n1ax4k2smhps9hc2v58lc06a0fgimwvbi1aj4x78vwh5j492bys"; + meta.description = "Generation of comparison functions from types"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_assert = janePackage { + pname = "ppx_assert"; + hash = "0as6mzr6ki2a9d4k6132p9dskn0qssla1s7j5rkzp75bfikd0ip8"; + meta.description = "Assert-like extension nodes that raise useful errors on failure"; + propagatedBuildInputs = [ ppx_compare ppx_here ppx_sexp_conv ]; + }; + + ppx_inline_test = janePackage { + pname = "ppx_inline_test"; + hash = "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"; + meta.description = "Syntax extension for writing in-line tests in ocaml code"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_custom_printf = janePackage { + pname = "ppx_custom_printf"; + version = "0.12.1"; + hash = "0q7591agvd3qy9ihhbyk4db48r0ng7yxspfj8afxxiawl7k5bas6"; + meta.description = "Printf-style format-strings for user-defined string conversion"; + propagatedBuildInputs = [ ppx_sexp_conv ]; + }; + + fieldslib = janePackage { + pname = "fieldslib"; + hash = "0dlgr7cimqmjlcymk3bdcyzqzvdy12q5lqa844nqix0k2ymhyphf"; + meta.description = "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"; + propagatedBuildInputs = [ base ]; + }; + + ppx_fields_conv = janePackage { + pname = "ppx_fields_conv"; + hash = "0flrdyxdfcqcmdrbipxdjq0s3djdgs7z5pvjdycsvs6czbixz70v"; + meta.description = "Generation of accessor and iteration functions for ocaml records"; + propagatedBuildInputs = [ fieldslib ppxlib ]; + }; + + variantslib = janePackage { + pname = "variantslib"; + hash = "1cclb5magk63gyqmkci8abhs05g2pyhyr60a2c1bvmig0faqcnsf"; + meta.description = "Part of Jane Street's Core library"; + propagatedBuildInputs = [ base ]; + }; + + ppx_variants_conv = janePackage { + pname = "ppx_variants_conv"; + hash = "05j9bgra8xq6fcp12ch3z9vjrk139p2wrcjjcs4h52n5hhc8vzbz"; + meta.description = "Generation of accessor and iteration functions for ocaml variant types"; + propagatedBuildInputs = [ variantslib ppxlib ]; + }; + + ppx_expect = janePackage { + pname = "ppx_expect"; + hash = "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"; + meta.description = "Cram like framework for OCaml"; + propagatedBuildInputs = [ ppx_assert ppx_custom_printf ppx_fields_conv ppx_inline_test ppx_variants_conv re ]; + }; + + ppx_enumerate = janePackage { + pname = "ppx_enumerate"; + hash = "08zfpq6bdm5lh7xj9k72iz9f2ihv3aznl3nypw3x78vz1chj8dqa"; + meta.description = "Generate a list containing all values of a finite type"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_hash = janePackage { + pname = "ppx_hash"; + hash = "1dfsfvhiyp1mnf24mr93svpdn432kla0y7x631lssacxxp2sadbg"; + meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions"; + propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ]; + }; + + ppx_js_style = janePackage { + pname = "ppx_js_style"; + hash = "1lz931m3qdv3yzqy6dnb8fq1d99r61w0n7cwf3b9fl9rhk0pggwh"; + meta.description = "Code style checker for Jane Street Packages"; + propagatedBuildInputs = [ octavius ppxlib ]; + }; + + ppx_base = janePackage { + pname = "ppx_base"; + hash = "0vd96rp2l084iamkwmvizzhl9625cagjb6gzzbir06czii5mlq2p"; + meta.description = "Base set of ppx rewriters"; + propagatedBuildInputs = [ ppx_enumerate ppx_hash ppx_js_style ]; + }; + + ppx_bench = janePackage { + pname = "ppx_bench"; + hash = "1ib81irawxzq091bmpi50z0kmpx6z2drg14k2xcgmwbb1d4063xn"; + meta.description = "Syntax extension for writing in-line benchmarks in ocaml code"; + propagatedBuildInputs = [ ppx_inline_test ]; + }; + + ppx_sexp_message = janePackage { + pname = "ppx_sexp_message"; + hash = "0yskd6v48jc6wa0nhg685kylh1n9qb6b7d1wglr9wnhl9sw990mc"; + meta.description = "A ppx rewriter for easy construction of s-expressions"; + propagatedBuildInputs = [ ppx_here ppx_sexp_conv ]; + }; + + splittable_random = janePackage { + pname = "splittable_random"; + hash = "1wpyz7807cgj8b50gdx4rw6f1zsznp4ni5lzjbnqdwa66na6ynr4"; + meta.description = "PRNG that can be split into independent streams"; + propagatedBuildInputs = [ base ppx_assert ppx_bench ppx_sexp_message ]; + }; + + ppx_let = janePackage { + pname = "ppx_let"; + hash = "146dmyzkbmafa3giz69gpxccvdihg19cvk4xsg8krbbmlkvdda22"; + meta.description = "Monadic let-bindings"; + propagatedBuildInputs = [ ppxlib ]; + }; + + base_quickcheck = janePackage { + pname = "base_quickcheck"; + hash = "1la6qgq1zwmfyq1hqy6i337w435ym5yqgx2ygk86qip6nws0s6r3"; + meta.description = "Randomized testing framework, designed for compatibility with Base"; + propagatedBuildInputs = [ ppx_base ppx_fields_conv ppx_let splittable_random ]; + }; + + ppx_stable = janePackage { + pname = "ppx_stable"; + hash = "15zvf66wlkvz0yd4bkvndkpq74dj20jv1qkljp9n52hh7d0f9ykh"; + meta.description = "Stable types conversions generator"; + propagatedBuildInputs = [ ppxlib ]; + }; + + bin_prot = janePackage { + pname = "bin_prot"; + hash = "0hh6s7g9s004z35hsr8z6nw5phlcvcd6g2q3bj4f0s1s0anlsswm"; + meta.description = "A binary protocol generator"; + propagatedBuildInputs = [ ppx_compare ppx_custom_printf ppx_fields_conv ppx_variants_conv ]; + }; + + ppx_bin_prot = janePackage { + pname = "ppx_bin_prot"; + version = "0.12.1"; + hash = "1j0kjgmv58dmg3x5dj5zrfbm920rwq21lvkkaqq493y76cd0x8xg"; + meta.description = "Generation of bin_prot readers and writers from types"; + propagatedBuildInputs = [ bin_prot ppx_here ]; + }; + + ppx_fail = janePackage { + pname = "ppx_fail"; + hash = "0krsv6z9gi0ifxmw5ss6gwn108qhywyhbs41an10x9d5zpgf4l1n"; + meta.description = "Add location to calls to failwiths"; + propagatedBuildInputs = [ ppx_here ]; + }; + + jst-config = janePackage { + pname = "jst-config"; + hash = "0yxcz13vda1mdh9ah7qqxwfxpcqang5sgdssd8721rszbwqqaw93"; + meta.description = "Compile-time configuration for Jane Street libraries"; + buildInputs = [ ppx_assert ]; + }; + + ppx_optcomp = janePackage { + pname = "ppx_optcomp"; + hash = "0bdbx01kz0174g1szdhv3mcfqxqqf2frxq7hk13xaf6fsz04kwmj"; + meta.description = "Optional compilation for OCaml"; + propagatedBuildInputs = [ ppxlib ]; + }; + + jane-street-headers = janePackage { + pname = "jane-street-headers"; + hash = "0qa4llf812rjqa8nb63snmy8d8ny91p3anwhb50afb7vjaby8m34"; + meta.description = "Jane Street C header files"; + }; + + time_now = janePackage { + pname = "time_now"; + hash = "169mgsb3rja4j1j9nj5xa7bbkd21p9kfpskqz0wjf9x2fpxqsniq"; + meta.description = "Reports the current time"; + buildInputs = [ jst-config ppx_optcomp ]; + propagatedBuildInputs = [ jane-street-headers base ppx_base ]; + }; + + ppx_module_timer = janePackage { + pname = "ppx_module_timer"; + hash = "0yziakm7f4c894na76k1z4bp7azy82xc33mh36fj761w1j9zy3wm"; + meta.description = "Ppx rewriter that records top-level module startup times"; + propagatedBuildInputs = [ time_now ]; + }; + + ppx_optional = janePackage { + pname = "ppx_optional"; + hash = "07i0iipbd5xw2bc604qkwlcxmhncfpm3xmrr6svyj2ij86pyssh8"; + meta.description = "Pattern matching on flat options"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_pipebang = janePackage { + pname = "ppx_pipebang"; + hash = "1p4pdpl8h2bblbhpn5nk17ri4rxpz0aih0gffg3cl1186irkj0xj"; + meta.description = "A ppx rewriter that inlines reverse application operators `|>` and `|!`"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_sexp_value = janePackage { + pname = "ppx_sexp_value"; + hash = "1mg81834a6dx1x7x9zb9wc58438cabjjw08yhkx6i386hxfy891p"; + meta.description = "A ppx rewriter that simplifies building s-expressions from ocaml values"; + propagatedBuildInputs = [ ppx_here ppx_sexp_conv ]; + }; + + typerep = janePackage { + pname = "typerep"; + hash = "1psl6gsk06a62szh60y5sc1s92xpmrl1wpw3rhha09v884b7arbc"; + meta.description = "Typerep is a library for runtime types"; + propagatedBuildInputs = [ base ]; + }; + + ppx_typerep_conv = janePackage { + pname = "ppx_typerep_conv"; + hash = "09vik6qma1id44k8nz87y48l9wbjhqhap1ar1hpfdfkjai1hrzzq"; + meta.description = "Generation of runtime types from type declarations"; + propagatedBuildInputs = [ ppxlib typerep ]; + }; + + ppx_jane = janePackage { + pname = "ppx_jane"; + hash = "1a2602isqzsh640q20qbmarx0sc316mlsqc3i25ysv2kdyhh0kyw"; + meta.description = "Standard Jane Street ppx rewriters"; + propagatedBuildInputs = [ base_quickcheck ppx_bench ppx_bin_prot ppx_expect ppx_fail ppx_module_timer ppx_optcomp ppx_optional ppx_pipebang ppx_sexp_value ppx_stable ppx_typerep_conv ]; + }; + + base_bigstring = janePackage { + pname = "base_bigstring"; + hash = "0rbgyg511847fbnxad40prz2dyp4da6sffzyzl88j18cxqxbh1by"; + meta.description = "String type based on [Bigarray], for use in I/O and C-bindings"; + propagatedBuildInputs = [ ppx_jane ]; + }; + + parsexp = janePackage { + pname = "parsexp"; + hash = "1974i9s2c2n03iffxrm6ncwbd2gg6j6avz5jsxfd35scc2zxcd4l"; + meta.description = "S-expression parsing library"; + propagatedBuildInputs = [ base sexplib0 ]; + }; + + sexplib = janePackage { + pname = "sexplib"; + hash = "0780klc5nnv0ij6aklzra517cfnfkjdlp8ylwjrqwr8dl9rvxza2"; + meta.description = "Library for serializing OCaml values to and from S-expressions"; + propagatedBuildInputs = [ num parsexp ]; + }; + + core_kernel = janePackage { + pname = "core_kernel"; + version = "0.12.2"; + hash = "0c85bjvadrb4pmjcg0gjk3bkkgka62r90pjm690mjvcbbv5zjxzj"; + meta.description = "System-independent part of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ base_bigstring sexplib ]; + }; + + spawn = janePackage { + pname = "spawn"; + version = "0.13.0"; + hash = "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"; + meta.description = "Spawning sub-processes"; + buildInputs = [ ppx_expect ]; + }; + + core = janePackage { + pname = "core"; + version = "0.12.3"; + hash = "1vmjqiafkg45hqfvahx6jnlaww1q4a4215k8znbgprf0qn3zymnj"; + meta.description = "System-independent part of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ core_kernel spawn ]; + }; + + async_kernel = janePackage { + pname = "async_kernel"; + hash = "1d9illx7vvpblj1i2r9y0f2yff2fbhy3rp4hhvamq1n9n3lvxmh2"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ core_kernel ]; + }; + + protocol_version_header = janePackage { + pname = "protocol_version_header"; + hash = "14vqhx3r84rlfhcjq52gxdqksckiaswlck9s47g7y2z1lsc17v7r"; + meta.description = "Protocol versioning"; + propagatedBuildInputs = [ core_kernel ]; + }; + + async_rpc_kernel = janePackage { + pname = "async_rpc_kernel"; + hash = "1znhqbzx4fp58i7dbcgyv5rx7difbhb5d8cbqzv96yqvbn67lsjk"; + meta.description = "Platform-independent core of Async RPC library"; + propagatedBuildInputs = [ async_kernel protocol_version_header ]; + }; + + async_unix = janePackage { + pname = "async_unix"; + hash = "09h10rdyykbm88n6r9nb5a22mlb6vcxa04q6hvrcr0kys6qhhqmb"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_kernel core ]; + }; + + async_extra = janePackage { + pname = "async_extra"; + hash = "10j4mwlyqvf67yrp5dwd857llqjinpnnykmlzw2gpmks9azxk6mh"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_rpc_kernel async_unix ]; + }; + + textutils = janePackage { + pname = "textutils"; + hash = "0302awqihf3abib9mvzvn4g8m364hm6jxry1r3kc01hzybhy9acq"; + meta.description = "Text output utilities"; + propagatedBuildInputs = [ core ]; + }; + + async = janePackage { + pname = "async"; + hash = "0pk7z3h2gi21nfchvmjz2wx516bynf9vgwf84zf5qhvlvqqsmyrx"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_extra textutils ]; + }; + + async_ssl = janePackage { + pname = "async_ssl"; + hash = "02ard8x5q5c42d9jdqmyzfx624yjq8cxxmvq3zb82hf6p8cc57ml"; + meta.description = "An Async-pipe-based interface with OpenSSL"; + propagatedBuildInputs = [ async ctypes openssl ]; + }; + + async_find = janePackage { + pname = "async_find"; + hash = "0qsz9f15s5rlk6za10s810v6nlkdxg2g9p1827lcpa7nhjcpi673"; + meta.description = "Directory traversal with Async"; + propagatedBuildInputs = [ async ]; + }; + + re2 = janePackage { + pname = "re2"; + hash = "1sw32lb0y501y971ij7287796lvfhs0nfgla895r74ymfks2rcjb"; + meta.description = "OCaml bindings for RE2, Google's regular expression library"; + propagatedBuildInputs = [ core_kernel ]; + prePatch = '' + substituteInPlace src/re2_c/dune --replace 'CXX=g++' 'CXX=c++' + substituteInPlace src/dune --replace '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2))' '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2) (-x c++))' + ''; + }; + + shell = janePackage { + pname = "shell"; + hash = "158857rdr6qgglc5iksg0l54jgf51b5lmsw7nlazpxwdwc9fcn5n"; + meta.description = "Yet another implementation of fork&exec and related functionality"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ re2 textutils ]; + }; + + async_shell = janePackage { + pname = "async_shell"; + hash = "0cxln9hkc3cy522la9yi9p23qjwl69kqmadsq4lnjh5bxdad06sv"; + meta.description = "Shell helpers for Async"; + propagatedBuildInputs = [ async shell ]; + }; + + core_bench = janePackage { + pname = "core_bench"; + hash = "00hyzbbj19dkcw0vhfnc8w0ca3zkjriwwvl00ssa0a2g9mygijdm"; + meta.description = "Benchmarking library"; + propagatedBuildInputs = [ textutils ]; + }; + + core_extended = janePackage { + pname = "core_extended"; + hash = "1gwx66235irpf5krb1r25a3c7w52qhmass8hp7rdv89il9jn49w4"; + meta.description = "Extra components that are not as closely vetted or as stable as Core"; + propagatedBuildInputs = [ core ]; + }; + + sexp_pretty = janePackage { + pname = "sexp_pretty"; + hash = "06hdsaszc5cd7fphiblbn4r1sh36xgjwf2igzr2rvlzqs7jiv2v4"; + meta.description = "S-expression pretty-printer"; + propagatedBuildInputs = [ ppx_base re sexplib ]; + }; + + expect_test_helpers_kernel = janePackage { + pname = "expect_test_helpers_kernel"; + hash = "18ya187y2i2hfxr771sd9vy5jdsa30vhs56yjdhwk06v01b2fzbq"; + meta.description = "Helpers for writing expectation tests"; + buildInputs = [ ppx_jane ]; + propagatedBuildInputs = [ core_kernel sexp_pretty ]; + }; + + expect_test_helpers = janePackage { + pname = "expect_test_helpers"; + hash = "0ixqck2lnsmz107yw0q2sr8va80skjpldx7lz4ymjiq2vsghk0rb"; + meta.description = "Async helpers for writing expectation tests"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + }; + + patience_diff = janePackage { + pname = "patience_diff"; + hash = "055kd3piadjnplip8c8q99ssh79d4irmhg2wng7aida5pbqp2p9f"; + meta.description = "Diff library using Bram Cohen's patience diff algorithm"; + propagatedBuildInputs = [ core_kernel ]; + }; + + ecaml = janePackage { + pname = "ecaml"; + hash = "0n9xi6agc3lgyj2nsi10cbif0xwn57xyaranad9r285rmbxrgjh7"; + meta.description = "Library for writing Emacs plugin in OCaml"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + }; + + ### Packages at version 0.11, with dependencies at version 0.12 + + configurator = janePackage { + pname = "configurator"; + version = "0.11.0"; + hash = "0h686630cscav7pil8c3w0gbh6rj4b41dvbnwmicmlkc746q5bfk"; + propagatedBuildInputs = [ stdio ]; + meta.description = "Helper library for gathering system configuration"; + }; + + ppx_core = janePackage { + pname = "ppx_core"; + version = "0.11.0"; + hash = "11hgm9mxig4cm3c827f6dns9mjv3pf8g6skf10x0gw9xnp1dmzmx"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_driver = janePackage { + pname = "ppx_driver"; + version = "0.11.0"; + hash = "00kfx6js2kxk57k4v7hiqvwk7h35whgjihnxf75m82rnaf4yzvfi"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_type_conv = janePackage { + pname = "ppx_type_conv"; + version = "0.11.0"; + hash = "04dbrglqqhkas25cpjz8xhjcbpk141c35qggzw66bn69izczfmaf"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.13.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.13.nix new file mode 100644 index 000000000000..b92027a65a0d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.13.nix @@ -0,0 +1,514 @@ +{ janePackage +, ctypes +, dune-configurator +, num +, octavius +, ppxlib +, re +, openssl +}: + +rec { + + ocaml-compiler-libs = janePackage { + pname = "ocaml-compiler-libs"; + version = "0.12.1"; + hash = "0hpk54fcsfcjp536fgwr80mjjf88hjk58q7jwnyrhk2ljd8xzgiv"; + meta.description = "OCaml compiler libraries repackaged"; + }; + + sexplib0 = janePackage { + pname = "sexplib0"; + hash = "1b1bk0xs1hqa12qs5y4h1yl3mq6xml4ya2570dyhdn1j0fbw4g3y"; + meta.description = "Library containing the definition of S-expressions and some base converters"; + }; + + base = janePackage { + pname = "base"; + version = "0.13.1"; + hash = "08a5aymcgr5svvm8v0v20msd5cad64m6maakfbhz4172g7kd9jzw"; + meta.description = "Full standard library replacement for OCaml"; + propagatedBuildInputs = [ sexplib0 ]; + }; + + stdio = janePackage { + pname = "stdio"; + hash = "1hkj9vh8n8p3n5pvx7053xis1pfmqd8p7shjyp1n555xzimfxzgh"; + meta.description = "Standard IO library for OCaml"; + propagatedBuildInputs = [ base ]; + }; + + ppx_sexp_conv = janePackage { + pname = "ppx_sexp_conv"; + hash = "0jkhwmkrfq3ss6bv6i3m871alcr4xpngs6ci6bmzv3yfl7s8bwdf"; + meta.description = "[@@deriving] plugin to generate S-expression conversion functions"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_here = janePackage { + pname = "ppx_here"; + hash = "1ahidrrjsyi0al06bhv5h6aqmdk7ryz8dybfhqjsn1zp9q056q35"; + meta.description = "Expands [%here] into its location"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_compare = janePackage { + pname = "ppx_compare"; + hash = "14pnqa47gsvq93z1b8wb5pyq8zw90aaw71j4pwlyid4s86px454j"; + meta.description = "Generation of comparison functions from types"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_cold = janePackage { + pname = "ppx_cold"; + hash = "0wnfwsgbzk4i5aqjlcaqp6lkvrq5345vazryvx2klbbrd4759h9f"; + meta.description = "Expands [@cold] into [@inline never][@specialise never][@local never]"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_assert = janePackage { + pname = "ppx_assert"; + hash = "08dada2xcp3w5mir90z56qrdyd317lygml4qlfssj897534bwiqr"; + meta.description = "Assert-like extension nodes that raise useful errors on failure"; + propagatedBuildInputs = [ ppx_cold ppx_compare ppx_here ppx_sexp_conv ]; + }; + + ppx_inline_test = janePackage { + pname = "ppx_inline_test"; + hash = "135qzbhqy33lmigbq1rakr9i3y59y3pczh4laanqjyss9b9kfs60"; + meta.description = "Syntax extension for writing in-line tests in ocaml code"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_custom_printf = janePackage { + pname = "ppx_custom_printf"; + hash = "0kvfkdk4wg2z8x705bajvl1f8wiyy3aya203wdzc9425h73nqm5p"; + meta.description = "Printf-style format-strings for user-defined string conversion"; + propagatedBuildInputs = [ ppx_sexp_conv ]; + }; + + fieldslib = janePackage { + pname = "fieldslib"; + hash = "0nsl0i9vjk73pr70ksxqa65rd5v84jzdaazryfdy6i4a5sfg7bxa"; + meta.description = "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"; + propagatedBuildInputs = [ base ]; + }; + + ppx_fields_conv = janePackage { + pname = "ppx_fields_conv"; + hash = "0biw0fgphj522bj9wgjk263i2w92vnpaabzr5zn0grihp4yqy8w4"; + meta.description = "Generation of accessor and iteration functions for ocaml records"; + propagatedBuildInputs = [ fieldslib ppxlib ]; + }; + + variantslib = janePackage { + pname = "variantslib"; + hash = "04nps65v1n0nv9n1c1kj5k9jyqsfsxb6h2w3vf6cibhjr5m7z8xc"; + meta.description = "Part of Jane Street's Core library"; + propagatedBuildInputs = [ base ]; + }; + + ppx_variants_conv = janePackage { + pname = "ppx_variants_conv"; + hash = "1ssinizz11bws06qzjky486cj1zrflij1f7hi16d02j40qmyjz7b"; + meta.description = "Generation of accessor and iteration functions for ocaml variant types"; + propagatedBuildInputs = [ variantslib ppxlib ]; + }; + + ppx_expect = janePackage { + pname = "ppx_expect"; + hash = "1hhcga960wjvhcx5pk7rcywl1p9n2ycvqa294n24m8dhzqia6i47"; + meta.description = "Cram like framework for OCaml"; + propagatedBuildInputs = [ ppx_assert ppx_custom_printf ppx_fields_conv ppx_inline_test ppx_variants_conv re ]; + }; + + ppx_enumerate = janePackage { + pname = "ppx_enumerate"; + hash = "0hsg6f2nra1mb35jdgym5rf7spm642bs6qqifbikm9hg8f7z3ql4"; + meta.description = "Generate a list containing all values of a finite type"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_hash = janePackage { + pname = "ppx_hash"; + hash = "1f7mfyx4wgk67hchi57w3142m61ka3vgy1969cbkwr3akv6ifly2"; + meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions"; + propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ]; + }; + + ppx_js_style = janePackage { + pname = "ppx_js_style"; + hash = "1zlhcn0an5k9xjymk5z5m2vqi8zajy6nvcbl5sdn19pjl3zv645x"; + meta.description = "Code style checker for Jane Street Packages"; + propagatedBuildInputs = [ octavius ppxlib ]; + }; + + ppx_base = janePackage { + pname = "ppx_base"; + hash = "0dkqc85x7bgbb6lgx9rghvj1q4dpdgy9qgjl88ywi4c8l9rgnnkz"; + meta.description = "Base set of ppx rewriters"; + propagatedBuildInputs = [ ppx_cold ppx_enumerate ppx_hash ppx_js_style ]; + }; + + ppx_bench = janePackage { + pname = "ppx_bench"; + hash = "0snmy05d3jgihmppixx3dzamkykijqa2v43vpd7q4z8dpnip620g"; + meta.description = "Syntax extension for writing in-line benchmarks in ocaml code"; + propagatedBuildInputs = [ ppx_inline_test ]; + }; + + ppx_sexp_message = janePackage { + pname = "ppx_sexp_message"; + hash = "03jhx3ajcv22iwxkg1jf1jjvd14gyrwi1yc6c5ryqi5ha0fywfw6"; + meta.description = "A ppx rewriter for easy construction of s-expressions"; + propagatedBuildInputs = [ ppx_here ppx_sexp_conv ]; + }; + + splittable_random = janePackage { + pname = "splittable_random"; + hash = "1kgcd6k31vsd7638g8ip77bp1b7vzgkbvgvij4jm2igl09132r85"; + meta.description = "PRNG that can be split into independent streams"; + propagatedBuildInputs = [ base ppx_assert ppx_bench ppx_sexp_message ]; + }; + + ppx_let = janePackage { + pname = "ppx_let"; + hash = "0qplsvbv10h7kwf6dhhgvi001gfphv1v66s83zjr5zbypyaarg5y"; + meta.description = "Monadic let-bindings"; + propagatedBuildInputs = [ ppxlib ]; + }; + + base_quickcheck = janePackage { + pname = "base_quickcheck"; + hash = "0ik8llm01m2xap4gia0vpsh7yq311hph7a2kf5109ag4988s8p0w"; + meta.description = "Randomized testing framework, designed for compatibility with Base"; + propagatedBuildInputs = [ ppx_base ppx_fields_conv ppx_let splittable_random ]; + }; + + ppx_stable = janePackage { + pname = "ppx_stable"; + hash = "0h7ls1bs0bsd8c4na4aj0nawwhvfy50ybm7sza7yz3qli9jammjk"; + meta.description = "Stable types conversions generator"; + propagatedBuildInputs = [ ppxlib ]; + }; + + bin_prot = janePackage { + pname = "bin_prot"; + hash = "1nnr21rljlfglmhiji27d7c1d6gg5fk4cc5rl3750m98w28mfdjw"; + meta.description = "A binary protocol generator"; + propagatedBuildInputs = [ ppx_compare ppx_custom_printf ppx_fields_conv ppx_variants_conv ]; + }; + + ppx_bin_prot = janePackage { + pname = "ppx_bin_prot"; + hash = "14nfjgqisdqqg8wg4qzvc859zil82y0qpr8fm4nhq05mgxp37iyc"; + meta.description = "Generation of bin_prot readers and writers from types"; + propagatedBuildInputs = [ bin_prot ppx_here ]; + }; + + ppx_fail = janePackage { + pname = "ppx_fail"; + hash = "165mikjg4a1lahq3n9q9y2h36jbln5g3l2hapx17irvf0l0c3vn5"; + meta.description = "Add location to calls to failwiths"; + propagatedBuildInputs = [ ppx_here ]; + }; + + jst-config = janePackage { + pname = "jst-config"; + hash = "15lj6f83hz555xhjy9aayl3adqwgl1blcjnja693a1ybi3ca8w0y"; + meta.description = "Compile-time configuration for Jane Street libraries"; + buildInputs = [ ppx_assert ]; + }; + + ppx_optcomp = janePackage { + pname = "ppx_optcomp"; + hash = "13db395swqf7v87pgl9qiyj4igmvj57hpl8blx3kkrzj6ddh38a8"; + meta.description = "Optional compilation for OCaml"; + propagatedBuildInputs = [ ppxlib ]; + }; + + jane-street-headers = janePackage { + pname = "jane-street-headers"; + hash = "1qjg2ari0xn40dlbk0h9xkwr37k97ldkxpkv792fbl6wc2jlv3x5"; + meta.description = "Jane Street C header files"; + }; + + time_now = janePackage { + pname = "time_now"; + hash = "1if234kz1ssmv22c0vh1cwhbivab6yy3xvy37ny1q4k5ibjc3v0n"; + meta.description = "Reports the current time"; + buildInputs = [ jst-config ppx_optcomp ]; + propagatedBuildInputs = [ jane-street-headers base ppx_base ]; + }; + + ppx_module_timer = janePackage { + pname = "ppx_module_timer"; + hash = "13kv5fzwf41wsaksj41hnvcpx8pnbmzcainlq6f5shj9671hpnhb"; + meta.description = "Ppx rewriter that records top-level module startup times"; + propagatedBuildInputs = [ time_now ]; + }; + + ppx_optional = janePackage { + pname = "ppx_optional"; + hash = "1nwb9jvmszxddj9wxgv9g02qhr10yymm2q1w1gjfqd97m2m1mx4n"; + meta.description = "Pattern matching on flat options"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_pipebang = janePackage { + pname = "ppx_pipebang"; + hash = "0ybj0flsi95pf13ayzz1lcrqhqvkv1lm2dz6y8w49f12583496mc"; + meta.description = "A ppx rewriter that inlines reverse application operators `|>` and `|!`"; + propagatedBuildInputs = [ ppxlib ]; + }; + + ppx_sexp_value = janePackage { + pname = "ppx_sexp_value"; + hash = "18k5015awv9yjl44cvdmp3pn894cgsxmn5s7picxapm9675xqcg9"; + meta.description = "A ppx rewriter that simplifies building s-expressions from ocaml values"; + propagatedBuildInputs = [ ppx_here ppx_sexp_conv ]; + }; + + typerep = janePackage { + pname = "typerep"; + hash = "116hlifww2cqq1i9vwpl7ziwkc1na7p9icqi9srpdxnvn8ibcsas"; + meta.description = "Typerep is a library for runtime types"; + propagatedBuildInputs = [ base ]; + }; + + ppx_typerep_conv = janePackage { + pname = "ppx_typerep_conv"; + hash = "1jlmga9i79inr412l19n4vvmgafzp1bznqxwhy42x309wblbhxx9"; + meta.description = "Generation of runtime types from type declarations"; + propagatedBuildInputs = [ ppxlib typerep ]; + }; + + ppx_jane = janePackage { + pname = "ppx_jane"; + hash = "1a86rvnry8lvjhsg2k73f5bgz7l2962k5i49yzmzn8w66kj0yz60"; + meta.description = "Standard Jane Street ppx rewriters"; + propagatedBuildInputs = [ base_quickcheck ppx_bench ppx_bin_prot ppx_expect ppx_fail ppx_module_timer ppx_optcomp ppx_optional ppx_pipebang ppx_sexp_value ppx_stable ppx_typerep_conv ]; + }; + + base_bigstring = janePackage { + pname = "base_bigstring"; + hash = "1i3zr8bn71l442vl5rrvjpwphx20frp2vaw1qc05d348j76sxfp7"; + meta.description = "String type based on [Bigarray], for use in I/O and C-bindings"; + propagatedBuildInputs = [ ppx_jane ]; + }; + + parsexp = janePackage { + pname = "parsexp"; + hash = "0fsxy5lpsvfadj8m2337j8iprs294dfikqxjcas7si74nskx6l38"; + meta.description = "S-expression parsing library"; + propagatedBuildInputs = [ base sexplib0 ]; + }; + + sexplib = janePackage { + pname = "sexplib"; + hash = "059ypcyirw00x6dqa33x49930pwxcr3i72qz5pf220js2ai2nzhn"; + meta.description = "Library for serializing OCaml values to and from S-expressions"; + propagatedBuildInputs = [ num parsexp ]; + }; + + core_kernel = janePackage { + version = "0.13.1"; + pname = "core_kernel"; + hash = "1ynyz6jkf23q0cwbn6kv06mgyjd644qxb0qkrydq0cglcaa4kjhp"; + meta.description = "System-independent part of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ base_bigstring sexplib ]; + }; + + spawn = janePackage { + pname = "spawn"; + hash = "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"; + meta.description = "Spawning sub-processes"; + buildInputs = [ ppx_expect ]; + }; + + core = janePackage { + pname = "core"; + hash = "1i5z9myl6i7axd8dz4b71gdsz9la6k07ib9njr4bn12yn0y76b1m"; + meta.description = "System-independent part of Core"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ core_kernel spawn ]; + }; + + async_kernel = janePackage { + pname = "async_kernel"; + hash = "1rrbyy3pyh31qwv0jiarhpgdyq2z2gx6axmaplgpxshk4qx6gsld"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ core_kernel ]; + }; + + protocol_version_header = janePackage { + pname = "protocol_version_header"; + hash = "19wscd81jlj355f9din1sg21m3af456a0id2a37bx38r390wrghc"; + meta.description = "Protocol versioning"; + propagatedBuildInputs = [ core_kernel ]; + }; + + async_rpc_kernel = janePackage { + pname = "async_rpc_kernel"; + hash = "1k3f2psyd1xcf7nkk0q1fq57yyhfqbzyynsz821n7mrnm37simac"; + meta.description = "Platform-independent core of Async RPC library"; + propagatedBuildInputs = [ async_kernel protocol_version_header ]; + }; + + async_unix = janePackage { + pname = "async_unix"; + version = "0.13.1"; + hash = "1sb8grbj4bv6ih3yfdihxhn5c9rqczr56b5bhl85wy2mi92m17xv"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_kernel core ]; + }; + + async_extra = janePackage { + pname = "async_extra"; + hash = "06q1farx7dwi4h490xi1azq7ym57ih2d23sq17g2jfvw889kf4n1"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_rpc_kernel async_unix ]; + }; + + textutils = janePackage { + pname = "textutils"; + hash = "1wnyqj9dzfgl0kddmdl4n9rkl16hwy432dd2i4ksvk2z5g9kkb0d"; + meta.description = "Text output utilities"; + propagatedBuildInputs = [ core ]; + }; + + async = janePackage { + pname = "async"; + hash = "002j9yxpw0ghi12a84163vaqa3n9h8j35f4i72nbxnilxwvy95sr"; + meta.description = "Monadic concurrency library"; + propagatedBuildInputs = [ async_rpc_kernel async_unix textutils ]; + }; + + async_find = janePackage { + pname = "async_find"; + hash = "0l8cfhyrx2rb2avdcfx5m70aj6rx2d57qxqvfycad5afqz4xx2n9"; + meta.description = "Directory traversal with Async"; + propagatedBuildInputs = [ async ]; + }; + + re2 = janePackage { + pname = "re2"; + hash = "0hmizznlzilynn5kh6149bbpkfw2l0xi7zi1y1fxfww2ma3wpim0"; + meta.description = "OCaml bindings for RE2, Google's regular expression library"; + propagatedBuildInputs = [ core_kernel ]; + prePatch = '' + substituteInPlace src/re2_c/dune --replace 'CXX=g++' 'CXX=c++' + substituteInPlace src/dune --replace '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2))' '(cxx_flags (:standard \ -pedantic) (-I re2_c/libre2) (-x c++))' + ''; + }; + + shell = janePackage { + pname = "shell"; + hash = "190ymhm0z9b7hngbcpg88wwrfxwfcdh339d7rd2xhmrhi4z99r18"; + meta.description = "Yet another implementation of fork&exec and related functionality"; + buildInputs = [ jst-config ]; + propagatedBuildInputs = [ re2 textutils ]; + }; + + async_shell = janePackage { + pname = "async_shell"; + hash = "0bfxyvdmyv23zfr49pb4c3bgfkjr4s3nb3z07xrw6szia3j1kp4j"; + meta.description = "Shell helpers for Async"; + propagatedBuildInputs = [ async shell ]; + }; + + async_ssl = janePackage { + pname = "async_ssl"; + useDune2 = true; + hash = "0z5dbiam5k7ipx9ph4r8nqv0a1ldx1ymxw3xjxgrdjda90lmwf2k"; + meta.description = "Async wrappers for SSL"; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ async ctypes openssl ]; + }; + + core_bench = janePackage { + pname = "core_bench"; + hash = "1nk0i3z8rqrljbf4bc7ljp71g0a4361nh85s2ang0lgxri74zacm"; + meta.description = "Benchmarking library"; + propagatedBuildInputs = [ textutils ]; + }; + + core_extended = janePackage { + pname = "core_extended"; + hash = "0zh1wwkg5cxkz633dl9zbbl65aksvzb5mss1q8f7w6i1sv3n0135"; + meta.description = "Extra components that are not as closely vetted or as stable as Core"; + propagatedBuildInputs = [ core ]; + }; + + sexp_pretty = janePackage { + pname = "sexp_pretty"; + hash = "1a59xc9frmvi7n0i32dzs8gpf5ral80xkwv97a13zv5cyg8l6216"; + meta.description = "S-expression pretty-printer"; + propagatedBuildInputs = [ ppx_base re sexplib ]; + }; + + expect_test_helpers_kernel = janePackage { + pname = "expect_test_helpers_kernel"; + hash = "11m0i7mj6b1cmqnwhmsrqdc814s0lk3sip8rh97k75grngazmjvn"; + meta.description = "Helpers for writing expectation tests"; + buildInputs = [ ppx_jane ]; + propagatedBuildInputs = [ core_kernel sexp_pretty ]; + }; + + expect_test_helpers = janePackage { + pname = "expect_test_helpers"; + hash = "0sw9yam8d9hdam8p194q0hgc4i26vvwj5qi2cba1jxfhdzhy8jdd"; + meta.description = "Async helpers for writing expectation tests"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + }; + + patience_diff = janePackage { + pname = "patience_diff"; + hash = "012rlbnw21yq2lsbfk3f7l4m4qq3jdx238146z36v54vnhhs6r2r"; + meta.description = "Diff library using Bram Cohen's patience diff algorithm"; + propagatedBuildInputs = [ core_kernel ]; + }; + + ecaml = janePackage { + pname = "ecaml"; + hash = "0jmmsi1m7d4cl5mnw6v9h4ng29anwxy73a6qfi28lgpzafn452bc"; + meta.description = "Library for writing Emacs plugin in OCaml"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + }; + + ### Packages at version 0.11, with dependencies at version 0.12 + + configurator = janePackage { + pname = "configurator"; + version = "0.11.0"; + hash = "0h686630cscav7pil8c3w0gbh6rj4b41dvbnwmicmlkc746q5bfk"; + propagatedBuildInputs = [ stdio ]; + meta.description = "Helper library for gathering system configuration"; + }; + + ppx_core = janePackage { + pname = "ppx_core"; + version = "0.11.0"; + hash = "11hgm9mxig4cm3c827f6dns9mjv3pf8g6skf10x0gw9xnp1dmzmx"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_driver = janePackage { + pname = "ppx_driver"; + version = "0.11.0"; + hash = "00kfx6js2kxk57k4v7hiqvwk7h35whgjihnxf75m82rnaf4yzvfi"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_type_conv = janePackage { + pname = "ppx_type_conv"; + version = "0.11.0"; + hash = "04dbrglqqhkas25cpjz8xhjcbpk141c35qggzw66bn69izczfmaf"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix new file mode 100644 index 000000000000..70780ee385fa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix @@ -0,0 +1,18 @@ +{stdenv, buildOcamlJane, async_kernel, bin_prot, core_kernel, + fieldslib, ppx_assert, ppx_bench, ppx_driver, ppx_expect, ppx_inline_test, + ppx_jane, sexplib, typerep, variantslib}: + +buildOcamlJane { + name = "async_rpc_kernel"; + hash = "0pvys7giqix1nfidw1f4i3r94cf03ba1mvhadpm2zpdir3av91sw"; + propagatedBuildInputs = [ async_kernel bin_prot core_kernel fieldslib + ppx_assert ppx_bench ppx_driver ppx_expect ppx_inline_test ppx_jane + sexplib typerep variantslib ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/async_rpc_kernel"; + description = "Platform-independent core of Async RPC library"; + license = licenses.asl20; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/bin_prot.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/bin_prot.nix new file mode 100644 index 000000000000..1eb6b6a95f86 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/bin_prot.nix @@ -0,0 +1,17 @@ +{stdenv, buildOcamlJane, type_conv}: + +buildOcamlJane { + name = "bin_prot"; + version = "113.33.03"; + minimumSupportedOcamlVersion = "4.02"; + hash = "0jlarpfby755j0kikz6vnl1l6q0ga09b9zrlw6i84r22zchnqdsh"; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/bin_prot"; + description = "Binary protocol generator "; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix new file mode 100644 index 000000000000..fdb0d8034e69 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix @@ -0,0 +1,27 @@ +{ buildOcaml, opaline, js_build_tools, ocaml_oasis, fetchurl } : + +{ name, version ? "113.33.03", buildInputs ? [], + hash ? "", + minimumSupportedOcamlVersion ? "4.02", ... +}@args: + +buildOcaml (args // { + inherit name version minimumSupportedOcamlVersion; + src = fetchurl { + url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz"; + sha256 = hash; + }; + + hasSharedObjects = true; + + buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs; + + dontAddPrefix = true; + + configurePhase = "./configure --prefix $out"; + + buildPhase = "OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make"; + + installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install"; + +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/core_bench.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/core_bench.nix new file mode 100644 index 000000000000..1956a7f3b705 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/core_bench.nix @@ -0,0 +1,20 @@ +{ stdenv +, buildOcamlJane +, core +, core_extended +, textutils +}: + +buildOcamlJane { + name = "core_bench"; + hash = "1d1ainpakgsf5rg8dvar12ksgilqcc4465jr8gf7fz5mmn0mlifj"; + propagatedBuildInputs = + [ core core_extended textutils ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/core_bench"; + description = "Micro-benchmarking library for OCaml"; + license = licenses.asl20; + maintainers = [ maintainers.pmahoney ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/default.nix new file mode 100644 index 000000000000..837504f9a7fe --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/default.nix @@ -0,0 +1,604 @@ +{ janePackage, ocamlbuild, angstrom, cryptokit, ctypes, + magic-mime, ocaml-migrate-parsetree, octavius, ounit, ppx_deriving, re, + num, openssl +, ppxlib +}: + +rec { + + ocaml-compiler-libs = janePackage { + pname = "ocaml-compiler-libs"; + hash = "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"; + meta.description = "OCaml compiler libraries repackaged"; + }; + + sexplib0 = janePackage { + pname = "sexplib0"; + meta.description = "Library containing the definition of S-expressions and some base converters"; + hash = "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"; + }; + + parsexp = janePackage { + pname = "parsexp"; + hash = "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"; + propagatedBuildInputs = [ sexplib0 ]; + meta.description = "S-expression parsing library"; + }; + + sexplib = janePackage { + pname = "sexplib"; + meta.description = "Library for serializing OCaml values to and from S-expressions"; + hash = "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"; + propagatedBuildInputs = [ num parsexp ]; + }; + + base = janePackage { + version = "0.11.1"; + pname = "base"; + hash = "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"; + propagatedBuildInputs = [ sexplib0 ]; + meta.description = "Full standard library replacement for OCaml"; + }; + + stdio = janePackage { + pname = "stdio"; + hash = "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"; + propagatedBuildInputs = [ base ]; + meta.description = "Standard IO library for OCaml"; + }; + + configurator = janePackage { + pname = "configurator"; + hash = "0h686630cscav7pil8c3w0gbh6rj4b41dvbnwmicmlkc746q5bfk"; + propagatedBuildInputs = [ stdio ]; + meta.description = "Helper library for gathering system configuration"; + }; + + ppx_compare = janePackage { + pname = "ppx_compare"; + version = "0.11.1"; + hash = "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ base ppx_deriving ]; + meta.description = "Generation of comparison functions from types"; + }; + + ppx_sexp_conv = janePackage { + pname = "ppx_sexp_conv"; + version = "0.11.2"; + hash = "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"; + propagatedBuildInputs = [ sexplib0 ppxlib ppx_deriving ]; + meta.description = "Generation of S-expression conversion functions from type definitions"; + }; + + variantslib = janePackage { + pname = "variantslib"; + hash = "0hbsk34ghc28h8pzbma923ma2bgnz8lzrgcqqx9bzg161jl4s4r3"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ base ]; + meta.description = "OCaml variants as first class values"; + }; + + ppx_variants_conv = janePackage { + pname = "ppx_variants_conv"; + version = "0.11.1"; + hash = "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ ppx_deriving variantslib ]; + meta.description = "Generation of accessor and iteration functions for OCaml variant types"; + }; + + fieldslib = janePackage { + pname = "fieldslib"; + hash = "1yvjvfax56lmn2lxbykcmhgmxypws1vp9lhnyb8bhbavsv8yc6da"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "OCaml record fields as first class values"; + }; + + ppx_fields_conv = janePackage { + pname = "ppx_fields_conv"; + hash = "1bb9cmn4js7p3qh8skzyik1pcz6sj1k4xkhf12fg1bjmb5fd0jx1"; + propagatedBuildInputs = [ fieldslib ]; + meta.description = "Generation of accessor and iteration functions for OCaml records"; + }; + + ppx_custom_printf = janePackage { + pname = "ppx_custom_printf"; + hash = "1dvjzvaxhx53jqwrrlxdckwl1azrhs9kvwb48mhgd0jnz65ny726"; + propagatedBuildInputs = [ ppx_sexp_conv ]; + meta.description = "Printf-style format-strings for user-defined string conversion"; + }; + + bin_prot = janePackage { + pname = "bin_prot"; + hash = "1mgbyzsr8h0y4s4j9dv7hsdrxyzhhjww5khwg2spi2my7ia95m0l"; + propagatedBuildInputs = [ ppx_compare ppx_custom_printf ppx_fields_conv ppx_variants_conv ]; + meta.description = "Binary protocol generator"; + }; + + jane-street-headers = janePackage { + pname = "jane-street-headers"; + hash = "0kij4c7qxrja787f3sm3z6mzr322486h2djrlyhnl66vp8hrv8si"; + meta.description = "Jane Street header files"; + }; + + ppx_here = janePackage { + pname = "ppx_here"; + hash = "04njv8s4n54x9rg0012ymd6y6lrnqprnh0f0f6s0jcp79q7mv43i"; + buildInputs = [ ppxlib ]; + meta.description = "Expands [%here] into its location"; + }; + + ppx_assert = janePackage { + pname = "ppx_assert"; + hash = "0qbdrl0rj0midnb6sdyaz00s0d4nb8zrrdf565lcdsi1rbnyrzan"; + buildInputs = [ ppx_here ]; + propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ]; + meta.description = "Assert-like extension nodes that raise useful errors on failure"; + }; + + ppx_hash = janePackage { + version = "0.11.1"; + pname = "ppx_hash"; + hash = "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"; + propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ]; + meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions"; + }; + + ppx_inline_test = janePackage { + pname = "ppx_inline_test"; + hash = "11n94fz1asjf5vqdgriv0pvsa5lbfpqcyk525c7816w23vskcvq6"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ base ]; + meta.description = "Syntax extension for writing in-line tests in OCaml code"; + }; + + ppx_sexp_message = janePackage { + pname = "ppx_sexp_message"; + hash = "0d94pf0mrmyp905ncgj4w6cc6zpm4nlib6nclslhgs89pxpzg6a0"; + buildInputs = [ ppx_here ]; + propagatedBuildInputs = [ ppx_sexp_conv ]; + meta.description = "A ppx rewriter for easy construction of s-expressions"; + }; + + typerep = janePackage { + pname = "typerep"; + hash = "00j4by75fl9niqvlpiyw6ymlmlmgfzysm8w25cj5wsfsh4yrgr74"; + propagatedBuildInputs = [ base ]; + meta.description = "Runtime types for OCaml"; + }; + + ppx_typerep_conv = janePackage { + version = "0.11.1"; + pname = "ppx_typerep_conv"; + hash = "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ ppx_deriving typerep ]; + meta.description = "Generation of runtime types from type declarations"; + }; + + ppx_js_style = janePackage { + pname = "ppx_js_style"; + hash = "1cwqyrkykc8wi60grbid1w072fcvf7k0hd387jz7mxfw44qyb85g"; + propagatedBuildInputs = [ ppxlib octavius ]; + meta.description = "Code style checker for Jane Street Packages"; + }; + + ppx_enumerate = janePackage { + version = "0.11.1"; + pname = "ppx_enumerate"; + hash = "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ ppx_deriving ]; + meta.description = "Generate a list containing all values of a finite type"; + }; + + ppx_base = janePackage { + pname = "ppx_base"; + hash = "079caqjbxk1d33hy69017n3dwslqy52alvzjddwpdjb04vjadlk6"; + propagatedBuildInputs = [ ppx_compare ppx_enumerate ppx_hash ppx_js_style ]; + meta.description = "Base set of ppx rewriters"; + }; + + ppx_bench = janePackage { + pname = "ppx_bench"; + hash = "0z98r6y4lpj6dy265m771ylx126hq3v1zjsk74yqvpwwd63gx3jz"; + buildInputs = [ ppxlib ppx_inline_test ]; + meta.description = "Syntax extension for writing in-line benchmarks in OCaml code"; + }; + + ppx_bin_prot = janePackage { + version = "0.11.1"; + pname = "ppx_bin_prot"; + hash = "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"; + buildInputs = [ ppxlib ppx_here ]; + propagatedBuildInputs = [ bin_prot ]; + meta.description = "Generation of bin_prot readers and writers from types"; + }; + + ppx_expect = janePackage { + pname = "ppx_expect"; + hash = "1g0r67vfw9jr75pybiw4ysfiswlzyfpbj0gl91rx62gqdhjh1pga"; + buildInputs = [ ppx_assert ppx_custom_printf ppx_fields_conv ppx_here ppx_variants_conv re ]; + propagatedBuildInputs = [ fieldslib ppx_compare ppx_inline_test ppx_sexp_conv ]; + meta.description = "Cram like framework for OCaml"; + }; + + ppx_fail = janePackage { + pname = "ppx_fail"; + hash = "0d0xadcl7mhp81kspcd2b0nh75h34w5a6s6j9qskjjbjif87wiix"; + buildInputs = [ ppxlib ppx_here ]; + meta.description = "Add location to calls to failwiths"; + }; + + ppx_let = janePackage { + pname = "ppx_let"; + hash = "1ckzwljlb78cdf6xxd24nddnmsihvjrnq75r1b255aj3xgkzsygx"; + propagatedBuildInputs = [ base ppxlib ]; + meta.description = "Monadic let-bindings"; + }; + + ppx_optcomp = janePackage { + pname = "ppx_optcomp"; + hash = "1rahkjq6vpffs7wdz1crgbxkdnlfkj1i3j12c2andy4fhj49glcm"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ ppx_deriving ]; + meta.description = "Optional compilation for OCaml"; + }; + + ppx_optional = janePackage { + pname = "ppx_optional"; + hash = "0aw3hvrsdjpw4ik7rf15ghak31vhdr1lgpphr18mj76rnlrhirmx"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Pattern matching on flat options"; + }; + + ppx_pipebang = janePackage { + pname = "ppx_pipebang"; + hash = "0smgq587amlr3hivbbg153p83dj37w30cssp9cffc0v8kg84lfhr"; + buildInputs = [ ppxlib ]; + meta.description = "A ppx rewriter that inlines reverse application operators |> and |!"; + }; + + ppx_sexp_value = janePackage { + pname = "ppx_sexp_value"; + hash = "107zwb580nrmc0l03dl3y3hf12s3c1vv8b8mz6sa4k5afp3s9nkl"; + buildInputs = [ ppx_here ]; + propagatedBuildInputs = [ ppx_sexp_conv ]; + meta.description = "A ppx rewriter that simplifies building s-expressions from OCaml values"; + }; + + ppx_jane = janePackage { + pname = "ppx_jane"; + hash = "0l1p6llaa60mrc5p9400cqv9yy6h76x5wfq3z1cx5xawy0yz4vlb"; + buildInputs = [ ppxlib ]; + propagatedBuildInputs = [ ppx_assert ppx_base ppx_bench ppx_bin_prot ppx_expect ppx_fail ppx_here ppx_let ppx_optcomp ppx_optional ppx_pipebang ppx_sexp_message ppx_sexp_value ppx_typerep_conv ]; + meta.description = "Standard Jane Street ppx rewriters"; + }; + + splittable_random = janePackage { + pname = "splittable_random"; + hash = "1yrvpm6g62f8k6ihccxhfxpvmxbqxhi7p790a8jkdmyfdd1l6z73"; + propagatedBuildInputs = [ ppx_jane ]; + meta.description = "PRNG that can be split into independent streams"; + }; + + core_kernel = janePackage { + version = "0.11.1"; + pname = "core_kernel"; + hash = "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"; + propagatedBuildInputs = [ configurator jane-street-headers sexplib splittable_random ]; + meta.description = "Jane Street's standard library overlay (kernel)"; + }; + + spawn = janePackage { + version = "0.12.0"; + pname = "spawn"; + hash = "0amgj7g9sjlbjivn1mg7yjdmxd21hgp4a0ak2zrm95dmm4gi846i"; + meta.description = "Spawning sub-processes"; + }; + + core = janePackage { + version = "0.11.2"; + pname = "core"; + hash = "0vpsvd75lxb09il2rnzyib9mlr51v1hzqdc9fdxgx353pb5agh8a"; + propagatedBuildInputs = [ core_kernel spawn ]; + meta.description = "Jane Street's standard library overlay"; + }; + + textutils_kernel = janePackage { + pname = "textutils_kernel"; + hash = "0s1ps7h54vgl76pll3y5qa1bw8f4h8wxc8mg8jq6bz8vxvl0dfv4"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "The subset of textutils using only core_kernel and working in javascript"; + }; + + textutils = janePackage { + pname = "textutils"; + hash = "1jmhpaihnndf4pr8xsk7ws70n4mvv34ry0ggqqpfs3wb2vkcdg6j"; + propagatedBuildInputs = [ core textutils_kernel ]; + meta.description = "Text output utilities"; + }; + + re2 = janePackage { + pname = "re2"; + hash = "0bl65d0nmvr7k1mkkcc4aai86l5qzgn1xxwmszshpwhaz87cqghd"; + propagatedBuildInputs = [ core_kernel ]; + prePatch = '' + substituteInPlace src/re2_c/jbuild --replace 'CXX=g++' 'CXX=c++' + substituteInPlace src/jbuild --replace '(cxx_flags ((:standard \ -pedantic) (-I re2_c/libre2)))' '(cxx_flags ((:standard \ -pedantic) (-I re2_c/libre2) (-x c++)))' + ''; + meta.description = "OCaml bindings for RE2"; + }; + + core_extended = janePackage { + pname = "core_extended"; + hash = "1fvnr6zkpbl48dl7nn3j1dpsrr6bi00iqh282wg5lgdhcsjbc0dy"; + propagatedBuildInputs = [ core re re2 textutils ]; + postPatch = '' + patchShebangs src/discover.sh + ''; + meta.description = "Jane Street Capital's standard library overlay"; + }; + + async_kernel = janePackage { + version = "0.11.1"; + pname = "async_kernel"; + hash = "1ssv0gqbdns6by1wdjrrs35cj1c1n1qcfkxs8hj04b7x89wzvf1q"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Jane Street Capital's asynchronous execution library (core)"; + }; + + protocol_version_header = janePackage { + pname = "protocol_version_header"; + hash = "159qmkb0dsfmr1lv2ly50aqszpm24bvrm3sw07n2zhkxgy6q613z"; + propagatedBuildInputs = [ core_kernel ocaml-migrate-parsetree ]; + meta.description = "Protocol aware version negotiation"; + }; + + async_rpc_kernel = janePackage { + pname = "async_rpc_kernel"; + hash = "0wl7kp30qxkalk91q5pja9agsvvmdjvb2q7s3m79dlvwwi11l33y"; + propagatedBuildInputs = [ core_kernel async_kernel protocol_version_header ]; + meta.description = "Platform-independent core of Async RPC library"; + }; + + async_unix = janePackage { + pname = "async_unix"; + hash = "1y5za5fdh0x82zdjigxci9zm9jnpfd2lfgpjcq4rih3s28f16sf7"; + propagatedBuildInputs = [ core async_kernel ]; + meta.description = "Jane Street Capital's asynchronous execution library (unix)"; + }; + + async_extra = janePackage { + version = "0.11.1"; + pname = "async_extra"; + hash = "0dmplvqf41820rm5i0l9bx1xmmdlq8zsszi36y2rkjna8991f7s2"; + propagatedBuildInputs = [ async_rpc_kernel async_unix ]; + meta.description = "Jane Street's asynchronous execution library (extra)"; + }; + + async = janePackage { + pname = "async"; + hash = "1i05hzk4mhzj1mw98b2bdbxhnq03jvhkkkw4d948i6265jzrrbv5"; + propagatedBuildInputs = [ async_extra ]; + meta.description = "Jane Street Capital's asynchronous execution library"; + }; + + async_find = janePackage { + pname = "async_find"; + hash = "0s0qafx74ri1vr2vv3iy1j7s3p6gp7vyg0mw5g17iafk0w6lv2iq"; + propagatedBuildInputs = [ async ]; + meta.description = "Directory traversal with Async"; + }; + + async_interactive = janePackage { + pname = "async_interactive"; + hash = "01rlfcylpiak6a2n6q3chp73cvkhvb65n906dj0flmxmagn7dxd1"; + propagatedBuildInputs = [ async ]; + meta.description = "Utilities for building simple command-line based user interfaces"; + }; + + async_parallel = janePackage { + pname = "async_parallel"; + hash = "0hak8ba3rfzqhz5hz2annqmsv5bkqzdihhafp0f58ryrlskafwag"; + propagatedBuildInputs = [ async ]; + meta.description = "Distributed computing library"; + }; + + async_shell = janePackage { + pname = "async_shell"; + hash = "1jb01ygfnhabsy72xlcg11vp7rr37sg555sm0k3yxl4r5az3y2ay"; + propagatedBuildInputs = [ core_extended async ]; + meta.description = "Shell helpers for Async"; + }; + + async_ssl = janePackage { + pname = "async_ssl"; + hash = "1p83fzfla4rb820irdrz3f2hp8kq5zrhw47rqmfv6qydlca1bq64"; + propagatedBuildInputs = [ async ctypes openssl ]; + meta.description = "Async wrappers for SSL"; + }; + + sexp_pretty = janePackage { + pname = "sexp_pretty"; + hash = "0xskahjggbwvvb82fn0jp1didxbgpmgks76xhwp9s3vqkhgz6918"; + propagatedBuildInputs = [ ppx_base re sexplib ]; + meta.description = "S-expression pretty-printer"; + }; + + expect_test_helpers_kernel = janePackage { + pname = "expect_test_helpers_kernel"; + hash = "0m113vq4m1xm3wmwa08r6qjc7p5f0y3ss8s4i2z591ycgs2fxzlj"; + propagatedBuildInputs = [ core_kernel sexp_pretty ]; + meta.description = "Helpers for writing expectation tests"; + }; + + expect_test_helpers = janePackage { + pname = "expect_test_helpers"; + hash = "13n6h7mimwkbsjdix96ghfrmxjd036m4h4zgl8qag00aacqclvpi"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + meta.description = "Async helpers for writing expectation tests"; + }; + + cinaps = janePackage { + pname = "cinaps"; + hash = "0f8cx4xkkk4wqpcbvva8kxdndbgawljp17dwppc6zpjpkjl8s84j"; + propagatedBuildInputs = [ re ]; + meta.description = "Trivial Metaprogramming tool using the OCaml toplevel"; + }; + + command_rpc = janePackage { + pname = "command_rpc"; + hash = "111v4km0ds8ixmpmwg9ck36ap97400mqzhijf57kj6wfwgzcmr2g"; + propagatedBuildInputs = [ async ]; + meta.description = "Utilities for Versioned RPC communication with a child process over stdin and stdout"; + }; + + # Deprecated libraries + + ppx_ast = janePackage { + pname = "ppx_ast"; + hash = "125bzswcwr3nb26ss8ydh8z4218c8fi3s2kvgqp1j1fhc5wwzqgj"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_core = janePackage { + pname = "ppx_core"; + hash = "11hgm9mxig4cm3c827f6dns9mjv3pf8g6skf10x0gw9xnp1dmzmx"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_driver = janePackage { + pname = "ppx_driver"; + hash = "00kfx6js2kxk57k4v7hiqvwk7h35whgjihnxf75m82rnaf4yzvfi"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_metaquot = janePackage { + pname = "ppx_metaquot"; + hash = "1vz8bi56jsz8w0894vgbfsfvmdyh5k1dgv45l8vhkks0s7d3ldji"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_traverse = janePackage { + pname = "ppx_traverse"; + hash = "1p2n5da4mxh9fk4gvxlibc706bs5xwkbppxd1x0ip1vln5pabbq5"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_traverse_builtins = janePackage { + pname = "ppx_traverse_builtins"; + hash = "0qlf7i8h8k3a9h8nhb0ki3y1knr6wgbm24f1qaqni53fpvzv0pfb"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + ppx_type_conv = janePackage { + pname = "ppx_type_conv"; + hash = "04dbrglqqhkas25cpjz8xhjcbpk141c35qggzw66bn69izczfmaf"; + propagatedBuildInputs = [ ppxlib ]; + meta.description = "Deprecated (see ppxlib)"; + }; + + # Miscellaneous Jane Street packages + + core_bench = janePackage { + pname = "core_bench"; + hash = "10i28ssfdqxxhq0rvnlp581lr1cq2apkhmm8j83fksjkmbxcrasc"; + propagatedBuildInputs = [ core_extended ]; + meta.description = "Micro-benchmarking library for OCaml"; + }; + + csvfields = janePackage { + pname = "csvfields"; + hash = "10zw4fjlniivfdzzz79lnbvcjnhk5y16m1p8mn4xbs23n6mbix0f"; + propagatedBuildInputs = [ core expect_test_helpers ]; + meta.description = "Runtime support for ppx_xml_conv and ppx_csv_conv"; + }; + + ecaml = janePackage { + pname = "ecaml"; + hash = "1is5156q59s427x3q5nh9wsi8h1x77670bmyilqxasy39yway7g8"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + meta.description = "Writing Emacs plugin in OCaml"; + }; + + email_message = janePackage { + pname = "email_message"; + hash = "131jd72k4s8cdbgg6gyg7w5v8mphdlvdx4fgvh8d9a1m7kkvbxfg"; + propagatedBuildInputs = [ async angstrom core_extended cryptokit magic-mime ounit ]; + patches = [ ./email-message-angstrom-0.14.patch ]; + meta.description = "E-mail message parser"; + }; + + incremental_kernel = janePackage { + version = "0.11.1"; + pname = "incremental_kernel"; + hash = "1qp9dqncx2h0np0rndqaic4dna8f1dlkqnbjfcdhcim5dp2vg4x6"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Library for incremental computations depending only on core_kernel"; + }; + + incremental = janePackage { + pname = "incremental"; + hash = "1xchd3v4kj56wixjrsnj7m7l0374cgkzybihs2b62mn65xf6n7ki"; + propagatedBuildInputs = [ core incremental_kernel ]; + meta.description = "Library for incremental computations"; + }; + + incr_map = janePackage { + pname = "incr_map"; + hash = "01vx9aldxpigz5ah9h337xcw73a7r8449v8l2xbralljhs0zglx9"; + propagatedBuildInputs = [ incremental_kernel ]; + meta.description = "Helpers for incremental operations on map like data structures"; + }; + + parsexp_io = janePackage { + pname = "parsexp_io"; + hash = "0rhdl40jiirvv6fhgjk50n8wzs3jly5d8dyyyfgpjgl39mwkjjnb"; + propagatedBuildInputs = [ parsexp ppx_js_style ]; + meta.description = "S-expression parsing library (IO functions)"; + }; + + patience_diff = janePackage { + pname = "patience_diff"; + hash = "0q7a64fgg97qcd6d8c45gyz63x5vq004axxqvvfg92b8f3x2plx4"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Tool and library implementing patience diff"; + }; + + posixat = janePackage { + pname = "posixat"; + hash = "04rs4sl0r4rg9m6l9kkqkmc4n87sv4a4w9ibq4zsjk9j4n6r2df8"; + propagatedBuildInputs = [ ppx_optcomp ppx_sexp_conv sexplib ]; + meta.description = "Binding to the posix *at functions"; + }; + + rpc_parallel = janePackage { + pname = "rpc_parallel"; + hash = "13dx59x73i8mkwv2qkh8gx6kk8arlvghj57k1jdscdmzmyqc9gvn"; + propagatedBuildInputs = [ async ]; + meta.description = "Type-safe library for building parallel applications"; + }; + + shexp = janePackage { + version = "0.11.1"; + pname = "shexp"; + hash = "06yssp7bsmabaxvw9bqxyrsji1gkvl7if5adba3v6h4kilqy7rqg"; + propagatedBuildInputs = [ posixat spawn ]; + meta.description = "Process library and s-expression based shell"; + }; + + topological_sort = janePackage { + pname = "topological_sort"; + hash = "1qnz5b1rs45lsl1ycxd1lglpmh8444gy5khhdp5fvxy987zkzklz"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Topological sort algorithm"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch new file mode 100644 index 000000000000..624a3e5334b2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch @@ -0,0 +1,22 @@ +diff --git a/email_address/src/email_address.ml b/email_address/src/email_address.ml +index 7470273..d070465 100644 +--- a/email_address/src/email_address.ml ++++ b/email_address/src/email_address.ml +@@ -38,7 +38,7 @@ module Stable = struct + let of_string ?default_domain input_str = + let open Core_kernel in + let open! Int.Replace_polymorphic_compare in +- match Angstrom.parse_string Email_address_parser_stable_v1.email_only input_str with ++ match Angstrom.parse_string ~consume:Prefix Email_address_parser_stable_v1.email_only input_str with + | Error error -> + Or_error.error_s [%message + "Failed to parse email address" +@@ -104,7 +104,7 @@ module T = Stable.V1.With_comparator + include T + + let list_of_string ?default_domain input_str = +- match Angstrom.parse_string Email_address_parser_stable_v1.email_list_only input_str with ++ match Angstrom.parse_string ~consume:Prefix Email_address_parser_stable_v1.email_list_only input_str with + | Error error -> + Or_error.error_s [%message + "Failed to parse email address(es)" diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/fieldslib.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/fieldslib.nix new file mode 100644 index 000000000000..39aeb7047177 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/fieldslib.nix @@ -0,0 +1,19 @@ +{ stdenv, type_conv, buildOcamlJane }: + +buildOcamlJane { + name = "fieldslib"; + version = "113.33.03"; + + minimumSupportedOcamlVersion = "4.02"; + + hash = "0mkbix32f8sq32q81hb10z2q31bw5f431jxv0jafbdrif0vr6xqd"; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://ocaml.janestreet.com/"; + description = "OCaml syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values"; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage.nix new file mode 100644 index 000000000000..b3ffecb38ce9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.11.0" }: + +{ pname, version ? defaultVersion, hash, ...}@args: + +buildDunePackage (args // { + inherit version; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = pname; + rev = "v${version}"; + sha256 = hash; + }; + + meta.license = stdenv.lib.licenses.asl20; + meta.homepage = "https://github.com/janestreet/${pname}"; +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix new file mode 100644 index 000000000000..5b7d9c3210d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix @@ -0,0 +1,19 @@ +{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.12.0" }: + +{ pname, version ? defaultVersion, hash, ...}@args: + +buildDunePackage (args // { + inherit version; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = pname; + rev = "v${version}"; + sha256 = hash; + }; + + meta.license = lib.licenses.mit; + meta.homepage = "https://github.com/janestreet/${pname}"; +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix new file mode 100644 index 000000000000..b92bcead95c3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix @@ -0,0 +1,19 @@ +{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.13.0" }: + +{ pname, version ? defaultVersion, hash, ...}@args: + +buildDunePackage (args // { + inherit version; + + minimumOCamlVersion = "4.08"; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = pname; + rev = "v${version}"; + sha256 = hash; + }; + + meta.license = lib.licenses.mit; + meta.homepage = "https://github.com/janestreet/${pname}"; +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch new file mode 100644 index 000000000000..8878b4be68b8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch @@ -0,0 +1,11 @@ +--- a/ocamlbuild_goodies/jane_street_ocamlbuild_goodies.ml ++++ b/ocamlbuild_goodies/jane_street_ocamlbuild_goodies.ml +@@ -65,7 +65,7 @@ let track_external_deps = function + + let stat, md5sum = + match run_and_read "uname" |> String.trim with +- | "Darwin" -> ++ | "FreeBSD" | "NetBSD" -> + (S [A "stat"; A "-f"; A "%d:%i:%m"], + A "md5") + | _ -> diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix new file mode 100644 index 000000000000..f77b793bcaab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix @@ -0,0 +1,29 @@ +{ stdenv, buildOcaml, fetchurl, ocaml_oasis, opaline }: + +buildOcaml rec { + name = "js-build-tools"; + version = "113.33.06"; + + minimumSupportedOcamlVersion = "4.02"; + + src = fetchurl { + url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz"; + sha256 = "1nvgyp4gsnlnpix3li6kr90b12iin5ihichv298p03i6h2809dia"; + }; + + hasSharedObjects = true; + + buildInputs = [ ocaml_oasis opaline ]; + + dontAddPrefix = true; + configurePhase = "./configure --prefix $prefix"; + installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install"; + + patches = [ ./js-build-tools-darwin.patch ]; + + meta = with stdenv.lib; { + description = "Jane Street Build Tools"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/old.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/old.nix new file mode 100644 index 000000000000..447a9cdf71f5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/old.nix @@ -0,0 +1,615 @@ +{ stdenv, lib, janePackage, ocaml, ocamlbuild, cryptokit, ctypes, magic-mime, + ocaml-migrate-parsetree, octavius, ounit, ppx_deriving, re, zarith, num, + openssl }: + +rec { + + # Jane Street packages, up to ppx_core + + sexplib = janePackage { + pname = "sexplib"; + meta.description = "Automated S-expression conversion"; + version = "0.10.0"; + hash = "1agw649n0rnf6h4y2dr1zs1970nncxgjmf90848vbxv8y9im4yy2"; + buildInputs = [ num ]; + }; + + base = janePackage { + pname = "base"; + version = "0.9.4"; + hash = "0x85xi66b4zwlbdwmyc99zcmawgpp75gxqbl55rr67awavw162rw"; + propagatedBuildInputs = [ sexplib ]; + meta.description = "Full standard library replacement for OCaml"; + }; + + ocaml-compiler-libs = janePackage { + pname = "ocaml-compiler-libs"; + hash = "1jz3nfrb6295sj4xj1j0zld8mhfj0xy2k4vlp9yf9sh3748n090l"; + meta.description = "OCaml compiler libraries repackaged"; + }; + + ppx_ast = janePackage ({ + pname = "ppx_ast"; + propagatedBuildInputs = [ ocaml-compiler-libs ocaml-migrate-parsetree ]; + meta.description = "OCaml AST used by Jane Street ppx rewriters"; + } // (if lib.versionAtLeast ocaml.version "4.06" + then { + version = "0.9.2"; + hash = "1h4qf26rg23z21rrw83fakiavw9km7174p3830pg0gg4bwakvba0"; + } else { + version = "0.9.1"; + hash = "0a9rxwavy2748k0yd4db3hg1ypq7mpqnwq9si5a5qdiclgkhcggw"; + } + )); + + ppx_traverse_builtins = janePackage { + pname = "ppx_traverse_builtins"; + hash = "10ajvz02ka6qimlfrq7py4ljhk8awqkga6240kn8j046b4xfyxzi"; + meta.description = "Builtins for Ppx_traverse"; + }; + + stdio = janePackage { + pname = "stdio"; + version = "0.9.1"; + hash = "13rj3ii0rvmklfim9ild0ib44ssdadig7a9ccjbz22m0pw84a1sx"; + propagatedBuildInputs = [ base ]; + meta.description = "Standard IO library for OCaml"; + }; + + ppx_core = janePackage { + pname = "ppx_core"; + hash = "15400zxxkqdimmjpdjcs36gcbxbrhylmaczlzwd6x65v1h9aydz3"; + propagatedBuildInputs = [ ppx_ast ppx_traverse_builtins stdio ]; + meta.description = "Jane Street's standard library for ppx rewriters"; + }; + + # Jane Street packages, up to ppx_base + + ppx_optcomp = janePackage { + pname = "ppx_optcomp"; + hash = "1wfj6fnh92s81yncq7yyhmax7j6zpjj1sg1f3qa1f9c5kf4kkzrd"; + propagatedBuildInputs = [ ppx_core ]; + meta.description = "Optional compilation for OCaml"; + }; + + ppx_driver = janePackage { + pname = "ppx_driver"; + version = "0.9.1"; + hash = "1amz49x6v4sh1v2my6618cah0zv5i7jmsapbk9ydps6419g5asay"; + buildInputs = [ ocamlbuild ]; + propagatedBuildInputs = [ ppx_optcomp ]; + meta.description = "Feature-full driver for OCaml AST transformers"; + }; + + ppx_metaquot = janePackage { + pname = "ppx_metaquot"; + hash = "15qfd3s4x2pz006nx5316laxd3gqqi472x432qg4rfx4yh3vn31k"; + propagatedBuildInputs = [ ppx_driver ]; + meta.description = "Metaquotations for ppx_ast"; + }; + + ppx_type_conv = janePackage { + pname = "ppx_type_conv"; + hash = "0a0gxjvjiql9vg37k0akn8xr5724nv3xb7v37xpidv7ld927ks7p"; + propagatedBuildInputs = [ ppx_metaquot ppx_deriving ]; + meta.description = "Support Library for type-driven code generators"; + }; + + ppx_sexp_conv = janePackage { + pname = "ppx_sexp_conv"; + hash = "03cg2sym0wvpd5l7q4w9bclp589z5byygwsmnnq9h1ih56cmd55l"; + propagatedBuildInputs = [ ppx_type_conv sexplib ]; + meta.description = "Generation of S-expression conversion functions from type definitions"; + }; + + ppx_compare = janePackage { + pname = "ppx_compare"; + hash = "0wrszpvn1nms5sb5rb29p7z1wmqyd15gfzdj4ax8f843p5ywx3w9"; + propagatedBuildInputs = [ ppx_type_conv ]; + meta.description = "Generation of comparison functions from types"; + }; + + ppx_enumerate = janePackage { + pname = "ppx_enumerate"; + hash = "1dfy86j2z12p5n9yrwaakx1ngphs5246vxy279kz6i6j34cwxm46"; + propagatedBuildInputs = [ ppx_type_conv ]; + meta.description = "Generate a list containing all values of a finite type"; + }; + + ppx_hash = janePackage { + pname = "ppx_hash"; + hash = "1w1riy2sqd9i611sc5f5z2rqqgjl2gvvkzi5xibpv309nacnl01d"; + propagatedBuildInputs = [ ppx_compare ppx_sexp_conv ]; + meta.description = "A ppx rewriter that generates hash functions from type expressions and definitions"; + }; + + ppx_js_style = janePackage { + pname = "ppx_js_style"; + hash = "09k02b1l2r7svf9l3ls69h8xydsyiang2ziigxnny2i7gy7b0w59"; + propagatedBuildInputs = [ ppx_metaquot octavius ]; + meta.description = "Code style checker for Jane Street Packages"; + }; + + ppx_base = janePackage { + pname = "ppx_base"; + hash = "0qikfzbkd2wyxfrvizz6rgi6vg4ykvxkivacj4gr178dbgfl5if3"; + propagatedBuildInputs = [ ppx_enumerate ppx_hash ppx_js_style ]; + meta.description = "Base set of ppx rewriters"; + }; + + # Jane Street packages, up to ppx_bin_prot + + fieldslib = janePackage { + pname = "fieldslib"; + hash = "1wxh59888l1bfz9ipnbcas58gwg744icaixzdbsg4v8f7wymc501"; + propagatedBuildInputs = [ ppx_driver ]; + meta.description = "OCaml record fields as first class values"; + }; + + variantslib = janePackage { + pname = "variantslib"; + hash = "0kj53n62193j58q9vip8lfhhyf6w9d25wyvxzc163hx5m68yw0fz"; + propagatedBuildInputs = [ ppx_driver ]; + meta.description = "OCaml variants as first class values"; + }; + + ppx_traverse = janePackage { + pname = "ppx_traverse"; + hash = "1sdqgwyq0w71i03vhc5jq4jk6rsbgwhvain48fnrllpkb5kj2la2"; + propagatedBuildInputs = [ ppx_type_conv ]; + meta.description = "Automatic generation of open recursion classes"; + }; + + ppx_custom_printf = janePackage { + pname = "ppx_custom_printf"; + hash = "0cjy2c2c5g3qxqvwx1yb6p7kbmmpnpb1hll55f7a44x215lg8x19"; + propagatedBuildInputs = [ ppx_sexp_conv ppx_traverse ]; + meta.description = "Printf-style format-strings for user-defined string conversion"; + }; + + ppx_fields_conv = janePackage { + pname = "ppx_fields_conv"; + hash = "0qp8zgmk58iskzrkf4g06i471kg6lrh3wqpy9klrb8pp9mg0xr9z"; + propagatedBuildInputs = [ fieldslib ppx_type_conv ]; + meta.description = "Generation of accessor and iteration functions for OCaml records"; + }; + + ppx_variants_conv = janePackage { + pname = "ppx_variants_conv"; + hash = "1xayhyglgbdjqvb9123kjbwjcv0a3n3302nb0j7g8gmja8w5y834"; + propagatedBuildInputs = [ ppx_type_conv variantslib ]; + meta.description = "Generation of accessor and iteration functions for OCaml variant types"; + }; + + bin_prot = janePackage { + pname = "bin_prot"; + version = "0.9.1"; + hash = "1bgcmkgz6b5i522996x589zsaiy5b3h37887lwbqvpps8by2ayvk"; + propagatedBuildInputs = [ ppx_compare ppx_custom_printf ppx_fields_conv ppx_variants_conv ]; + meta.description = "Binary protocol generator"; + }; + + ppx_here = janePackage { + pname = "ppx_here"; + hash = "0pjscw5ydxgy4fcxakgsazpp09ka057w5n2fp2dpkv2k5gil6rzh"; + propagatedBuildInputs = [ ppx_driver ]; + meta.description = "Expands [%here] into its location"; + }; + + ppx_bin_prot = janePackage { + pname = "ppx_bin_prot"; + hash = "0qw9zqrc5yngzrzpk9awnlnd68xrb7wz5lq807c80ibxk0xvnqn3"; + propagatedBuildInputs = [ ppx_here bin_prot ]; + meta.description = "Generation of bin_prot readers and writers from types"; + }; + + # Jane Street packages, up to ppx_jane + + ppx_assert = janePackage { + pname = "ppx_assert"; + hash = "1s5c75wkc46nlcwmgic5h7f439s26ssrzrcil501c5kpib2hlv6z"; + propagatedBuildInputs = [ ppx_sexp_conv ppx_here ppx_compare ]; + meta.description = "Assert-like extension nodes that raise useful errors on failure"; + }; + + ppx_inline_test = janePackage { + pname = "ppx_inline_test"; + version = "0.9.2"; + hash = "17j36ihiqprbpa2bk02449k93vaidid2sly5djrk848ccjq8n5aa"; + propagatedBuildInputs = [ ppx_metaquot ]; + meta.description = "Syntax extension for writing in-line tests in OCaml code"; + }; + + typerep = janePackage { + pname = "typerep"; + hash = "0hlc0xiznli1k6azv2mhm1s4xghhxqqd957np7828bfp7r8n2jy3"; + propagatedBuildInputs = [ base ]; + meta.description = "Runtime types for OCaml"; + }; + + ppx_bench = janePackage { + pname = "ppx_bench"; + hash = "1qk4y6c2mpw7bqjppi2nam74vs2sc89wzq162j92wsqxyqsv4p93"; + propagatedBuildInputs = [ ppx_inline_test ]; + meta.description = "Syntax extension for writing in-line benchmarks in OCaml code"; + }; + + ppx_expect = janePackage { + pname = "ppx_expect"; + hash = "1bik53k51wcqv088f0h10n3ms9h51yvg6ha3g1s903i2bxr3xs6b"; + propagatedBuildInputs = [ ppx_inline_test ppx_fields_conv ppx_custom_printf ppx_assert ppx_variants_conv re ]; + meta.description = "Cram like framework for OCaml"; + }; + + ppx_fail = janePackage { + pname = "ppx_fail"; + hash = "0qz0vlazasjyg7cv3iwpzxlvsah3zmn9dzd029xxqr1bji067s32"; + propagatedBuildInputs = [ ppx_here ppx_metaquot ]; + meta.description = "Add location to calls to failwiths"; + }; + + ppx_let = janePackage { + pname = "ppx_let"; + hash = "1b914a5nynwxjvfx42v61yigvjhnd548m4yqjfchf38dmqi1f4nr"; + propagatedBuildInputs = [ ppx_driver ]; + meta.description = "Monadic let-bindings"; + }; + + ppx_optional = janePackage { + pname = "ppx_optional"; + hash = "1vknsarxba0zcp5k2jb31wfpvqrv3bpanxbahfl5s2fwspsfdc82"; + propagatedBuildInputs = [ ppx_metaquot ]; + meta.description = "Pattern matching on flat options"; + }; + + ppx_pipebang = janePackage { + pname = "ppx_pipebang"; + hash = "1wyfyyjvyi94ds1p90l60wdr85q2v3fq1qdf3gnv9zjfy6sb0g9h"; + propagatedBuildInputs = [ ppx_metaquot ]; + meta.description = "A ppx rewriter that inlines reverse application operators |> and |!"; + }; + + ppx_sexp_message = janePackage { + pname = "ppx_sexp_message"; + hash = "0r0skyr1zf2jh48xrxbs45gzywynhlivkq24xwc0qq435fmc2jqv"; + propagatedBuildInputs = [ ppx_sexp_conv ppx_here ]; + meta.description = "A ppx rewriter for easy construction of s-expressions"; + }; + + ppx_sexp_value = janePackage { + pname = "ppx_sexp_value"; + hash = "0hha5mmx700m8fy9g4znb8278l09chgwlpshny83vsmmzgq2jhah"; + propagatedBuildInputs = [ ppx_sexp_conv ppx_here ]; + meta.description = "A ppx rewriter that simplifies building s-expressions from OCaml values"; + }; + + ppx_typerep_conv = janePackage { + pname = "ppx_typerep_conv"; + hash = "0bzgfpbqijwxm8x9jq1zb4xi5sbzymk17lw5rylri3hf84p60aq1"; + propagatedBuildInputs = [ ppx_type_conv typerep ]; + meta.description = "Generation of runtime types from type declarations"; + }; + + ppx_jane = janePackage { + pname = "ppx_jane"; + hash = "16m5iw0qyp452nqj83kd0g0x3rw40lrz7392hwpd4di1wi6v2qzc"; + propagatedBuildInputs = [ ppx_base ppx_bench ppx_bin_prot ppx_expect ppx_fail ppx_let ppx_optional ppx_pipebang ppx_sexp_message ppx_sexp_value ppx_typerep_conv ]; + meta.description = "Standard Jane Street ppx rewriters"; + }; + + # Jane Street packages, up to core + + configurator = janePackage { + pname = "configurator"; + version = "0.9.1"; + hash = "1q0s0ghcrcrxdj6zr9zr27g7sr4qr9l14kizjphwqwwvgbzawdix"; + propagatedBuildInputs = [ ppx_base ]; + meta.description = "Helper library for gathering system configuration"; + }; + + jane-street-headers = janePackage { + pname = "jane-street-headers"; + hash = "0cdab6sblsidjbwvyvmspykyhqh44rpsjzi2djbfd5m4vh2h14gy"; + meta.description = "Jane Street header files"; + }; + + core_kernel = janePackage { + pname = "core_kernel"; + hash = "05iwvggx9m81x7ijgv9gcv5znf5rmsmb76dg909bm9gkr3hbh7wh"; + propagatedBuildInputs = [ configurator jane-street-headers ppx_jane ]; + meta.description = "Jane Street's standard library overlay (kernel)"; + }; + + spawn = janePackage { + pname = "spawn"; + hash = "1w53b8ni06ajj62yaqjy0pkbm952l0m5fzr088yk15078qaxsnb5"; + meta.description = "Spawning sub-processes"; + }; + + core = janePackage { + pname = "core"; + version = "0.9.1"; + hash = "1643r0namsgj8xwfr9niimcdwyyq4ddiwd02d73ipb4a8710aqi8"; + propagatedBuildInputs = [ core_kernel spawn ]; + meta.description = "Jane Street's standard library overlay"; + }; + + # Jane Street packages, up to core_extended + + re2 = janePackage { + pname = "re2"; + hash = "1qmhl3yd6y0lq401rz72b1bsbpglb0wighpxn3x8y1ixq415p4xi"; + propagatedBuildInputs = [ core_kernel ]; + meta = { + description = "OCaml bindings for RE2"; + broken = stdenv.isDarwin; + }; + }; + + textutils = janePackage { + pname = "textutils"; + hash = "1y6j2qw7rc8d80343lfv1dygnfrhn2qllz57mx28pl5kan743f6d"; + propagatedBuildInputs = [ core ]; + meta.description = "Text output utilities"; + }; + + core_extended = janePackage { + pname = "core_extended"; + hash = "05cnzzj0kigz9c9gsmd6mfar82wmkbqm9qzrydb80sy2fz5b30rk"; + propagatedBuildInputs = [ core re2 textutils ]; + postPatch = '' + patchShebangs src/discover.sh + ''; + meta = { + description = "Jane Street Capital's standard library overlay"; + }; + }; + + # Jane Street async packages + + async_kernel = janePackage { + pname = "async_kernel"; + hash = "1zwxhzy7f9900rcjls2fql9cpfmwrcah3fazzdz4h2i51f41w62x"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Jane Street Capital's asynchronous execution library (core)"; + }; + + async_rpc_kernel = janePackage { + pname = "async_rpc_kernel"; + hash = "1xk3s6s3xkj182p10kig2cqy8md6znif3v661h9cd02n8s57c40b"; + propagatedBuildInputs = [ core_kernel async_kernel ]; + meta.description = "Platform-independent core of Async RPC library"; + }; + + async_unix = janePackage { + pname = "async_unix"; + hash = "0yd4z28j5vdj2zxqi0fkgh2ic1s9h740is2dk0raga0zr5a1z03d"; + propagatedBuildInputs = [ core async_kernel ]; + meta.description = "Jane Street Capital's asynchronous execution library (unix)"; + }; + + async_extra = janePackage { + pname = "async_extra"; + hash = "0rpy5lc5dh5mir7flq1jrppd8imby8wyw191yg4nmklg28xp5sx0"; + propagatedBuildInputs = [ async_rpc_kernel async_unix ]; + meta.description = "Jane Street's asynchronous execution library (extra)"; + }; + + async = janePackage { + pname = "async"; + hash = "10ykzym19srgdiikj0s74dndx5nk15hjq1r2hc61iz48f6caxkb1"; + propagatedBuildInputs = [ async_extra ]; + meta.description = "Jane Street Capital's asynchronous execution library"; + }; + + async_find = janePackage { + pname = "async_find"; + hash = "11dmhdzgf5kn4m0cm6zr28wpwhi2kr4lak9nmgxbrxsq28bcncxq"; + propagatedBuildInputs = [ async ]; + meta.description = "Directory traversal with Async"; + }; + + async_interactive = janePackage { + pname = "async_interactive"; + hash = "1mmqqp6bi2wg7bmgf0sw34jn3iyl5kbm200dax8yqq6rfprcs49j"; + propagatedBuildInputs = [ async ]; + meta.description = "Utilities for building simple command-line based user interfaces"; + }; + + async_parallel = janePackage { + pname = "async_parallel"; + hash = "0mdprhr1pv4g65g10gr3gaifrzknsdgarwfdbjlvhzfs86075kyn"; + propagatedBuildInputs = [ async ]; + meta.description = "Distributed computing library"; + }; + + async_shell = janePackage { + pname = "async_shell"; + hash = "02clpz3xv3i5avzifwalylb9gfxzpgnr8bnlfsjixxfk2m7kvsj2"; + propagatedBuildInputs = [ core_extended async ]; + meta = { + description = "Shell helpers for Async"; + }; + }; + + async_ssl = janePackage { + pname = "async_ssl"; + hash = "01w3bg38q61lc3hfh8jsr0sy1ylyv0m6g6h9yvsk8ngj6qk70nss"; + propagatedBuildInputs = [ async ctypes openssl ]; + meta.description = "Async wrappers for SSL"; + }; + + # Jane Street packages, up to expect_test_helpers + + sexp_pretty = janePackage { + pname = "sexp_pretty"; + hash = "1bx8va468j5b813m0vsh1jzgb6h2qnnjfmjlf2hb82sarv8lllfx"; + propagatedBuildInputs = [ ppx_base re ]; + meta.description = "S-expression pretty-printer"; + }; + + expect_test_helpers_kernel = janePackage { + pname = "expect_test_helpers_kernel"; + hash = "1ycqir8sqgq5nialnrfg29nqn0cqg6jjpgv24drdycdhqf5r2zg6"; + propagatedBuildInputs = [ core_kernel sexp_pretty ]; + meta.description = "Helpers for writing expectation tests"; + }; + + expect_test_helpers = janePackage { + pname = "expect_test_helpers"; + hash = "0rsh6rwbqfcrqisk8jp7srlnicsadbzrs02ri6zyx0p3lmznw5r2"; + propagatedBuildInputs = [ async expect_test_helpers_kernel ]; + meta.description = "Async helpers for writing expectation tests"; + }; + + # Miscellaneous Jane Street packages + + bignum = janePackage { + pname = "bignum"; + hash = "0g80mzsi7vc1kq4mzha8y9nl95h6cd041vix3wjrqgkdvb1qd4f3"; + propagatedBuildInputs = [ core_kernel zarith ]; + meta.description = "Core-flavoured wrapper around zarith's arbitrary-precision rationals"; + }; + + cinaps = janePackage { + pname = "cinaps"; + hash = "02fpjiwrygkpx2q4jfldhbqh0mqxmf955wizr8k4vmsq4wsis0p5"; + propagatedBuildInputs = [ re ]; + meta.description = "Trivial Metaprogramming tool using the OCaml toplevel"; + }; + + command_rpc = janePackage { + pname = "command_rpc"; + hash = "0w58z9jkz5qzbvf33wrzhfshzdvnrphj6dq8dmi52ykhfvxm7824"; + propagatedBuildInputs = [ async ]; + meta.description = "Utilities for Versioned RPC communication with a child process over stdin and stdout"; + }; + + core_bench = janePackage { + pname = "core_bench"; + hash = "1m2q7217nmcsck29i59djkm0h6z3aj0i01niijzr5f6ilbnmyd3h"; + propagatedBuildInputs = [ core_extended ]; + meta = { + description = "Micro-benchmarking library for OCaml"; + }; + }; + + core_profiler = janePackage { + pname = "core_profiler"; + hash = "1ir2v3wdfbf5xzqcma16asc73mkx2q6dzq5y1bx6q1rpa7iznx44"; + propagatedBuildInputs = [ core_extended ]; + meta = { + description = "Profiling library"; + }; + }; + + csvfields = janePackage { + pname = "csvfields"; + hash = "0lbvs1kwl22ryxhw6s089f6683hj2920bn518mvr22rnv7qijy0v"; + propagatedBuildInputs = [ core ]; + meta.description = "Runtime support for ppx_xml_conv and ppx_csv_conv"; + }; + + ecaml = janePackage { + pname = "ecaml"; + hash = "1a2534bzbwgpm71aj3sm71sm0lkcjdfjj1mk91p1pg9kxn8c5x4i"; + propagatedBuildInputs = [ async ]; + meta.description = "Writing Emacs plugin in OCaml"; + }; + + email_message = janePackage { + pname = "email_message"; + hash = "0cpaf6wn5g883bxdz029bksvrfzih99m7hzbb30fhqglmpmmkniz"; + propagatedBuildInputs = [ async core_extended cryptokit magic-mime ounit ]; + meta = { + description = "E-mail message parser"; + }; + }; + + incremental_kernel = janePackage { + pname = "incremental_kernel"; + hash = "0zq48wbgqcflh84n10iygi8aa3f0zzmgc7r0jwvsyg7i8zccgvf5"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Library for incremental computations depending only on core_kernel"; + }; + + incremental = janePackage { + pname = "incremental"; + hash = "05sx8ia46v4dlvzcn7xgjcwxvbd0wmvv9r2bpvniapjnwr1nvcfh"; + propagatedBuildInputs = [ core incremental_kernel ]; + meta.description = "Library for incremental computations"; + }; + + incr_map = janePackage { + pname = "incr_map"; + hash = "0358qg9irxbbhn18laqww3mn43mdwvlbr0h2mvg3vdbb2c5jp4fv"; + propagatedBuildInputs = [ incremental_kernel ]; + meta.description = "Helpers for incremental operations on map like data structures"; + }; + + ocaml_plugin = janePackage { + pname = "ocaml_plugin"; + hash = "0q33swnlx9p1gcn1aj95501kapb7cnbzbsavid69csczwmzcxr14"; + buildInputs = [ ocamlbuild ]; + propagatedBuildInputs = [ async ]; + meta.description = "Automatically build and dynlink ocaml source files"; + }; + + parsexp = janePackage { + pname = "parsexp"; + hash = "0brrifvnfqbfk873v6y5b2jixs2d73hpispj9r440kca5cfsv23b"; + propagatedBuildInputs = [ ppx_compare ppx_fields_conv ppx_js_style ppx_sexp_value ]; + meta.description = "S-expression parsing library"; + }; + + parsexp_io = janePackage { + pname = "parsexp_io"; + hash = "0gcmh4dg48xgszladq92yhk1hf492zf0smz462xrwknzlfdkz6a5"; + propagatedBuildInputs = [ parsexp ]; + meta.description = "S-expression parsing library (IO functions)"; + }; + + patience_diff = janePackage { + pname = "patience_diff"; + hash = "0vpx9xj1ich5qmj3m26vlmix3nsdj7pd1xzhqwbc7ad2kqwy3grg"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Tool and library implementing patience diff"; + }; + + posixat = janePackage { + pname = "posixat"; + hash = "0ak93dyzi6sc6gb0j07fj85b24d8bv6g2hm7jj5xwb39kjwh51jl"; + propagatedBuildInputs = [ ppx_sexp_conv ]; + meta.description = "Binding to the posix *at functions"; + meta.broken = lib.versionAtLeast ocaml.version "4.05"; + }; + + rpc_parallel = janePackage { + pname = "rpc_parallel"; + hash = "0s72msl2p27bz0knjlpgy5qwp0w4z76cq801ps0sab35f8jjfs38"; + propagatedBuildInputs = [ async ]; + meta.description = "Type-safe library for building parallel applications"; + }; + + shexp = janePackage { + pname = "shexp"; + hash = "1fkz4l9z4i0fz2kccd5blm2j9x2x4z6y1cn29wjmc3spqfxbq37y"; + propagatedBuildInputs = [ posixat spawn ]; + meta.description = "Process library and s-expression based shell"; + }; + + topological_sort = janePackage { + pname = "topological_sort"; + hash = "1d64fyq0clsgham9p1f5rk01z8pxalglp92xmqw2iznyw0vxhvsy"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Topological sort algorithm"; + }; + + typerep_extended = janePackage { + pname = "typerep_extended"; + hash = "15gq8mrvlipd616rffr3f0wqw5d0ijnnizix610g2d5viirh0j9p"; + propagatedBuildInputs = [ core_kernel ]; + meta.description = "Runtime types for OCaml (Extended)"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix new file mode 100644 index 000000000000..3ed7106e7b65 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix @@ -0,0 +1,16 @@ +{stdenv, buildOcamlJane, + ppx_compare, ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools, ppx_type_conv, sexplib}: + +buildOcamlJane { + name = "ppx_assert"; + hash = "0n7fa1j79ykbkhp8xz0ksg5096asri5d0msshsaqhw5fz18chvz4"; + propagatedBuildInputs = + [ ppx_compare ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools + ppx_type_conv sexplib ]; + + meta = with stdenv.lib; { + description = "Assert-like extension nodes that raise useful errors on failure"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix new file mode 100644 index 000000000000..9e5df431e04c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix @@ -0,0 +1,18 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_inline_test, ppx_tools}: + +buildOcamlJane { + name = "ppx_bench"; + minimumSupportedOcamlVersion = "4.02"; + hash = "1l5jlwy1d1fqz70wa2fkf7izngp6nx3g4s9bmnd6ca4dx1x5bksk"; + + hasSharedObjects = true; + + propagatedBuildInputs = [ ppx_core ppx_driver ppx_inline_test ppx_tools ]; + + meta = with stdenv.lib; { + description = "Syntax extension for writing in-line benchmarks in ocaml code"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix new file mode 100644 index 000000000000..d7f333d4cf4c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv, bin_prot}: + +buildOcamlJane { + name = "ppx_bin_prot"; + hash = "0kwmrrrybdkmphqczsr3lg3imsxcjb8iy41syvn44s3kcjfyyzbz"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv bin_prot ]; + + meta = with stdenv.lib; { + description = "Generation of bin_prot readers and writers from types"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix new file mode 100644 index 000000000000..0bfdd7bd540c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix @@ -0,0 +1,15 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_tools, ppx_type_conv}: + +buildOcamlJane { + name = "ppx_compare"; + hash = "05cnwxfxm8201lpfmcqkcqfy6plh5c2151jbj4qsnxhlvvjli459"; + propagatedBuildInputs = + [ppx_core ppx_driver ppx_tools ppx_type_conv ]; + + meta = with stdenv.lib; { + description = "Generation of fast comparison functions from type expressions and definitions"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-core.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-core.nix new file mode 100644 index 000000000000..c5789ee9cfb4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-core.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, ppx_tools}: + +buildOcamlJane { + name = "ppx_core"; + hash = "0df7vyai488lfkyh8szw2hvn22jsyrkfvq1b91j1s0g0y27nnfax"; + propagatedBuildInputs = + [ ppx_tools ]; + + meta = with stdenv.lib; { + description = "PPX standard library"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix new file mode 100644 index 000000000000..c652afa5fbfc --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix @@ -0,0 +1,15 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_sexp_conv, ppx_tools}: + +buildOcamlJane { + name = "ppx_custom_printf"; + hash = "06y85m6ky376byja4w7gdwd339di5ag0xrf0czkylzjsnylhdr85"; + + propagatedBuildInputs = [ ppx_core ppx_driver ppx_sexp_conv ppx_tools ]; + + meta = with stdenv.lib; { + description = "Extensions to printf-style format-strings for user-defined string conversion"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-driver.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-driver.nix new file mode 100644 index 000000000000..b4fb9ec7602f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-driver.nix @@ -0,0 +1,15 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_optcomp}: + +buildOcamlJane { + name = "ppx_driver"; + hash = "19cpfdn1n36vl5l9d6h7c61ffn0wmiipprn5by0354i5aywj8gpn"; + propagatedBuildInputs = + [ ppx_core ppx_optcomp ]; + + meta = with stdenv.lib; { + description = "A driver is an executable created from a set of OCaml AST transformers linked together with a command line frontend"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix new file mode 100644 index 000000000000..2fdfede0f23d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv}: + +buildOcamlJane { + name = "ppx_enumerate"; + hash = "0m11921q2pjzkwckf21fynd2qfy83n9jjsgks23yagdai8a7ym16"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv ]; + + meta = with stdenv.lib; { + description = "Generate a list containing all values of a finite type"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix new file mode 100644 index 000000000000..f78f93ee1202 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix @@ -0,0 +1,19 @@ +{stdenv, buildOcamlJane, + ppx_assert, ppx_compare, ppx_core, ppx_custom_printf, ppx_driver, + ppx_fields_conv, ppx_here, ppx_inline_test, ppx_sexp_conv, ppx_tools, + ppx_variants_conv, re, sexplib, variantslib, fieldslib}: + +buildOcamlJane { + name = "ppx_expect"; + hash = "0cwagb4cj3x1vsr19kyfa9pxlvaz9a5v863cahi5glinsh4mzgdx"; + propagatedBuildInputs = + [ ppx_assert ppx_compare ppx_core ppx_custom_printf ppx_driver + ppx_fields_conv ppx_here ppx_inline_test ppx_sexp_conv ppx_tools + ppx_variants_conv re sexplib variantslib fieldslib ]; + + meta = with stdenv.lib; { + description = "Cram-like framework for OCaml"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fail.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fail.nix new file mode 100644 index 000000000000..4f55a6c4eacb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fail.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_here, ppx_tools}: + +buildOcamlJane { + name = "ppx_fail"; + hash = "1ms5axpc0zg469zj4799nz3wwxi6rmmyvqj52dy03crmpj71s18l"; + propagatedBuildInputs = [ ppx_core ppx_driver ppx_here ppx_tools ]; + + meta = with stdenv.lib; { + description = "Syntax extension that makes failwith include a position"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix new file mode 100644 index 000000000000..551738573b36 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv}: + +buildOcamlJane { + name = "ppx_fields_conv"; + hash = "11w9wfjgkv7yxv3rwlwi6m193zan6rhmi45q7n3ddi2s8ls3gra7"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv ]; + + meta = with stdenv.lib; { + description = "Generation of accessor and iteration functions for ocaml records"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-here.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-here.nix new file mode 100644 index 000000000000..ea3ac5e8e5ae --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-here.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver}: + +buildOcamlJane { + name = "ppx_here"; + hash = "1mzdgn8k171zkwmbizf1a48l525ny0w3363c7gknpnifcinxniiw"; + propagatedBuildInputs = [ ppx_core ppx_driver ]; + + meta = with stdenv.lib; { + description = "A ppx rewriter that defines an extension node whose value is its source position"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix new file mode 100644 index 000000000000..d0e4c84158c7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_tools}: + +buildOcamlJane { + name = "ppx_inline_test"; + hash = "0ygapa54i0wwcj3jcqwiimrc6z0b7aafgjhbk37h6vvclnm5n7f6"; + propagatedBuildInputs = [ ppx_core ppx_driver ppx_tools ]; + + meta = with stdenv.lib; { + description = "Syntax extension for writing in-line tests in ocaml code"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix new file mode 100644 index 000000000000..1086059b19f3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix @@ -0,0 +1,22 @@ +{stdenv, buildOcamlJane, + ppx_assert, + ppx_bench, ppx_bin_prot, ppx_compare, ppx_custom_printf, ppx_driver, + ppx_enumerate, ppx_expect, ppx_fail, ppx_fields_conv, ppx_here, + ppx_inline_test, ppx_let, ppx_pipebang, ppx_sexp_conv, ppx_sexp_message, + ppx_sexp_value, ppx_typerep_conv, ppx_variants_conv}: + +buildOcamlJane { + name = "ppx_jane"; + hash = "1la0rp8fhzfglwb15gqh1pl1ld8ls4cnidaw9mjc5q1hb0yj1qd9"; + propagatedBuildInputs = + [ ppx_assert ppx_bench ppx_bin_prot ppx_compare ppx_custom_printf + ppx_driver ppx_enumerate ppx_expect ppx_fail ppx_fields_conv + ppx_here ppx_inline_test ppx_let ppx_pipebang ppx_sexp_conv + ppx_sexp_message ppx_sexp_value ppx_typerep_conv ppx_variants_conv ]; + + meta = with stdenv.lib; { + description = "A ppx_driver including all standard ppx rewriters"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-let.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-let.nix new file mode 100644 index 000000000000..8c8b87d7112e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-let.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver}: + +buildOcamlJane { + name = "ppx_let"; + hash = "0whnfq4rgkq4apfqnvc100wlk25pmqdyvy6s21dsn3fcm9hff467"; + propagatedBuildInputs = [ ppx_core ppx_driver ]; + + meta = with stdenv.lib; { + description = "A ppx rewriter for monadic and applicative let bindings and match statements"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix new file mode 100644 index 000000000000..61fa66b77cc5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix @@ -0,0 +1,15 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools}: + +buildOcamlJane { + name = "ppx_optcomp"; + hash = "09m2x2a5ics4bz1j29n5slhh1rlyhcwdfmf44v1jfxcby3f0riwd"; + propagatedBuildInputs = + [ ppx_core ppx_tools ]; + + meta = with stdenv.lib; { + description = "ppx_optcomp stands for Optional Compilation. It is a tool used to handle optional compilations of pieces of code depending of the word size, the version of the compiler, etc."; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix new file mode 100644 index 000000000000..209638f97b74 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_tools}: + +buildOcamlJane { + name = "ppx_pipebang"; + hash = "0k25bhj9ziiw89xvs4svz7cgazbbmprba9wbic2llffg55fp7acc"; + propagatedBuildInputs = [ ppx_core ppx_driver ppx_tools ]; + + meta = with stdenv.lib; { + description = "A ppx rewriter that inlines reverse application operators |> and |!"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix new file mode 100644 index 000000000000..00361ee81ebe --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv, sexplib}: + +buildOcamlJane { + name = "ppx_sexp_conv"; + hash = "1kgbmlc11w5jhbhmy5n0f734l44zwyry48342dm5qydi9sfzcgq2"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib]; + + meta = with stdenv.lib; { + description = "PPX syntax extension that generates code for converting OCaml types to and from s-expressions, as defined in the sexplib library"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix new file mode 100644 index 000000000000..2a8bf44bfab2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools}: + +buildOcamlJane { + name = "ppx_sexp_message"; + hash = "0inbff25qii868p141jb1y8n3vjfyz66jpnsl9nma6nkkyjkp05j"; + propagatedBuildInputs = [ ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools ]; + + meta = with stdenv.lib; { + description = "Easy construction of S-Expressions"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix new file mode 100644 index 000000000000..64fbe4bd9bb9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools}: + +buildOcamlJane { + name = "ppx_sexp_value"; + hash = "04602ppqfwx33ghjywam00hlqqzsz4d99r60k9q0v1mynk9pjhj0"; + propagatedBuildInputs = [ ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools ]; + + meta = with stdenv.lib; { + description = "A ppx rewriter that simplifies building S-Expression from OCaml Values"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-type-conv.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-type-conv.nix new file mode 100644 index 000000000000..bf36dfab5cb0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-type-conv.nix @@ -0,0 +1,15 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_deriving, ppx_driver, ppx_tools}: + +buildOcamlJane { + name = "ppx_type_conv"; + hash = "0gv0mqwn97dwrfm6rj442565y8dz7kiq8s8vadnhywrl7j4znqyq"; + propagatedBuildInputs = + [ ppx_core ppx_deriving ppx_driver ppx_tools ]; + + meta = with stdenv.lib; { + description = "The type_conv library factors out functionality needed by different preprocessors that generate code from type specifications"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix new file mode 100644 index 000000000000..472ec19b5588 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv, typerep}: + +buildOcamlJane { + name = "ppx_typerep_conv"; + hash = "0dldlx73r07j6w0i7h4hxly0v678naa79na5rafsk2974gs5ih9g"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv typerep ]; + + meta = with stdenv.lib; { + description = "Automatic generation of runtime types from type definitions"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix new file mode 100644 index 000000000000..1d01b0bc321d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix @@ -0,0 +1,14 @@ +{stdenv, buildOcamlJane, + ppx_core, ppx_tools, ppx_type_conv, sexplib, variantslib}: + +buildOcamlJane { + name = "ppx_variants_conv"; + hash = "0kgal8b9yh7wrd75hllb9fyl6zbksfnr9k7pykpzdm3js98dirhn"; + propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib variantslib ]; + + meta = with stdenv.lib; { + description = "Generation of accessor and iteration functions for ocaml variant types"; + maintainers = [ maintainers.maurer ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/sexplib.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/sexplib.nix new file mode 100644 index 000000000000..1bb9d489b148 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/sexplib.nix @@ -0,0 +1,18 @@ +{stdenv, buildOcamlJane, type_conv}: + +buildOcamlJane { + minimumSupportedOcamlVersion = "4.02"; + name = "sexplib"; + version = "113.33.03"; + + hash = "1klar4qw4s7bj47ig7kxz2m4j1q3c60pfppis4vxrxv15r0kfh22"; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://ocaml.janestreet.com/"; + description = "Library for serializing OCaml values to and from S-expressions"; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/typerep.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/typerep.nix new file mode 100644 index 000000000000..9ed037e52110 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/typerep.nix @@ -0,0 +1,20 @@ +{stdenv, buildOcamlJane, type_conv}: + +buildOcamlJane { + name = "typerep"; + version = "113.33.03"; + + minimumSupportedOcamlVersion = "4.00"; + + hash = "1ss34nq20vfgx8hwi5sswpmn3my9lvrpdy5dkng746xchwi33ar7"; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/typerep"; + description = "Runtime types for OCaml (beta version)"; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.ericbmerritt ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/variantslib.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/variantslib.nix new file mode 100644 index 000000000000..02e63291add2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/janestreet/variantslib.nix @@ -0,0 +1,19 @@ +{stdenv, buildOcamlJane, type_conv}: + +buildOcamlJane { + name = "variantslib"; + version = "113.33.03"; + + minimumSupportedOcamlVersion = "4.00"; + + hash = "1hv0f75msrryxsl6wfnbmhc0n8kf7qxs5f82ry3b8ldb44s3wigp"; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/variantslib"; + description = "OCaml variants as first class values"; + license = licenses.asl20; + maintainers = [ maintainers.maurer maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/Makefile.config.example.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/Makefile.config.example.patch new file mode 100644 index 000000000000..c06144a75c06 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/Makefile.config.example.patch @@ -0,0 +1,9 @@ +--- javalib-2.3-orig/Makefile.config.example 2013-10-30 08:35:30.000000000 +0100 ++++ javalib-2.3/Makefile.config.example 2014-07-06 17:32:29.799398394 +0200 +@@ -1,6 +1,3 @@ +-export OCAMLFIND_DESTDIR=$(LOCALDEST) +-export OCAMLPATH=$(LOCALDEST) +- + OCAMLC = $(FINDER) ocamlc $(FLAGS) + OCAMLOPT = $(FINDER) ocamlopt $(OPT_FLAGS) + OCAMLDOC = $(FINDER) ocamldoc diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/configure.sh.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/configure.sh.patch new file mode 100644 index 000000000000..67e019b277af --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/configure.sh.patch @@ -0,0 +1,11 @@ +--- javalib-2.3-orig/configure.sh 2013-10-30 08:35:30.000000000 +0100 ++++ javalib-2.3/configure.sh 2014-07-06 17:28:39.025066199 +0200 +@@ -44,7 +44,7 @@ + DESTDIR= + # The ocamlpath variable for the compiler to locate the locally-installed + # packages (depends on LOCALDEST) +-OCAMLPATH= ++#OCAMLPATH= + # The packages that need to be made in addition to Savalib / Sawja + MAKEDEP= + # The packages that need to be made in addition to Savalib / Sawja diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/default.nix new file mode 100644 index 000000000000..f7978cf4805e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/javalib/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchzip, which, ocaml, findlib +, camlzip, extlib +}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.04" +then throw "javalib is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-javalib-${version}"; + version = "3.2.1"; + + src = fetchzip { + url = "https://github.com/javalib-team/javalib/archive/v${version}.tar.gz"; + sha256 = "1fkdaiiza145yv0r1cm0n2hsrr0rbn6b27vs66njgv405zwn3vbn"; + }; + + buildInputs = [ which ocaml findlib ]; + + patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; + + createFindlibDestdir = true; + + preConfigure = "patchShebangs ./configure.sh"; + + configureScript = "./configure.sh"; + dontAddPrefix = "true"; + + propagatedBuildInputs = [ camlzip extlib ]; + + meta = with stdenv.lib; { + description = "A library that parses Java .class files into OCaml data structures"; + homepage = "https://javalib-team.github.io/javalib/"; + license = licenses.lgpl3; + maintainers = [ maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix new file mode 100644 index 000000000000..d7bcd201c54e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix @@ -0,0 +1,29 @@ +{ lib, buildDunePackage, fetchFromGitHub +, menhir, ppx_deriving, re, uutf, uucp, ounit2 }: + +buildDunePackage rec { + pname = "jingoo"; + version = "1.4.1"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "tategakibunko"; + repo = "jingoo"; + rev = "v${version}"; + sha256 = "16wzggwi3ri13v93mjk8w7zxwp65qmi1rnng2kpk9vffx5g1kv6f"; + }; + + buildInputs = [ menhir ]; + propagatedBuildInputs = [ ppx_deriving re uutf uucp ]; + checkInputs = [ ounit2 ]; + doCheck = true; + + + meta = with lib; { + homepage = "https://github.com/tategakibunko/jingoo"; + description = "OCaml template engine almost compatible with jinja2"; + license = licenses.mit; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jsonm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jsonm/default.nix new file mode 100644 index 000000000000..e1f09f5a4a24 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jsonm/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }: + +let version = "1.0.1"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-jsonm-${version}"; + + src = fetchurl { + url = "https://erratique.ch/software/jsonm/releases/jsonm-${version}.tbz"; + sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"; + }; + + buildInputs = [ findlib topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ uutf ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "An OCaml non-blocking streaming codec to decode and encode the JSON data format"; + homepage = "https://erratique.ch/software/jsonm"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jwto/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jwto/default.nix new file mode 100644 index 000000000000..a4cf0aae6918 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/jwto/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDunePackage, fetchFromGitHub, alcotest, cryptokit, fmt, yojson +, base64, re, ppx_deriving }: + +buildDunePackage rec { + pname = "jwto"; + version = "0.3.0"; + + minimumOCamlVersion = "4.05"; + + src = fetchFromGitHub { + owner = "sporto"; + repo = "jwto"; + rev = version; + sha256 = "1p799zk8j9c0002xzi2x7ndj1bzqf14744ampcqndrjnsi7mq71s"; + }; + + propagatedBuildInputs = + [ cryptokit fmt yojson base64 re ppx_deriving ]; + + checkInputs = [ alcotest ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/sporto/jwto"; + description = "JSON Web Tokens (JWT) for OCaml"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ Zimmi48 jtcoolen ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/kafka/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/kafka/default.nix new file mode 100644 index 000000000000..0176daeaf6c5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/kafka/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, base, cmdliner, ocaml_lwt, + rdkafka, zlib }: + +buildDunePackage rec { + pname = "kafka"; + version = "0.4"; + + src = fetchFromGitHub { + owner = "didier-wenzek"; + repo = "ocaml-kafka"; + rev = version; + sha256 = "0lb8x0wh7sf8v9mjwhq32azjz54kw49fsjfb7m76z4nhxfkjw5hy"; + }; + + buildInputs = [ base cmdliner ocaml_lwt zlib ]; + + propagatedBuildInputs = [ rdkafka zlib ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/didier-wenzek/ocaml-kafka"; + description = "OCaml bindings for Kafka"; + license = licenses.mit; + maintainers = [ maintainers.rixed ]; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ke/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ke/default.nix new file mode 100644 index 000000000000..e1b68a1d2da4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ke/default.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchurl +, bigarray-compat, fmt +, alcotest, bigstringaf +}: + +buildDunePackage rec { + pname = "ke"; + version = "0.4"; + + src = fetchurl { + url = "https://github.com/mirage/ke/releases/download/v${version}/ke-v${version}.tbz"; + sha256 = "13c9xy60vmq29mnwpg3h3zgl6gjbjfwbx1s0crfc6xwvark0zxnx"; + }; + + propagatedBuildInputs = [ bigarray-compat fmt ]; + + checkInputs = lib.optionals doCheck [ alcotest bigstringaf ]; + doCheck = true; + + minimumOCamlVersion = "4.03"; + + meta = { + description = "Fast implementation of queue in OCaml"; + homepage = "https://github.com/mirage/ke"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch new file mode 100644 index 000000000000..bf5b2184ac0a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch @@ -0,0 +1,18 @@ +diff -r 562eb6ecb8ca META +--- a/META Wed Oct 01 20:09:24 2014 +0100 ++++ b/META Wed Oct 01 20:22:15 2014 +0100 +@@ -1,6 +1,5 @@ +-description "Bindings for OpenGL" ++description="Bindings for OpenGL" + version="1.05" +-directory="+lablGL" + archive(byte) = "lablgl.cma" + archive(native) = "lablgl.cmxa" + +@@ -16,4 +15,4 @@ + requires = "lablgl" + archive(byte) = "lablglut.cma" + archive(native) = "lablglut.cmxa" +-) +\ No newline at end of file ++) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch new file mode 100644 index 000000000000..3d880c00947e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch @@ -0,0 +1,67 @@ +diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config +--- lablGL.ori/Makefile.config 1970-01-01 01:00:00.000000000 +0100 ++++ lablGL/Makefile.config 2013-06-02 08:13:10.000000000 +0200 +@@ -0,0 +1,63 @@ ++# LablGL and Togl configuration file ++# ++# Please have a look at the config/Makefile in the Objective Caml distribution, ++# or at the labltklink script to get the information needed here ++# ++ ++##### Adjust these always ++ ++# Uncomment if you have the fast ".opt" compilers ++#CAMLC = ocamlc.opt ++#CAMLOPT = ocamlopt.opt ++ ++# Where to put the lablgl script ++BINDIR = @BINDIR@ ++ ++# Where to find X headers ++XINCLUDES = @XINCLUDES@ ++# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lX11 -lXi ++ ++# Where to find Tcl/Tk headers ++# This must the same version as for LablTk ++TKINCLUDES = @TKINCLUDES@ ++# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#TKLIBS = -L/usr/local/lib -ltk84 -ltcl84 ++ ++# Where to find OpenGL/Mesa/Glut headers and libraries ++GLINCLUDES = ++GLLIBS = -lGL -lGLU ++GLUTLIBS = -lglut ++# The following libraries may be required (try to add them one at a time) ++#GLLIBS = -lGL -lGLU -lXmu -lXext -lXi -lcipher -lpthread ++ ++# How to index a library after installing (ranlib required on MacOSX) ++RANLIB = : ++#RANLIB = ranlib ++ ++##### Uncomment these for windows ++#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib ++#GLLIBS = opengl32.lib glu32.lib ++#TOOLCHAIN = msvc ++#XA = .lib ++#XB = .bat ++#XE = .exe ++#XO = .obj ++#XS = .dll ++ ++##### Adjust these if non standard ++ ++# The Objective Caml library directory ++#LIBDIR = `ocamlc -where` ++ ++# Where to put dlls (if dynamic loading available) ++DLLDIR = @DLLDIR@ ++ ++# Where to put LablGL (standard) ++INSTALLDIR = @INSTALLDIR@ ++ ++# Where is Togl (default) ++#TOGLDIR = Togl ++ ++# C Compiler options ++#COPTS = -c -O diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix new file mode 100644 index 000000000000..2172135e8d4c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix @@ -0,0 +1,45 @@ +{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } : + +let + pname = "lablgl"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "1.05"; + + src = fetchurl { + url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz"; + sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq"; + }; + + buildInputs = [ocaml findlib lablgtk freeglut camlp4]; + propagatedBuildInputs = [ libGLU libGL ]; + + patches = [ ./Makefile.config.patch ./META.patch ]; + + preConfigure = '' + substituteInPlace Makefile.config \ + --subst-var-by BINDIR $out/bin \ + --subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \ + --subst-var-by DLLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \ + --subst-var-by TKINCLUDES "" \ + --subst-var-by XINCLUDES "" + ''; + + createFindlibDestdir = true; + + buildFlags = [ "lib" "libopt" "glut" "glutopt" ]; + + postInstall = '' + cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl + ''; + + meta = with stdenv.lib; { + homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html"; + description = "OpenGL bindings for ocaml"; + license = licenses.gpl2; + maintainers = with maintainers; [ pSub vbgl ]; + broken = stdenv.isDarwin; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix new file mode 100644 index 000000000000..1dfc4305022c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }: + +stdenv.mkDerivation { + name = "ocaml-lablgtk-extras-1.4"; + src = fetchurl { + url = "http://forge.ocamlcore.org/frs/download.php/1282/lablgtkextras-1.4.tar.gz"; + sha256 = "09fqxwdib7r9yxynknc9gv3jw2hnhj5cak7q5jngk6m8rzvmhfcc"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + propagatedBuildInputs = [ config-file lablgtk xmlm ]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + homepage = "http://gtk-extras.forge.ocamlcore.org/"; + description = "A collection of libraries and modules useful when developing OCaml/LablGtk2 applications"; + license = stdenv.lib.licenses.lgpl2Plus; + branch = "1.4"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/default.nix new file mode 100644 index 000000000000..de1c1e6ea944 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk-extras/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02"; + +stdenv.mkDerivation rec { + version = "1.6"; + name = "ocaml${ocaml.version}-lablgtk-extras-${version}"; + src = fetchFromGitHub { + owner = "zoggy"; + repo = "lablgtk-extras"; + rev = "release-${version}"; + sha256 = "1bbdp5j18s582mmyd7qiaq1p08g2ag4gl7x65pmzahbhg719hjda"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + propagatedBuildInputs = [ config-file lablgtk xmlm ]; + + createFindlibDestdir = true; + + meta = { + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + homepage = "http://gtk-extras.forge.ocamlcore.org/"; + description = "A collection of libraries and modules useful when developing OCaml/LablGtk2 applications"; + license = stdenv.lib.licenses.lgpl2Plus; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix new file mode 100644 index 000000000000..eae356462b32 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview, camlp4 }: + +if stdenv.lib.versionAtLeast ocaml.version "4.04" +then throw "lablgtk-2.14 is not available for OCaml ${ocaml.version}" else + +let + pname = "lablgtk"; +in + +stdenv.mkDerivation (rec { + name = "${pname}-${version}"; + version = "2.14.0"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/561/${name}.tar.gz"; + sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview camlp4 ]; + + configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; + buildFlags = [ "world" ]; + + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib + export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH + ''; + + meta = { + branch = "2.14"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + stdenv.lib.maintainers.roconnor + ]; + homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html"; + description = "LablGTK is is an Objective Caml interface to GTK"; + license = stdenv.lib.licenses.lgpl21Plus; + }; +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix new file mode 100644 index 000000000000..2b6c3028fd6c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }: + +let param = + let check = stdenv.lib.versionAtLeast ocaml.version; in + if check "4.06" then rec { + version = "2.18.10"; + src = fetchFromGitHub { + owner = "garrigue"; + repo = "lablgtk"; + rev = version; + sha256 = "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"; + }; + } else if check "3.12" then { + version = "2.18.5"; + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1627/lablgtk-2.18.5.tar.gz"; + sha256 = "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"; + }; + } else throw "lablgtk is not available for OCaml ${ocaml.version}"; +in + +stdenv.mkDerivation { + pname = "lablgtk"; + inherit (param) version src; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview ]; + + configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; + buildFlags = [ "world" ]; + + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib + export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH + ''; + + dontStrip = true; + + meta = with stdenv.lib; { + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ + maggesi roconnor vbgl + ]; + homepage = "http://lablgtk.forge.ocamlcore.org/"; + description = "An OCaml interface to GTK"; + license = licenses.lgpl21Plus; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/default.nix new file mode 100644 index 000000000000..767e087a7f06 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, pkgconfig, buildDunePackage, gtk3, cairo2 }: + +buildDunePackage rec { + version = "3.1.1"; + pname = "lablgtk3"; + + minimumOCamlVersion = "4.05"; + + src = fetchurl { + url = "https://github.com/garrigue/lablgtk/releases/download/${version}/lablgtk3-${version}.tbz"; + sha256 = "1ygc1yh99gh44h958yffw1vxdlfpn799d4x1s36c2jfbi8f0dir2"; + }; + + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ gtk3 cairo2 ]; + + meta = { + description = "OCaml interface to GTK 3"; + homepage = "http://lablgtk.forge.ocamlcore.org/"; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix new file mode 100644 index 000000000000..be57c7e7146f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, gtkspell3, lablgtk3 }: + +buildDunePackage { + pname = "lablgtk3-gtkspell3"; + buildInputs = [ gtkspell3 ] ++ lablgtk3.buildInputs; + propagatedBuildInputs = [ lablgtk3 ]; + inherit (lablgtk3) src version meta nativeBuildInputs; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix new file mode 100644 index 000000000000..0e8ba3ef3ffe --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, gtksourceview, lablgtk3 }: + +buildDunePackage { + pname = "lablgtk3-sourceview3"; + buildInputs = lablgtk3.buildInputs ++ [ gtksourceview ]; + propagatedBuildInputs = [ lablgtk3 ]; + inherit (lablgtk3) src version meta nativeBuildInputs; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/labltk/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/labltk/default.nix new file mode 100644 index 000000000000..1c8edea66fb7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/labltk/default.nix @@ -0,0 +1,87 @@ +{ stdenv, fetchurl, fetchzip, ocaml, findlib, tcl, tk }: + +let OCamlVersionAtLeast = stdenv.lib.versionAtLeast ocaml.version; in + +if !OCamlVersionAtLeast "4.04" +then throw "labltk is not available for OCaml ${ocaml.version}" +else + +let param = + let mkNewParam = { version, sha256 }: { + inherit version; + src = fetchzip { + url = "https://github.com/garrigue/labltk/archive/${version}.tar.gz"; + inherit sha256; + }; + }; in + let mkOldParam = { version, key, sha256 }: { + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/${key}/labltk-${version}.tar.gz"; + inherit sha256; + }; + inherit version; + }; in + rec { + "4.04" = mkOldParam { + version = "8.06.2"; + key = "1628"; + sha256 = "1p97j9s33axkb4yyl0byhmhlyczqarb886ajpyggizy2br3a0bmk"; + }; + "4.05" = mkOldParam { + version = "8.06.3"; + key = "1701"; + sha256 = "1rka9jpg3kxqn7dmgfsa7pmsdwm16x7cn4sh15ijyyrad9phgdxn"; + }; + "4.06" = mkOldParam { + version = "8.06.4"; + key = "1727"; + sha256 = "0j3rz0zz4r993wa3ssnk5s416b1jhj58l6z2jk8238a86y7xqcii"; + }; + "4.07" = mkOldParam { + version = "8.06.5"; + key = "1764"; + sha256 = "0wgx65y1wkgf22ihpqmspqfp95fqbj3pldhp1p3b1mi8rmc37zwj"; + }; + _8_06_7 = mkNewParam { + version = "8.06.7"; + sha256 = "1cqnxjv2dvw9csiz4iqqyx6rck04jgylpglk8f69kgybf7k7xk2h"; + }; + "4.08" = _8_06_7; + "4.09" = _8_06_7; + "4.10" = mkNewParam { + version = "8.06.8"; + sha256 = "0lfjc7lscq81ibqb3fcybdzs2r1i2xl7rsgi7linq46a0pcpkinw"; + }; + "4.11" = mkNewParam { + version = "8.06.9"; + sha256 = "1k42k3bjkf22gk39lwwzqzfhgjyhxnclslldrzpg5qy1829pbnc0"; + }; +}.${builtins.substring 0 4 ocaml.version}; +in + +stdenv.mkDerivation rec { + inherit (param) version src; + name = "ocaml${ocaml.version}-labltk-${version}"; + + buildInputs = [ ocaml findlib tcl tk ]; + + configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ]; + dontAddPrefix = true; + + buildFlags = [ "all" "opt" ]; + + createFindlibDestdir = true; + + postInstall = '' + mkdir -p $OCAMLFIND_DESTDIR/stublibs + mv $OCAMLFIND_DESTDIR/labltk/dlllabltk.so $OCAMLFIND_DESTDIR/stublibs/ + ''; + + meta = { + description = "OCaml interface to Tcl/Tk, including OCaml library explorer OCamlBrowser"; + homepage = "http://labltk.forge.ocamlcore.org/"; + license = stdenv.lib.licenses.lgpl21; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lacaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lacaml/default.nix new file mode 100644 index 000000000000..23b38e469b4b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lacaml/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, darwin, ocaml, findlib, dune, base, stdio, lapack, blas }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.05.0"; +assert (!blas.isILP64) && (!lapack.isILP64); + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-lacaml"; + version = "11.0.6"; + + src = fetchFromGitHub { + owner = "mmottl"; + repo = "lacaml"; + rev = version; + sha256 = "1vn5441fg45d0ni9x87dhz2x4jrmvg3w7qk3vvcrd436snvh07g0"; + }; + + buildInputs = [ ocaml findlib dune base stdio ]; + propagatedBuildInputs = [ lapack blas ] ++ + stdenv.lib.optionals stdenv.isDarwin + [ darwin.apple_sdk.frameworks.Accelerate ]; + + inherit (dune) installPhase; + + meta = with stdenv.lib; { + homepage = "http://mmottl.github.io/lacaml"; + description = "OCaml bindings for BLAS and LAPACK"; + license = licenses.lgpl21Plus; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.rixed ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambda-term/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambda-term/default.nix new file mode 100644 index 000000000000..f02ff4d29962 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambda-term/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, libev, buildDunePackage, zed, lwt_log, lwt_react }: + +buildDunePackage rec { + pname = "lambda-term"; + version = "2.0.3"; + + src = fetchurl { + url = "https://github.com/ocaml-community/lambda-term/releases/download/${version}/lambda-term-${version}.tbz"; + sha256 = "1n1b3ffj41a1lm2315hh870yj9h8gg8g9jcxha6dr3xx8r84np3v"; + }; + + buildInputs = [ libev ]; + propagatedBuildInputs = [ zed lwt_log lwt_react ]; + + meta = { description = "Terminal manipulation library for OCaml"; + longDescription = '' + Lambda-term is a cross-platform library for + manipulating the terminal. It provides an abstraction for keys, + mouse events, colors, as well as a set of widgets to write + curses-like applications. + + The main objective of lambda-term is to provide a higher level + functional interface to terminal manipulation than, for example, + ncurses, by providing a native OCaml interface instead of bindings to + a C library. + + Lambda-term integrates with zed to provide text edition facilities in + console applications. + ''; + + homepage = "https://github.com/diml/lambda-term"; + license = stdenv.lib.licenses.bsd3; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambdasoup/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambdasoup/default.nix new file mode 100644 index 000000000000..f535ee78fef9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lambdasoup/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchFromGitHub, buildDunePackage, markup }: + +buildDunePackage rec { + pname = "lambdasoup"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "aantron"; + repo = pname; + rev = version; + sha256 = "14lndpsnzjjg58sdwxqpsv7kz77mnwn5658lya9jyaclj8azmaks"; + }; + + propagatedBuildInputs = [ markup ]; + + meta = { + description = "Functional HTML scraping and rewriting with CSS in OCaml"; + homepage = "https://aantron.github.io/lambdasoup/"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lens/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lens/default.nix new file mode 100644 index 000000000000..c26b3dbe7374 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lens/default.nix @@ -0,0 +1,27 @@ +{ lib, ocaml, fetchzip, ppx_deriving, ppxfind, buildDunePackage }: + +if lib.versionAtLeast ocaml.version "4.10" +then throw "lens is not available for OCaml ${ocaml.version}" +else + +buildDunePackage rec { + pname = "lens"; + version = "1.2.3"; + + src = fetchzip { + url = "https://github.com/pdonadeo/ocaml-lens/archive/v${version}.tar.gz"; + sha256 = "09k2vhzysx91syjhgv6w1shc9mgzi0l4bhwpx1g5pi4r4ghjp07y"; + }; + + minimumOCamlVersion = "4.04.1"; + buildInputs = [ ppx_deriving ppxfind ]; + + meta = with lib; { + homepage = "https://github.com/pdonadeo/ocaml-lens"; + description = "Functional lenses"; + license = licenses.bsd3; + maintainers = with maintainers; [ + kazcw + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/linenoise/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/linenoise/default.nix new file mode 100644 index 000000000000..0ad277f4a07f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/linenoise/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, result }: + +buildDunePackage rec { + pname = "linenoise"; + version = "1.3.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "fxfactorial"; + repo = "ocaml-${pname}"; + rev = "v${version}"; + sha256 = "0m9mm1arsawi5w5aqm57z41sy1wfxvhfgbdiw7hzy631i391144g"; + }; + + propagatedBuildInputs = [ result ]; + + meta = { + description = "OCaml bindings to linenoise"; + license = stdenv.lib.licenses.bsd3; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix new file mode 100644 index 000000000000..24fde437d5c3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchpatch, python, cmake, llvm, ocaml, findlib, ctypes }: + +let version = stdenv.lib.getVersion llvm; in + +stdenv.mkDerivation { + pname = "ocaml-llvm"; + inherit version; + + inherit (llvm) src; + + buildInputs = [ python cmake ocaml findlib ctypes ]; + propagatedBuildInputs = [ llvm ]; + + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/2bdc193f5a9305ea93bf0f0dfc1fbc327c8b9306/packages/llvm/llvm.7.0.0/files/fix-shared.patch"; + sha256 = "1p98j3b1vrryfn1xa7i50m6mmm4dyw5ldafq6kyh9sfmdihz4zsx"; + })]; + + cmakeFlags = [ + "-DLLVM_OCAML_OUT_OF_TREE=TRUE" + "-DLLVM_OCAML_INSTALL_PATH=${placeholder "out"}/ocaml" + "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=${stdenv.lib.getLib llvm}/lib" + ]; + + buildFlags = [ "ocaml_all" ]; + + installFlags = [ "-C" "bindings/ocaml" ]; + + postInstall = '' + mkdir -p $OCAMLFIND_DESTDIR/ + mv $out/ocaml $OCAMLFIND_DESTDIR/llvm + mv $OCAMLFIND_DESTDIR/llvm/META{.llvm,} + ''; + + passthru = { + inherit llvm; + }; + + meta = { + inherit (llvm.meta) license homepage; + platforms = ocaml.meta.platforms or []; + description = "OCaml bindings distributed with LLVM"; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/logs/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/logs/default.nix new file mode 100644 index 000000000000..50d68520fab0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/logs/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild +, topkg, result, lwt, cmdliner, fmt }: +let + pname = "logs"; + webpage = "https://erratique.ch/software/${pname}"; +in + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "logs is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "0.7.0"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg fmt cmdliner lwt ]; + propagatedBuildInputs = [ result ]; + + buildPhase = "${topkg.run} build --with-js_of_ocaml false"; + + inherit (topkg) installPhase; + + meta = with stdenv.lib; { + description = "Logging infrastructure for OCaml"; + homepage = webpage; + inherit (ocaml.meta) platforms; + maintainers = [ maintainers.sternenseemann ]; + license = licenses.isc; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lru/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lru/default.nix new file mode 100644 index 000000000000..e5c7937b27a4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lru/default.nix @@ -0,0 +1,20 @@ +{ lib, fetchurl, buildDunePackage, psq }: + +buildDunePackage rec { + pname = "lru"; + version = "0.3.0"; + + src = fetchurl { + url = "https://github.com/pqwy/lru/releases/download/v${version}/lru-v${version}.tbz"; + sha256 = "1ab9rd7cq15ml8x0wjl44wy99h5z7x4g9vkkz4i2d7n84ghy7vw4"; + }; + + propagatedBuildInputs = [ psq ]; + + meta = { + homepage = "https://github.com/pqwy/lru"; + description = "Scalable LRU caches for OCaml"; + maintainers = [ lib.maintainers.vbgl ]; + license = lib.licenses.isc; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lua-ml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lua-ml/default.nix new file mode 100644 index 000000000000..6e69bc1e5c50 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lua-ml/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.07" +then throw "lua-ml is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "lua-ml"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "lindig"; + repo = pname; + rev = "${version}"; + sha256 = "04lv98nxmzanvyn4c0k6k0ax29f5xfdl8qzpf5hwadslq213a044"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + buildFlags = [ "lib" ]; + + inherit (dune) installPhase; + + meta = { + description = "An embeddable Lua 2.5 interpreter implemented in OCaml"; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + license = stdenv.lib.licenses.bsd2; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/camlp4.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/camlp4.nix new file mode 100644 index 000000000000..fbf920d9621d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/camlp4.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildDunePackage, camlp4 }: + +buildDunePackage rec { + pname = "lwt_camlp4"; + version = "git-20180325"; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = pname; + rev = "45f25a081e01071ab566924b48ba5f7553bb33ac"; + sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9"; + }; + + minimumOCamlVersion = "4.02"; + + propagatedBuildInputs = [ camlp4 ]; + + preBuild = "rm META.lwt_camlp4"; + + meta = { + description = "Camlp4 syntax extension for Lwt (deprecated)"; + license = lib.licenses.lgpl21; + inherit (src.meta) homepage; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix new file mode 100644 index 000000000000..759f0deedf1f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchzip, pkgconfig, ncurses, libev, buildDunePackage, ocaml +, cppo, ocaml-migrate-parsetree, ocplib-endian, result +, mmap, seq +}: + +let inherit (lib) optional versionAtLeast; in + +buildDunePackage rec { + pname = "lwt"; + version = "5.3.0"; + + src = fetchzip { + url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz"; + sha256 = "15hgy3220m2b8imipa514n7l65m1h5lc6l1hanqwwvs7ghh2aqp2"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ cppo ocaml-migrate-parsetree ] + ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; + propagatedBuildInputs = [ libev mmap ocplib-endian seq result ]; + + meta = { + homepage = "https://ocsigen.org/lwt/"; + description = "A cooperative threads library for OCaml"; + maintainers = [ lib.maintainers.vbgl ]; + license = lib.licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/ppx.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/ppx.nix new file mode 100644 index 000000000000..f2707064f2af --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt/ppx.nix @@ -0,0 +1,26 @@ +{ fetchzip, buildDunePackage, lwt, ppx_tools_versioned }: + +buildDunePackage { + pname = "lwt_ppx"; + version = "2.0.1"; + + src = fetchzip { + # `lwt_ppx` has a different release cycle than Lwt, but it's included in + # one of its release bundles. + # Because there could exist an Lwt release _without_ a `lwt_ppx` release, + # this `src` field doesn't inherit from the Lwt derivation. + # + # This is particularly useful for overriding Lwt without breaking `lwt_ppx`, + # as new Lwt releases may contain broken `lwt_ppx` code. + url = "https://github.com/ocsigen/lwt/archive/5.2.0.tar.gz"; + sha256 = "1znw8ckwdmqsnrcgar4g33zgr659l4l904bllrz69bbwdnfmz2x3"; + }; + + + propagatedBuildInputs = [ lwt ppx_tools_versioned ]; + + meta = { + description = "Ppx syntax extension for Lwt"; + inherit (lwt.meta) license homepage maintainers; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_log/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_log/default.nix new file mode 100644 index 000000000000..8286ee16619d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_log/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, lwt }: + +buildDunePackage rec { + pname = "lwt_log"; + version = "1.1.1"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "aantron"; + repo = pname; + rev = version; + sha256 = "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"; + }; + + propagatedBuildInputs = [ lwt ]; + + meta = { + description = "Lwt logging library (deprecated)"; + homepage = "https://github.com/aantron/lwt_log"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_react/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_react/default.nix new file mode 100644 index 000000000000..4d82db043e8d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_react/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, lwt, react }: + +stdenv.mkDerivation rec { + version = "1.0.1"; + name = "ocaml${ocaml.version}-lwt_react-${version}"; + src = fetchzip { + url = "https://github.com/ocsigen/lwt/releases/download/3.0.0/lwt_react-1.0.1.tar.gz"; + sha256 = "1bbz7brvdskf4angzn3q2s2s6qdnx7x8m8syayysh23gwv4c7v31"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + propagatedBuildInputs = [ lwt react ]; + + createFindlibDestdir = true; + + meta = { + description = "Helpers for using React with Lwt"; + inherit (lwt.meta) homepage license maintainers; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_ssl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_ssl/default.nix new file mode 100644 index 000000000000..ade51b7da75f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/lwt_ssl/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchzip, buildDunePackage, ssl, lwt }: + +buildDunePackage rec { + pname = "lwt_ssl"; + version = "1.1.3"; + + minimumOCamlVersion = "4.02"; + + src = fetchzip { + url = "https://github.com/aantron/${pname}/archive/${version}.tar.gz"; + sha256 = "0v417ch5zn0yknj156awa5mrq3mal08pbrvsyribbn63ix6f9y3p"; + }; + + propagatedBuildInputs = [ ssl lwt ]; + + meta = { + homepage = "https://github.com/aantron/lwt_ssl"; + description = "OpenSSL binding with concurrent I/O"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix new file mode 100644 index 000000000000..991a77a6ba21 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage +, macaddr, cstruct +}: + +buildDunePackage { + pname = "macaddr-cstruct"; + + inherit (macaddr) version src minimumOCamlVersion; + + propagatedBuildInputs = [ macaddr cstruct ]; + + doCheck = true; + + meta = macaddr.meta // { + description = "A library for manipulation of MAC address representations using Cstructs"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix new file mode 100644 index 000000000000..08b486bb683a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchurl, buildDunePackage +, ppx_sexp_conv, ounit +}: + +buildDunePackage rec { + pname = "macaddr"; + version = "5.0.1"; + + minimumOCamlVersion = "4.04"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-ipaddr/archive/v${version}.tar.gz"; + sha256 = "0ffqkhmnj8l085xgl7jxhs3ld9zsd9iavdg06nnhr1i9g1aayk1b"; + }; + + checkInputs = [ ppx_sexp_conv ounit ]; + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/mirage/ocaml-ipaddr"; + description = "A library for manipulation of MAC address representations"; + license = licenses.isc; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix new file mode 100644 index 000000000000..3d0305c4be38 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage +, macaddr, ppx_sexp_conv, macaddr-cstruct, ounit +}: + +buildDunePackage { + pname = "macaddr-sexp"; + + inherit (macaddr) version src minimumOCamlVersion; + + propagatedBuildInputs = [ ppx_sexp_conv ]; + + checkInputs = [ macaddr-cstruct ounit ]; + doCheck = true; + + meta = macaddr.meta // { + description = "A library for manipulation of MAC address representations using sexp"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaque/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaque/default.nix new file mode 100644 index 000000000000..32acccd54f28 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/macaque/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, pgocaml, camlp4 }: + +stdenv.mkDerivation { + name = "ocaml-macaque-0.7.2"; + src = fetchzip { + url = "https://github.com/ocsigen/macaque/archive/0.7.2.tar.gz"; + sha256 = "14i0a8cndzndjmlkyhf31r451q99cnkndgxcj0id4qjqhdl4bmjv"; + }; + + buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + propagatedBuildInputs = [ pgocaml ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + description = "Macros for Caml Queries"; + homepage = "https://github.com/ocsigen/macaque"; + license = licenses.lgpl2; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix new file mode 100644 index 000000000000..4f3d21be71ae --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +let version = "1.0.0"; in + +stdenv.mkDerivation { + pname = "ocaml-magic-mime"; + inherit version; + + src = fetchzip { + url = "https://github.com/mirage/ocaml-magic-mime/archive/v${version}.tar.gz"; + sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib ]; + configurePlatforms = []; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/mirage/ocaml-magic-mime"; + description = "Convert file extensions to MIME types"; + platforms = ocaml.meta.platforms or []; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix new file mode 100644 index 000000000000..349cbea56071 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "magick is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-magick-0.34"; + src = fetchurl { + url = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/ImageMagick/OCaml-ImageMagick-0.34.tgz"; + sha256 = "0gn9l2qdr8gby2x8c2mb59x1kipb2plr45rbq6ymcxyi0wmzfh3q"; + }; + + nativeBuildInputs = [ which pkgconfig ]; + buildInputs = [ ocaml findlib imagemagick ]; + + createFindlibDestdir = true; + + preConfigure = "substituteInPlace Makefile --replace gcc $CC"; + + installTargets = [ "find_install" ]; + + meta = { + homepage = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/"; + description = "ImageMagick Binding for OCaml"; + license = stdenv.lib.licenses.mit; + platforms = imagemagick.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix new file mode 100644 index 000000000000..8b3525d26345 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, fetchzip, uutf }: + +buildDunePackage rec { + pname = "markup"; + version = "0.8.2"; + + src = fetchzip { + url = "https://github.com/aantron/markup.ml/archive/${version}.tar.gz"; + sha256 = "13zcrwzjmifniv3bvjbkd2ah8wwa3ld75bxh1d8hrzdvfxzh9szn"; + }; + + propagatedBuildInputs = [ uutf ]; + + meta = with lib; { + homepage = "https://github.com/aantron/markup.ml/"; + description = "A pair of best-effort parsers implementing the HTML5 and XML specifications"; + license = licenses.mit; + maintainers = with maintainers; [ + gal_bolle + ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix new file mode 100644 index 000000000000..f384704a1c4a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix @@ -0,0 +1,34 @@ +{ lib, fetchurl, buildDunePackage, opaline, ocaml +, alcotest +, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, odoc, ocaml_lwt, pandoc, re }: + +buildDunePackage rec { + pname = "mdx"; + version = "1.7.0"; + useDune2 = true; + + src = fetchurl { + url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz"; + sha256 = "0vpc30sngl3vpychrfvjwyi93mk311x3f2azlkxasgcj69fq03i7"; + }; + + nativeBuildInputs = [ cppo ]; + buildInputs = [ cmdliner ]; + propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version odoc re ]; + checkInputs = [ alcotest ocaml_lwt pandoc ]; + + doCheck = true; + + outputs = [ "bin" "lib" "out" ]; + + installPhase = '' + ${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib + ''; + + meta = { + homepage = "https://github.com/realworldocaml/mdx"; + description = "Executable OCaml code blocks inside markdown files"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix new file mode 100644 index 000000000000..23e31e75779d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild +, version ? if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02" then "20190626" else "20140422" +}@args: + +let + src = fetchurl ( + if version == "20140422" then { url = "http://cristal.inria.fr/~fpottier/menhir/menhir-20140422.tar.gz"; sha256 = "1ki1f2id6a14h9xpv2k8yb6px7dyw8cvwh39csyzj4qpzx7wia0d"; } + else if version == "20170712" then { url = "http://gallium.inria.fr/~fpottier/menhir/menhir-20170712.tar.gz"; sha256 = "006hq3bwj81j67f2k9cgzj5wr4hai8j36925p5n3sd2j01ljsj6a"; } + else if version == "20181113" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz"; sha256 = "0hl611l0gyl7b2bm7m0sk7vjz14m0i7znrnjq3gw58pylj934dx4"; } + else if version == "20190626" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20190626/archive.tar.gz"; sha256 = "0nigjnskg89knyi2zj1w211mb1pvkrwfqpz9a0qbw80k3hm8gg0h"; } + else throw ("menhir: unknown version " ++ version) + ); +in + +import ./generic.nix (args // { inherit version src; }) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix new file mode 100644 index 000000000000..71561e96cd47 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix @@ -0,0 +1,43 @@ +{ version, src, stdenv, ocaml, findlib, ocamlbuild, ... }: + +stdenv.mkDerivation { + pname = "menhir"; + inherit version; + + inherit src; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + preBuild = '' + # fix makefiles. + RM=$(type -p rm) + CHMOD=$(type -p chmod) + for f in src/Makefile demos/OMakefile* demos/Makefile* + do + substituteInPlace $f \ + --replace /bin/rm $RM \ + --replace /bin/chmod $CHMOD + done + + export PREFIX=$out + ''; + + meta = with stdenv.lib; { + homepage = "http://pauillac.inria.fr/~fpottier/menhir/"; + description = "A LR(1) parser generator for OCaml"; + longDescription = '' + Menhir is a LR(1) parser generator for the Objective Caml programming + language. That is, Menhir compiles LR(1) grammar specifications down + to OCaml code. Menhir was designed and implemented by François Pottier + and Yann Régis-Gianas. + ''; + license = with licenses; [ + (if versionAtLeast version "20170418" then gpl2 else qpl) /* generator */ + lgpl2 /* library */ + ]; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ maggesi ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/merlin-extend/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/merlin-extend/default.nix new file mode 100644 index 000000000000..752fbc039fa2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/merlin-extend/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchurl, cppo }: + +buildDunePackage rec { + pname = "merlin-extend"; + version = "0.6"; + + src = fetchurl { + url = "https://github.com/let-def/merlin-extend/releases/download/v${version}/merlin-extend-v${version}.tbz"; + sha256 = "0hvc4mz92x3rl2dxwrhvhzwl4gilnyvvwcqgr45vmdpyjyp3dwn2"; + }; + + buildInputs = [ cppo ]; + + meta = with lib; { + homepage = "https://github.com/let-def/merlin-extend"; + description = "SDK to extend Merlin"; + license = licenses.mit; + maintainers = [ maintainers.volth ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/default.nix new file mode 100644 index 000000000000..893b667f8364 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchurl, buildDunePackage, alcotest, fmt }: + +buildDunePackage rec { + pname = "metrics"; + version = "0.1.0"; + + minimumOCamlVersion = "4.04"; + + src = fetchurl { + url = "https://github.com/mirage/metrics/releases/download/${version}/metrics-${version}.tbz"; + sha256 = "0jy88anrx3rh19046rrbrjmx922zvz3wlqkk8asilqv9pbvpnp1a"; + }; + + propagatedBuildInputs = [ fmt ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + description = "Metrics infrastructure for OCaml"; + homepage = "https://github.com/mirage/metrics"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/lwt.nix new file mode 100644 index 000000000000..47b91e430c65 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/lwt.nix @@ -0,0 +1,14 @@ +{ buildDunePackage, ocaml_lwt, metrics }: + +buildDunePackage { + pname = "metrics-lwt"; + + inherit (metrics) version src; + + propagatedBuildInputs = [ ocaml_lwt metrics ]; + + meta = metrics.meta // { + description = "Lwt backend for the Metrics library"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/unix.nix new file mode 100644 index 000000000000..45a92f108038 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/metrics/unix.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, gnuplot, ocaml_lwt, metrics, metrics-lwt, mtime, uuidm }: + +buildDunePackage rec { + + pname = "metrics-unix"; + + inherit (metrics) version src; + + propagatedBuildInputs = [ gnuplot ocaml_lwt metrics mtime uuidm ]; + + checkInputs = lib.optional doCheck metrics-lwt; + + doCheck = true; + + meta = metrics.meta // { + description = "Unix backend for the Metrics library"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/minisat/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/minisat/default.nix new file mode 100644 index 000000000000..9a02f57cc385 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/minisat/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchFromGitHub }: + +buildDunePackage rec { + pname = "minisat"; + version = "0.2"; + + minimumOCamlVersion = "4.05"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "ocaml-minisat"; + rev = version; + sha256 = "1jibylmb1ww0x42n6wl8bdwicaysgxp0ag244x7w5m3jifq3xs6q"; + }; + + meta = { + homepage = "https://c-cube.github.io/ocaml-minisat/"; + description = "Simple bindings to Minisat-C"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ mgttlinger ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/default.nix new file mode 100644 index 000000000000..c5f0b1fc93c1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "mirage-clock"; + version = "3.0.1"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-clock/releases/download/v${version}/mirage-clock-v${version}.tbz"; + sha256 = "12m2dph69r843clrbcgfjj2gcxmq2kdb7g5d91kfj16g13b0vsa3"; + }; + + meta = { + description = "Libraries and module types for portable clocks"; + homepage = "https://github.com/mirage/mirage-clock"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/unix.nix new file mode 100644 index 000000000000..5918d89221f2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-clock/unix.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, mirage-clock }: + +buildDunePackage { + pname = "mirage-clock-unix"; + + inherit (mirage-clock) version src; + + propagatedBuildInputs = [ mirage-clock ]; + + meta = mirage-clock.meta // { + description = "Unix-based implementation for the MirageOS Clock interface"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/default.nix new file mode 100644 index 000000000000..e178e066a384 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, pkg-config }: + +buildDunePackage rec { + minimumOCamlVersion = "4.08"; + + pname = "mirage-crypto"; + version = "0.8.5"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz"; + sha256 = "0l6q0z5ghhy0djfscb2i2xg4dpmxs4xkwh16kc473cmb4hsxsmyk"; + }; + + useDune2 = true; + + doCheck = true; + checkInputs = [ ounit ]; + + nativeBuildInputs = [ dune-configurator pkg-config ]; + propagatedBuildInputs = [ cstruct eqaf ]; + + meta = with lib; { + homepage = "https://github.com/mirage/mirage-crypto"; + description = "Simple symmetric cryptography for the modern age"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/pk.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/pk.nix new file mode 100644 index 000000000000..d6c4d494510d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/pk.nix @@ -0,0 +1,19 @@ +{ buildDunePackage, ounit, randomconv, mirage-crypto, mirage-crypto-rng +, cstruct, sexplib, ppx_sexp_conv, zarith, eqaf, rresult, gmp }: + +buildDunePackage { + pname = "mirage-crypto-pk"; + + inherit (mirage-crypto) version src useDune2 minimumOCamlVersion; + + buildInputs = [ gmp ]; + propagatedBuildInputs = [ cstruct mirage-crypto mirage-crypto-rng + zarith eqaf rresult sexplib ppx_sexp_conv ]; + + doCheck = true; + checkInputs = [ ounit randomconv ]; + + meta = mirage-crypto.meta // { + description = "Simple public-key cryptography for the modern age"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix new file mode 100644 index 000000000000..473704d7ea22 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, mirage-crypto-rng, duration, cstruct, mirage-runtime +, mirage-time, mirage-clock, mirage-unix, mirage-time-unix, mirage-clock-unix }: + +buildDunePackage { + pname = "mirage-crypto-rng-mirage"; + + inherit (mirage-crypto-rng) version src useDune2 minimumOCamlVersion; + + doCheck = true; + checkInputs = [ mirage-unix mirage-clock-unix mirage-time-unix ]; + + propagatedBuildInputs = [ duration cstruct mirage-crypto-rng mirage-runtime + mirage-time mirage-clock ]; + + meta = mirage-crypto-rng.meta // { + description = "Entropy collection for a cryptographically secure PRNG"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng.nix new file mode 100644 index 000000000000..b4da06816351 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-crypto/rng.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, mirage-crypto, ounit, randomconv, dune-configurator +, cstruct, duration, logs, mtime, ocaml_lwt }: + +buildDunePackage { + pname = "mirage-crypto-rng"; + + inherit (mirage-crypto) version src useDune2 minimumOCamlVersion; + + doCheck = true; + checkInputs = [ ounit randomconv ]; + + nativeBuildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ cstruct mirage-crypto duration logs mtime ocaml_lwt ]; + + meta = mirage-crypto.meta // { + description = "A cryptographically secure PRNG"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-device/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-device/default.nix new file mode 100644 index 000000000000..d86d133dedb6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-device/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl, fmt, ocaml_lwt }: + +buildDunePackage rec { + pname = "mirage-device"; + version = "2.0.0"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-device/releases/download/v${version}/mirage-device-v${version}.tbz"; + sha256 = "18alxyi6wlxqvb4lajjlbdfkgcajsmklxi9xqmpcz07j51knqa04"; + }; + + propagatedBuildInputs = [ fmt ocaml_lwt ]; + + meta = { + description = "Abstract devices for MirageOS"; + homepage = "https://github.com/mirage/mirage-device"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/combinators.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/combinators.nix new file mode 100644 index 000000000000..2ad6e5b0b974 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/combinators.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, mirage-flow, fmt, ocaml_lwt, logs, cstruct, mirage-clock }: + +buildDunePackage { + pname = "mirage-flow-combinators"; + + inherit (mirage-flow) version src; + + propagatedBuildInputs = [ ocaml_lwt logs cstruct mirage-clock mirage-flow ]; + + meta = mirage-flow.meta // { + description = "Flow implementations and combinators for MirageOS specialized to lwt"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix new file mode 100644 index 000000000000..25bb5e0f32d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fetchurl, cstruct, fmt, ocaml_lwt }: + +buildDunePackage rec { + pname = "mirage-flow"; + version = "2.0.1"; + + minimumOCamlVersion = "4.05"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-flow/releases/download/v${version}/mirage-flow-v${version}.tbz"; + sha256 = "13v05x34six0z6bc2is8qhvbxk4knxh80ardi5x4rl738vlq3mn9"; + }; + + propagatedBuildInputs = [ cstruct fmt ocaml_lwt ]; + + meta = { + description = "Flow implementations and combinators for MirageOS"; + homepage = "https://github.com/mirage/mirage-flow"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/unix.nix new file mode 100644 index 000000000000..7a20ca87f8f3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/unix.nix @@ -0,0 +1,17 @@ +{ buildDunePackage, fmt, logs, mirage-flow, ocaml_lwt, cstruct +, alcotest, mirage-flow-combinators }: + +buildDunePackage { + pname = "mirage-flow-unix"; + + inherit (mirage-flow) version src; + + propagatedBuildInputs = [ fmt logs mirage-flow ocaml_lwt cstruct ]; + + doCheck = true; + checkInputs = [ alcotest mirage-flow-combinators ]; + + meta = mirage-flow.meta // { + description = "Flow implementations and combinators for MirageOS on Unix"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-protocols/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-protocols/default.nix new file mode 100644 index 000000000000..47a534c21699 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-protocols/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl, duration, ipaddr, mirage-device, mirage-flow }: + +buildDunePackage rec { + pname = "mirage-protocols"; + version = "4.0.1"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-protocols/releases/download/v${version}/mirage-protocols-v${version}.tbz"; + sha256 = "188m8x6xdw1bllwrpa8f8bqbdqy20kjfk7q8p8jf8j0daf7kl3mi"; + }; + + propagatedBuildInputs = [ duration ipaddr mirage-device mirage-flow ]; + + meta = { + description = "MirageOS signatures for network protocols"; + homepage = "https://github.com/mirage/mirage-protocols"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-random/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-random/default.nix new file mode 100644 index 000000000000..535c9286948e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-random/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchurl, cstruct }: + +buildDunePackage rec { + pname = "mirage-random"; + version = "2.0.0"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-random/releases/download/v${version}/mirage-random-v${version}.tbz"; + sha256 = "0qj41d5smkkkbjwsnz71bhhj94d2cwv53rf3j4rhky0pqbkidnv1"; + }; + + propagatedBuildInputs = [ cstruct ]; + + meta = { + description = "Random signatures for MirageOS"; + homepage = "https://github.com/mirage/mirage-random"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-stack/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-stack/default.nix new file mode 100644 index 000000000000..57e0f99ab1b6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-stack/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchurl, mirage-protocols }: + +buildDunePackage rec { + pname = "mirage-stack"; + version = "2.2.0"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-stack/releases/download/v${version}/mirage-stack-v${version}.tbz"; + sha256 = "1qhi0ghcj4j3hw7yqn085ac6n18b6b66z5ih3k8p79m4cvn7cdq0"; + }; + + propagatedBuildInputs = [ mirage-protocols ]; + + meta = { + description = "MirageOS signatures for network stacks"; + homepage = "https://github.com/mirage/mirage-stack"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix new file mode 100644 index 000000000000..b98fd3b6279c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl, ocaml_lwt }: + +buildDunePackage rec { + minimumOCamlVersion = "4.06"; + + pname = "mirage-time"; + version = "2.0.1"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-time/releases/download/v${version}/mirage-time-v${version}.tbz"; + sha256 = "1w6mm4g7fc19cs0ncs0s9fsnb1k1s04qqzs9bsqvq8ngsb90cbh0"; + }; + + propagatedBuildInputs = [ ocaml_lwt ]; + + meta = with lib; { + homepage = "https://github.com/mirage/mirage-time"; + description = "Time operations for MirageOS"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/unix.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/unix.nix new file mode 100644 index 000000000000..da5326bc0751 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-time/unix.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, fetchurl, mirage-time, ocaml_lwt, duration }: + +buildDunePackage { + pname = "mirage-time-unix"; + + inherit (mirage-time) src version minimumOCamlVersion; + + propagatedBuildInputs = [ mirage-time ocaml_lwt duration ]; + + meta = mirage-time.meta // { + description = "Time operations for MirageOS on Unix"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-unix/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-unix/default.nix new file mode 100644 index 000000000000..696181f7f602 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage-unix/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchurl, ocaml_lwt, duration, mirage-runtime, io-page-unix }: + +buildDunePackage rec { + pname = "mirage-unix"; + version = "4.0.0"; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0kyd83bkpjhn382b4mw3a4325xr8vms78znxqvifpcyfvfnlx7hj"; + }; + + propagatedBuildInputs = [ ocaml_lwt duration mirage-runtime io-page-unix ]; + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/mirage/mirage-unix"; + description = "Unix core platform libraries for MirageOS"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix new file mode 100644 index 000000000000..816e85d3c9ac --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage, fetchurl, ipaddr, functoria-runtime +, fmt, logs, ocaml_lwt, alcotest }: + +buildDunePackage rec { + pname = "mirage-runtime"; + version = "3.8.1"; + + minimumOCamlVersion = "4.06"; + + src = fetchurl { + url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-v${version}.tbz"; + sha256 = "1sx9df041jb2rdrsibybifhml6h6kpzw9d2bw6vvv0ml500070ww"; + }; + + propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs ocaml_lwt ]; + checkInputs = [ alcotest ]; + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/mirage/mirage"; + description = "The base MirageOS runtime library, part of every MirageOS unikernel"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/META b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/META new file mode 100644 index 000000000000..e132e179b33f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/META @@ -0,0 +1,7 @@ +name="gmp" +version="@VERSION@" +description="bindings to GNU MP library" +archive(byte)="gmp.cma" +archive(native)="gmp.cmxa" +requires="" + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/default.nix new file mode 100644 index 000000000000..c37c5bd78114 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmp/default.nix @@ -0,0 +1,39 @@ +{stdenv, fetchurl, ocaml, findlib, gmp, mpfr, ncurses }: + +if stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "mlgmp is not available for OCaml ${ocaml.version}" else + +let + pname = "mlgmp"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "20120224"; + + src = fetchurl { + url = "http://www-verimag.imag.fr/~monniaux/download/${pname}_${version}.tar.gz"; + sha256 = "3ce1a53fa452ff5a9ba618864d3bc46ef32190b57202d1e996ca7df837ad4f24"; + }; + + makeFlags = [ + "DESTDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/gmp" + ]; + + preConfigure = "make clean"; + buildInputs = [ocaml findlib gmp mpfr ncurses]; + + createFindlibDestdir = true; + + propagatedbuildInputs = [gmp mpfr ncurses]; + + postInstall = '' + cp ${./META} $out/lib/ocaml/${ocaml.version}/site-lib/gmp/META + ''; + + meta = { + homepage = "http://opam.ocamlpro.com/pkg/mlgmp.20120224.html"; + description = "OCaml bindings to GNU MP library"; + license = "Free software ?"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix new file mode 100644 index 000000000000..66672f8ea1a6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, perl, ocaml, findlib, camlidl, gmp, mpfr }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-mlgmpidl-${version}"; + version = "1.2.12"; + src = fetchFromGitHub { + owner = "nberth"; + repo = "mlgmpidl"; + rev = version; + sha256 = "17xqiclaqs4hmnb92p9z6z9a1xfr31vcn8nlnj8ykk57by31vfza"; + }; + + buildInputs = [ perl gmp mpfr ocaml findlib camlidl ]; + + prefixKey = "-prefix "; + configureFlags = [ + "--gmp-prefix ${gmp.dev}" + "--mpfr-prefix ${mpfr.dev}" + ]; + + postConfigure = '' + sed -i Makefile \ + -e 's|^ /bin/rm | rm |' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs + ''; + + + meta = { + description = "OCaml interface to the GMP library"; + homepage = "https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/"; + license = stdenv.lib.licenses.lgpl21; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mmap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mmap/default.nix new file mode 100644 index 000000000000..8ae1f4a9d47c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mmap/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "mmap"; + version = "1.1.0"; + + src = fetchurl { + url = "https://github.com/mirage/mmap/releases/download/v${version}/mmap-v${version}.tbz"; + sha256 = "0l6waidal2n8mkdn74avbslvc10sf49f5d889n838z03pra5chsc"; + }; + + meta = { + homepage = "https://github.com/mirage/mmap"; + description = "Function for mapping files in memory"; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mparser/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mparser/default.nix new file mode 100644 index 000000000000..786cc1e27ac8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mparser/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-mparser-1.2.3"; + src = fetchzip { + url = "https://github.com/cakeplus/mparser/archive/1.2.3.tar.gz"; + sha256 = "1f8vpagmv0jdm50pxs2xwh2xcmvgaprx4kw871hlml9ahsflxgnw"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + configurePhase = "ocaml setup.ml -configure"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = { + description = "A simple monadic parser combinator OCaml library"; + license = stdenv.lib.licenses.lgpl21Plus; + homepage = "https://github.com/cakeplus/mparser"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mstruct/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mstruct/default.nix new file mode 100644 index 000000000000..ae26f879ef8c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mstruct/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, cstruct }: + +buildDunePackage rec { + pname = "mstruct"; + version = "1.4.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-${pname}"; + rev = "v${version}"; + sha256 = "1p4ygwzs3n1fj4apfib0z0sabpph21bkq1dgjk4bsa59pq4prncm"; + }; + + propagatedBuildInputs = [ cstruct ]; + + meta = { + description = "A thin mutable layer on top of cstruct"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mtime/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mtime/default.nix new file mode 100644 index 000000000000..2f8545988d8b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mtime/default.nix @@ -0,0 +1,41 @@ +{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml +, jsooSupport ? lib.versionAtLeast ocaml.version "4.03" +}: + +with lib; + +let param = + if versionAtLeast ocaml.version "4.03" + then { + version = "1.2.0"; + sha256 = "0zm1jvqkz3ghznfsm3bbv9q2zinp9grggdf7k9phjazjvny68xb8"; + } else { + version = "0.8.4"; + sha256 = "1adm8sc3lkjly99hyi5gqnxas748k7h62ljgn8x423nkn8gyp8dh"; + }; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-mtime-${param.version}"; + + src = fetchurl { + url = "https://erratique.ch/software/mtime/releases/mtime-${param.version}.tbz"; + inherit (param) sha256; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg ] + ++ stdenv.lib.optional jsooSupport js_of_ocaml; + + buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}"; + + inherit (topkg) installPhase; + + meta = { + description = "Monotonic wall-clock time for OCaml"; + homepage = "https://erratique.ch/software/mtime"; + inherit (ocaml.meta) platforms; + maintainers = [ maintainers.vbgl ]; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix new file mode 100644 index 000000000000..267aa17e9e42 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, ounit }: + +buildDunePackage rec { + pname = "mustache"; + version = "3.1.0"; + src = fetchFromGitHub { + owner = "rgrinberg"; + repo = "ocaml-mustache"; + rev = "v${version}"; + sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py"; + }; + + buildInputs = [ ezjsonm ]; + propagatedBuildInputs = [ menhir ]; + + doCheck = true; + checkInputs = [ ounit ]; + + meta = { + description = "Mustache logic-less templates in OCaml"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mysql/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mysql/default.nix new file mode 100644 index 000000000000..f9ebb36f40e8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/mysql/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, libmysqlclient }: + +# TODO: la versione stabile da' un errore di compilazione dovuto a +# qualche cambiamento negli header .h +# TODO: compilazione di moduli dipendenti da zip, ssl, tcl, gtk, gtk2 + +let + pname = "ocaml-mysql"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "1.2.1"; + + src = fetchurl { + url = "http://ygrek.org.ua/p/release/ocaml-mysql/${name}.tar.gz"; + sha256 = "06mb2bq7v37wn0lza61917zqgb4bsg1xxb73myjyn88p6khl6yl2"; + }; + + configureFlags = [ + "--prefix=$out" + "--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql" + ]; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + propagatedBuildInputs = [ libmysqlclient ]; + + patches = [ + (fetchpatch { + url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch"; + sha256 = "0018s2wcrvbsw9yaqmwq500qmikwffrgdp5xg9b8v7ixhd4gi6hn"; + }) + ]; + + meta = { + homepage = "http://ocaml-mysql.forge.ocamlcore.org"; + description = "Bindings for interacting with MySQL databases from ocaml"; + license = stdenv.lib.licenses.lgpl21Plus; + maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix new file mode 100644 index 000000000000..263fdc0bbda5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -0,0 +1,67 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, topkg +, cpuid, ocb-stubblr, sexplib +, cstruct, zarith, ppx_sexp_conv, ppx_deriving, writeScriptBin +, cstruct-lwt ? null +}: + +with stdenv.lib; +let + withLwt = cstruct-lwt != null; + # the build system will call 'cc' with no way to override + # this is wrong when we're cross-compiling, so insert a wrapper + cc-wrapper = writeScriptBin "cc" '' + set -e + $CC "$@" + ''; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-nocrypto-${version}"; + version = "0.5.4"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-nocrypto/releases/download/v${version}/nocrypto-${version}.tbz"; + sha256 = "0zshi9hlhcz61n5z1k6fx6rsi0pl4xgahsyl2jp0crqkaf3hqwlg"; + }; + + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0001-add-missing-runtime-dependencies-in-_tags.patch"; + sha256 = "1asybwj3rl07b4q4cxwy80a7j17j0i5vzz77p38hymilhc2ky7xn"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch"; + sha256 = "0zmp64n5fgkawpkyw0vv0bg0i2c3xbsxqy17vwy92nf5rbardi1r"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0003-Auto-detect-ppx_sexp_conv-runtime-library.patch"; + sha256 = "0lngbg5gyd5gs56lbjh6g86cps1y8x1xsqzi0vi1v28al1gn5dhw"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0004-pack-package-workaround-ocamlbuild-272.patch"; + sha256 = "16k0w78plvqhl17qiqq1mckxhhcdysqgs94l54a1bn0l6fx3rvb9"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0005-use-modern-cstruct-findlib.patch"; + sha256 = "021k38zbdidw6g7j4vjxlnbsrnzq07bnavxzdjq23nbwlifs2nq9"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/nocrypto/nocrypto.0.5.4-1/files/0006-explicit-dependency-on-sexplib.patch"; + sha256 = "15kd0qgi96yxr3qkmaqny591l0s6qmwpprxd5xdx9qwv72hq813z"; + }) + ]; + + nativeBuildInputs = [ ocaml findlib ocamlbuild cc-wrapper ]; + buildInputs = [ ocamlbuild findlib topkg cpuid ocb-stubblr ]; + propagatedBuildInputs = [ cstruct ppx_deriving ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt; + + buildPhase = "${topkg.buildPhase} --accelerate false --with-lwt ${boolToString withLwt}"; + inherit (topkg) installPhase; + + meta = { + homepage = "https://github.com/mirleft/ocaml-nocrypto"; + description = "Simplest possible crypto to support TLS"; + license = stdenv.lib.licenses.bsd2; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix new file mode 100644 index 000000000000..150edb3174c4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromBitbucket, buildDunePackage }: + +buildDunePackage rec { + pname = "nonstd"; + version = "0.0.3"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromBitbucket { + owner = "smondet"; + repo = pname; + rev = "${pname}.${version}"; + sha256 = "0ccjwcriwm8fv29ij1cnbc9win054kb6pfga3ygzdbjpjb778j46"; + }; + + doCheck = true; + + meta = with lib; { + homepage = https://bitbucket.org/smondet/nonstd; + description = "Non-standard mini-library"; + license = licenses.isc; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/notty/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/notty/default.nix new file mode 100644 index 000000000000..420e632b99e5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/notty/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr +, result, uucp, uuseg, uutf +, lwt ? null }: + +with stdenv.lib; + +if !versionAtLeast ocaml.version "4.05" +then throw "notty is not available for OCaml ${ocaml.version}" +else + +let withLwt = lwt != null; in + +stdenv.mkDerivation rec { + version = "0.2.2"; + name = "ocaml${ocaml.version}-notty-${version}"; + + src = fetchurl { + url = "https://github.com/pqwy/notty/releases/download/v${version}/notty-${version}.tbz"; + sha256 = "1y3hx8zjri3x50nyiqal5gak1sw54gw3xssrqbj7srinvkdmrz1q"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ]; + propagatedBuildInputs = [ result uucp uuseg uutf ] ++ + optional withLwt lwt; + + buildPhase = topkg.buildPhase + + " --with-lwt ${boolToString withLwt}"; + + inherit (topkg) installPhase; + + meta = { + homepage = "https://github.com/pqwy/notty"; + inherit (ocaml.meta) platforms; + description = "Declarative terminal graphics for OCaml"; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/npy/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/npy/default.nix new file mode 100644 index 000000000000..87fd72b7567a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/npy/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchFromGitHub, numpy, camlzip }: + +buildDunePackage rec { + pname = "npy"; + version = "unstable-2019-04-02"; + + minimumOCamlVersion = "4.06"; + + src = fetchFromGitHub { + owner = "LaurentMazare"; + repo = "${pname}-ocaml"; + rev = "c051086bfea6bee58208098bcf1c2f725a80a1fb"; + sha256 = "06mgrnm7xiw2lhqvbdv2zmd65sqfdnjd7j4qmcswanmplm17yhvb"; + }; + + propagatedBuildInputs = [ camlzip ]; + checkInputs = [ numpy ]; + + doCheck = true; + + meta = with lib; { + inherit (src.meta) homepage; + description = "OCaml implementation of the Npy format spec"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/default.nix new file mode 100644 index 000000000000..022b7af9629d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, fetchFromGitHub, fetchpatch, ocaml, findlib, withStatic ? false }: + +stdenv.mkDerivation rec { + version = "1.1"; + name = "ocaml${ocaml.version}-num-${version}"; + src = fetchFromGitHub { + owner = "ocaml"; + repo = "num"; + rev = "v${version}"; + sha256 = "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"; + }; + + patches = [ (fetchpatch { + url = "https://github.com/ocaml/num/commit/6d4c6d476c061298e6385e8a0864f083194b9307.patch"; + sha256 = "18zlvb5n327q8y3c52js5dvyy29ssld1l53jqng8m9w1k24ypi0b"; + }) + ] ++ lib.optional withStatic ./enable-static.patch; + + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + + meta = { + description = "Legacy Num library for arbitrary-precision integer and rational arithmetic"; + license = stdenv.lib.licenses.lgpl21; + inherit (ocaml.meta) platforms; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/enable-static.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/enable-static.patch new file mode 100644 index 000000000000..be3ca197f4ec --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/num/enable-static.patch @@ -0,0 +1,12 @@ +diff -u a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -45,7 +45,7 @@ + endif + + libnums.$(A): $(COBJS) +- $(OCAMLMKLIB) -oc nums $(COBJS) ++ $(OCAMLMKLIB) -custom -oc nums $(COBJS) + + nums.cma: $(CMOS) + $(OCAMLMKLIB) -o nums -oc nums -linkall $(CMOS) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/META.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/META.patch new file mode 100644 index 000000000000..ba6e5927b00a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/META.patch @@ -0,0 +1,16 @@ +diff -Naur cairo-ocaml-1.2.0.ori/META cairo-ocaml-1.2.0/META +--- cairo-ocaml-1.2.0.ori/META 1970-01-01 01:00:00.000000000 +0100 ++++ cairo-ocaml-1.2.0/META 2013-06-04 03:31:32.000000000 +0200 +@@ -0,0 +1,12 @@ ++name = "cairo-ocaml" ++description = "Bindings to the cairo library." ++version = "@VERSION@" ++archive(byte) = "cairo.cma" ++archive(native) = "cairo.cmxa" ++requires = "bigarray" ++ ++package "lablgtk2" ( ++ requires = "cairo lablgtk2" ++ archive(byte) = "cairo_lablgtk.cma" ++ archive(native) = "cairo_lablgtk.cmxa" ++) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/default.nix new file mode 100644 index 000000000000..fdb225ba8e8d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-cairo/default.nix @@ -0,0 +1,49 @@ +{stdenv, fetchurl, automake, ocaml, autoconf, gnum4, pkgconfig, freetype, lablgtk, unzip, cairo, findlib, gdk-pixbuf, gtk2, pango }: + +let + pname = "ocaml-cairo"; +in + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "1.2.0"; + + src = fetchurl { + url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip"; + sha256 = "0l4p9bp6kclr570mxma8wafibr1g5fsjj8h10yr4b507g0hmlh0l"; + }; + + patches = [ ./META.patch ]; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml automake gnum4 autoconf unzip + findlib freetype lablgtk cairo gdk-pixbuf gtk2 pango ]; + + createFindlibDestdir = true; + + preConfigure = '' + aclocal -I support + autoconf + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib gtk+ pango`" + export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 + cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/pango.ml ./src + cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/gaux.ml ./src + ''; + + postInstall = '' + cp META $out/lib/ocaml/${ocaml.version}/site-lib/cairo/ + ''; + + makeFlags = [ "INSTALLDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/cairo" ]; + + meta = { + homepage = "http://cairographics.org/cairo-ocaml"; + description = "ocaml bindings for cairo library"; + license = stdenv.lib.licenses.gpl2; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/default.nix new file mode 100644 index 000000000000..ba571b32084e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchurl, buildDunePackage, cppo, gettext, fileutils, ounit }: + +buildDunePackage rec { + pname = "gettext"; + version = "0.4.2"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/gildor478/ocaml-gettext/releases/download/v${version}/gettext-v${version}.tbz"; + sha256 = "19ynsldb21r539fiwz1f43apsdnx7hj2a2d9qr9wg2hva9y2qrwb"; + }; + + buildInputs = [ cppo ]; + + propagatedBuildInputs = [ gettext fileutils ]; + + doCheck = true; + + checkInputs = [ ounit ]; + + dontStrip = true; + + meta = with lib; { + description = "OCaml Bindings to gettext"; + homepage = "https://github.com/gildor478/ocaml-gettext"; + license = licenses.lgpl21; + maintainers = [ maintainers.volth ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix new file mode 100644 index 000000000000..b18c0abc530b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, ocaml_gettext, ounit }: + +buildDunePackage rec { + + pname = "gettext-stub"; + + inherit (ocaml_gettext) src version meta; + + propagatedBuildInputs = [ ocaml_gettext ]; + + doCheck = true; + + checkInputs = lib.optional doCheck ounit; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix new file mode 100644 index 000000000000..026aeb220e56 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchgit, libvirt, autoconf, ocaml, findlib }: + +stdenv.mkDerivation rec { + pname = "ocaml-libvirt"; + rev = "bab7f84ade84ceaddb08b6948792d49b3d04b897"; + version = "0.6.1.4.2017-11-08-unstable"; # libguestfs-1.34+ needs ocaml-libvirt newer than the latest release 0.6.1.4 + + src = fetchgit { + url = "git://git.annexia.org/git/ocaml-libvirt.git"; + rev = rev; + sha256 = "0vxgx1n58fp4qmly6i5zxiacr7303127d6j78a295xin1p3a8xcw"; + }; + + propagatedBuildInputs = [ libvirt ]; + + nativeBuildInputs = [ autoconf findlib ]; + + buildInputs = [ ocaml ]; + + createFindlibDestdir = true; + + preConfigure = '' + autoconf + ''; + + buildPhase = "make all opt CPPFLAGS=-Wno-error"; + + installPhase = "make install-opt"; + + meta = with stdenv.lib; { + description = "OCaml bindings for libvirt"; + homepage = "https://libvirt.org/ocaml/"; + license = licenses.gpl2; + maintainers = [ maintainers.volth ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix new file mode 100644 index 000000000000..bcd0a519899c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, buildDunePackage, result, ppx_derivers }: + +buildDunePackage rec { + pname = "ocaml-migrate-parsetree"; + version = "1.7.3"; + + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = pname; + rev = "v${version}"; + sha256 = "0336vz0galjnsazbmkxjwdv1qvdqsx2rgrvp778xgq2fzasz45cx"; + }; + + propagatedBuildInputs = [ ppx_derivers result ]; + + meta = { + description = "Convert OCaml parsetrees between different major versions"; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-monadic/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-monadic/default.nix new file mode 100644 index 000000000000..0420e95b12b9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-monadic/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchFromGitHub, buildDunePackage +, ocaml-migrate-parsetree, ppx_tools_versioned +}: + +buildDunePackage rec { + pname = "ocaml-monadic"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "zepalmer"; + repo = pname; + rev = version; + sha256 = "1zcwydypk5vwfn1g7srnl5076scwwq5a5y8xwcjl70pc4cpzszll"; + }; + + buildInputs = [ ppx_tools_versioned ]; + propagatedBuildInputs = [ ocaml-migrate-parsetree ]; + + meta = { + inherit (src.meta) homepage; + description = "A PPX extension to provide an OCaml-friendly monadic syntax"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-protoc/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-protoc/default.nix new file mode 100644 index 000000000000..1ef7b6c2d40b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-protoc/default.nix @@ -0,0 +1,38 @@ +{ stdenv, ocaml, fetchFromGitHub, ocamlbuild, findlib, ppx_deriving_protobuf }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocaml-protoc-${version}"; + version = "1.2.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mransan"; + repo = "ocaml-protoc"; + rev = "60d2d4dd55f73830e1bed603cc44d3420430632c"; + sha256 = "1d1p8ch723z2qa9azmmnhbcpwxbpzk3imh1cgkjjq4p5jwzj8amj"; + }; + + installPhase = '' + mkdir -p tmp/bin + export PREFIX=`pwd`/tmp + make all.install.build + make check_install + make lib.install + make bin.install + ''; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ ppx_deriving_protobuf ]; + + createFindlibDestdir = true; + + doCheck = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/mransan/ocaml-protoc"; + description = "A Protobuf Compiler for OCaml"; + license = licenses.mit; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-r/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-r/default.nix new file mode 100644 index 000000000000..71e77b24ce4b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-r/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchFromGitHub, buildDunePackage, pkg-config, configurator, stdio, R }: + +buildDunePackage rec { + pname = "ocaml-r"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "pveber"; + repo = pname; + rev = "v${version}"; + sha256 = "09gljccwjsw9693m1hm9hcyvgp3p2fvg3cfn18yyidpc2f81a4fy"; + }; + + # Without the following patch, stub generation fails with: + # > Fatal error: exception (Failure "not supported: osVersion") + preConfigure = '' + substituteInPlace stubgen/stubgen.ml --replace \ + 'failwithf "not supported: %s" name ()' \ + 'sprintf "(* not supported: %s *)" name' + ''; + + buildInputs = [ configurator pkg-config R stdio ]; + + meta = { + description = "OCaml bindings for the R interpreter"; + inherit (src.meta) homepage; + license = lib.licenses.gpl3; + maintainers = [ lib.maintainers.bcdarwin ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-result/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-result/default.nix new file mode 100644 index 000000000000..2814c6c52806 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-result/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "result"; + version = "1.5"; + + src = fetchurl { + url = "https://github.com/janestreet/result/releases/download/${version}/result-${version}.tbz"; + sha256 = "0cpfp35fdwnv3p30a06wd0py3805qxmq3jmcynjc3x2qhlimwfkw"; + }; + + meta = { + homepage = "https://github.com/janestreet/result"; + description = "Compatibility Result module"; + longDescription = '' + Projects that want to use the new result type defined in OCaml >= 4.03 + while staying compatible with older version of OCaml should use the + Result module defined in this library. + ''; + license = lib.licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-sat-solvers/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-sat-solvers/default.nix new file mode 100644 index 000000000000..c7779b098e73 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-sat-solvers/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildOasisPackage, minisat }: + +buildOasisPackage rec { + pname = "ocaml-sat-solvers"; + version = "0.4"; + + minimumOCamlVersion = "4.03.0"; + + src = fetchFromGitHub { + owner = "tcsprojects"; + repo = "ocaml-sat-solvers"; + rev = "v${version}"; + sha256 = "1hxr16cyl1p1k1cik848mqrysq95wxmlykpm93a99pn55mp28938"; + }; + + propagatedBuildInputs = [ minisat ]; + + meta = { + homepage = "https://github.com/tcsprojects/ocaml-sat-solvers"; + description = "SAT Solvers For OCaml"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ mgttlinger ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix new file mode 100644 index 000000000000..706dc913e1e6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildDunePackage, fetchurl }: + +buildDunePackage rec { + minimumOCamlVersion = "4.02.3"; + + pname = "ocaml-syntax-shims"; + version = "1.0.0"; + + src = fetchurl { + url = "https://github.com/ocaml-ppx/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "1j7848khli4p7j8i2kmnvhdnhcwhy3zgdpf5ds5ic30ax69y3cl9"; + }; + + useDune2 = true; + + doCheck = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/ocaml-ppx/ocaml-syntax-shims"; + description = "Backport new syntax to older OCaml versions"; + license = licenses.mit; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-text/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-text/default.nix new file mode 100644 index 000000000000..1dc98c9fdd24 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-text/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchzip, libiconv, ocaml, findlib, ocamlbuild, ncurses }: + +stdenv.mkDerivation rec { + pname = "ocaml-text"; + version = "0.8"; + + src = fetchzip { + url = "https://github.com/vbmithr/ocaml-text/archive/${version}.tar.gz"; + sha256 = "11jamdfn5s19a0yvl012q1xvdk1grkp4rkrn819imqrvdplqkn1y"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ncurses libiconv ]; + + configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure"; + + createFindlibDestdir = true; + + + meta = { + homepage = "http://ocaml-text.forge.ocamlcore.org/"; + description = "A library for convenient text manipulation"; + license = stdenv.lib.licenses.bsd3; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix new file mode 100644 index 000000000000..54133850e077 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchurl, buildDunePackage }: + +buildDunePackage rec { + + pname = "ocaml-version"; + version = "3.0.0"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/ocurrent/ocaml-version/releases/download/v${version}/ocaml-version-v${version}.tbz"; + sha256 = "15vk8sh50p3f2mbv8z7mqnx76cffri36f2krp25zkkwix8jg7ci4"; + }; + + meta = { + description = "Manipulate, parse and generate OCaml compiler version strings"; + homepage = "https://github.com/ocurrent/ocaml-version"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlfuse/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlfuse/default.nix new file mode 100644 index 000000000000..dabe7ae52a3e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlfuse/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, camlidl, fuse }: + +buildDunePackage { + pname = "ocamlfuse"; + version = "2.7.1_cvs6_e35e76b"; + + src = fetchFromGitHub { + owner = "astrada"; + repo = "ocamlfuse"; + rev = "e35e76bee3b06806256b5bfca108b7697267cd5c"; + sha256 = "1v9g0wh7rnjkrjrnw50145g6ry38plyjs8fq8w0nlzwizhf3qhff"; + }; + + propagatedBuildInputs = [ camlidl fuse ]; + + meta = { + homepage = "https://sourceforge.net/projects/ocamlfuse"; + description = "OCaml bindings for FUSE"; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ bennofs ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix new file mode 100644 index 000000000000..df684f166e17 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, ocaml, findlib +, gtkSupport ? true +, lablgtk +}: + +stdenv.mkDerivation rec { + pname = "ocamlgraph"; + version = "1.8.8"; + + src = fetchurl { + url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz"; + sha256 = "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"; + }; + + buildInputs = [ ocaml findlib ] + ++ stdenv.lib.optional gtkSupport lablgtk + ; + + createFindlibDestdir = true; + + buildFlags = [ "all" ]; + installTargets = [ "install-findlib" ]; + + postInstall = stdenv.lib.optionalString gtkSupport '' + mkdir -p $out/bin + cp dgraph/dgraph.opt $out/bin/graph-viewer + cp editor/editor.opt $out/bin/graph-editor + ''; + + meta = { + homepage = "http://ocamlgraph.lri.fr/"; + description = "Graph library for Objective Caml"; + license = stdenv.lib.licenses.gpl2Oss; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.kkallio + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix new file mode 100644 index 000000000000..b4ee828fcc42 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl}: + +let + + version = "6.37.0"; + sha256 = "99ff58080ed154cc4bd70f915fe4760dffb026a1c0447caa0b3bdb982b24b0a8"; + +in stdenv.mkDerivation { + pname = "ocaml-make"; + inherit version; + + src = fetchurl { + url = "https://bitbucket.org/mmottl/ocaml-makefile/downloads/ocaml-makefile-${version}.tar.gz"; + inherit sha256; + }; + + installPhase = '' + mkdir -p "$out/include/" + cp OCamlMakefile "$out/include/" + ''; + + setupHook = ./setup-hook.sh; + + meta = { + homepage = "http://www.ocaml.info/home/ocaml_sources.html"; + description = "Generic OCaml Makefile for GNU Make"; + license = "LGPL"; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh new file mode 100644 index 000000000000..6d9504370165 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh @@ -0,0 +1,5 @@ +addOcamlMakefile () { + export OCAMLMAKEFILE="@out@/include/OCamlMakefile" +} + +addEnvHooks "$targetOffset" addOcamlMakefile diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnat/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnat/default.nix new file mode 100644 index 000000000000..e98dc62478e0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnat/default.nix @@ -0,0 +1,44 @@ +{stdenv, lib, fetchurl, ocaml, findlib, ounit}: + +# https://github.com/bmeurer/ocamlnat/issues/3 +assert lib.versionOlder ocaml.version "4"; + +stdenv.mkDerivation rec { + pname = "ocamlnat"; + version = "0.1.1"; + + src = fetchurl { + url = "http://benediktmeurer.de/files/source/${pname}-${version}.tar.bz2"; + sha256 = "0dyvy0j6f47laxhnadvm71z1py9hz9zd49hamf6bij99cggb2ij1"; + }; + + buildInputs = [ocaml findlib ounit]; + + prefixKey = "--prefix "; + + doCheck = true; + + checkTarget = "test"; + + createFindlibDestdir = true; + + meta = { + description = "OCaml native toplevel"; + homepage = "http://benediktmeurer.de/ocamlnat/"; + license = stdenv.lib.licenses.qpl; + longDescription = '' + The ocamlnat project provides a new native code OCaml toplevel + ocamlnat, which is mostly compatible to the byte code toplevel ocaml, + but up to 100 times faster. It is based on the optimizing native code + compiler, the native runtime and an earlier prototype by Alain + Frisch. It is build upon Just-In-Time techniques and currently + supports Unix-like systems (i.e. Linux, BSD or macOS) running on + x86 or x86-64 processors. Support for additional architectures and + operating systems is planned, but not yet available. + ''; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnet/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnet/default.nix new file mode 100644 index 000000000000..5b6e0dde8b75 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, pkgconfig, ncurses, ocaml, findlib, ocaml_pcre, camlzip +, gnutls, nettle +}: + +if stdenv.lib.versionOlder ocaml.version "4.02" +then throw "ocamlnet is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocamlnet-${version}"; + version = "4.1.8"; + + src = fetchurl { + url = "http://download.camlcity.org/download/ocamlnet-${version}.tar.gz"; + sha256 = "1x703mjqsv9nvffnkj5i36ij2s5zfvxxll2z1qj6a7p428b2yfnm"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ncurses ocaml findlib ocaml_pcre camlzip gnutls nettle ]; + + createFindlibDestdir = true; + + dontAddPrefix = true; + + preConfigure = '' + configureFlagsArray=( + -bindir $out/bin + -enable-gnutls + -enable-zip + -enable-pcre + -disable-gtk2 + -with-nethttpd + -datadir $out/lib/ocaml/${ocaml.version}/ocamlnet + ) + ''; + + buildPhase = '' + make all + make opt + ''; + + meta = { + homepage = "http://projects.camlcity.org/projects/ocamlnet.html"; + description = "A library implementing Internet protocols (http, cgi, email, etc.) for OCaml"; + license = "Most Ocamlnet modules are released under the zlib/png license. The HTTP server module Nethttpd is, however, under the GPL."; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix new file mode 100644 index 000000000000..693c4d59fef9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl, ocaml, pkgconfig, findlib, SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_gfx, lablgl }: + +let + pname = "ocamlsdl"; +in + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.9.1"; + + src = fetchurl { + url = "mirror://sourceforge/project/ocamlsdl/OCamlSDL/ocamlsdl-0.9.1/ocamlsdl-0.9.1.tar.gz"; + sha256 = "abfb295b263dc11e97fffdd88ea1a28b46df8cc2b196777093e4fe7f509e4f8f"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ocaml findlib SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl]; + + propagatedBuildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx pkgconfig ]; + createFindlibDestdir = true; + + meta = { + homepage = "http://ocamlsdl.sourceforge.net/"; + description = "OCaml bindings for SDL 1.2"; + license = stdenv.lib.licenses.lgpl21; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/default.nix new file mode 100644 index 000000000000..3f551903efac --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, astring }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ocb-stubblr-0.1.0"; + src = fetchzip { + url = "https://github.com/pqwy/ocb-stubblr/releases/download/v0.1.0/ocb-stubblr-0.1.0.tbz"; + name = "src.tar.bz"; + sha256 = "0hpds1lkq4j8wgslv7hnirgfrjmqi36h5rarpw9mwf24gfp5ays2"; + }; + + patches = [ ./pkg-config.patch ]; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ astring ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "OCamlbuild plugin for C stubs"; + homepage = "https://github.com/pqwy/ocb-stubblr"; + license = stdenv.lib.licenses.isc; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/pkg-config.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/pkg-config.patch new file mode 100644 index 000000000000..d86b3f8da9f1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocb-stubblr/pkg-config.patch @@ -0,0 +1,25 @@ +--- a/src/ocb_stubblr.ml 1970-01-01 00:00:01.000000000 +0000 ++++ b/src/ocb_stubblr.ml 2016-12-04 11:10:10.000000000 +0000 +@@ -31,20 +31,9 @@ + + (* XXX Would be nice to move pkg-config results to a build artefact. *) + +- let opam_prefix = +- let cmd = "opam config var prefix" in +- lazy ( try run_and_read cmd with Failure _ -> +- error_msgf "error running opam") +- +- let var = "PKG_CONFIG_PATH" +- +- let path () = +- Lazy.force opam_prefix / "lib" / "pkgconfig" :: +- (try [Sys.getenv var] with Not_found -> []) |> String.concat ~sep:":" +- + let run ~flags package = +- let cmd = strf "%s=%s pkg-config %s %s 2>/dev/null" +- var (path ()) package (String.concat ~sep:" " flags) in ++ let cmd = strf "pkg-config %s %s 2>/dev/null" ++ package (String.concat ~sep:" " flags) in + try `Res (run_and_read cmd) with Failure _ -> `Nonexistent + end + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocf/default.nix new file mode 100644 index 000000000000..7cff7b625b58 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocf/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }: + +if stdenv.lib.versionOlder ocaml.version "4.03" +|| stdenv.lib.versionAtLeast ocaml.version "4.08" +then throw "ocf not supported for ocaml ${ocaml.version}" +else +stdenv.mkDerivation rec { + pname = "ocf"; + version = "0.5.0"; + src = fetchFromGitHub { + owner = "zoggy"; + repo = "ocf"; + rev = "release-${version}"; + sha256 = "1fhq9l2nmr39hxzpavc0jssmba71nnmhsncdn4dsbh2ylv29w56y"; + }; + + 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 stdenv.lib; { + description = "OCaml library to read and write configuration options in JSON syntax"; + homepage = "https://zoggy.github.io/ocf/"; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ regnat ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix new file mode 100644 index 000000000000..07b6f72e38de --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, astring, pprint }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocp-ocamlres-${version}"; + version = "0.4"; + src = fetchFromGitHub { + owner = "OCamlPro"; + repo = "ocp-ocamlres"; + rev = "v${version}"; + sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn"; + }; + + buildInputs = [ ocaml findlib astring pprint ]; + createFindlibDestdir = true; + + installFlags = [ "BINDIR=$(out)/bin" ]; + preInstall = "mkdir -p $out/bin"; + + meta = { + description = "A simple tool and library to embed files and directories inside OCaml executables"; + license = stdenv.lib.licenses.lgpl3Plus; + homepage = "https://www.typerex.org/ocp-ocamlres.html"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix new file mode 100644 index 000000000000..719252dbea89 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, cppo }: + +let version = "1.0"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ocplib-endian-${version}"; + + src = fetchzip { + url = "https://github.com/OCamlPro/ocplib-endian/archive/${version}.tar.gz"; + sha256 = "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw"; + }; + + buildInputs = [ ocaml findlib ocamlbuild cppo ]; + + createFindlibDestdir = true; + + meta = { + description = "Optimised functions to read and write int16/32/64"; + homepage = "https://github.com/OCamlPro/ocplib-endian"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/browser.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/browser.nix new file mode 100644 index 000000000000..8db892f325e2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/browser.nix @@ -0,0 +1,15 @@ +{ buildDunePackage, ocplib-json-typed, js_of_ocaml }: + +buildDunePackage { + pname = "ocplib-json-typed-browser"; + inherit (ocplib-json-typed) version src; + useDune2 = true; + + propagatedBuildInputs = [ ocplib-json-typed js_of_ocaml ]; + + meta = { + description = "A Json_repr interface over JavaScript's objects"; + inherit (ocplib-json-typed.meta) homepage license maintainers; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/bson.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/bson.nix new file mode 100644 index 000000000000..350c31a3819d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/bson.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, ocplib-json-typed, ocplib-endian }: + +buildDunePackage { + pname = "ocplib-json-typed-bson"; + inherit (ocplib-json-typed) version src; + + propagatedBuildInputs = [ ocplib-json-typed ocplib-endian ]; + + meta = { + description = "A Json_repr compatible implementation of the JSON compatible subset of BSON"; + inherit (ocplib-json-typed.meta) homepage license maintainers; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/default.nix new file mode 100644 index 000000000000..6a1b906d7f2b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-json-typed/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchFromGitHub, uri }: + +buildDunePackage rec { + pname = "ocplib-json-typed"; + version = "0.7.1"; + src = fetchFromGitHub { + owner = "OCamlPro"; + repo = "ocplib-json-typed"; + rev = "v${version}"; + sha256 = "1gv0vqqy9lh7isaqg54b3lam2sh7nfjjazi6x7zn6bh5f77g1p5q"; + }; + + propagatedBuildInputs = [ uri ]; + + meta = { + description = "A collection of type-aware JSON utilities for OCaml"; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-simplex/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-simplex/default.nix new file mode 100644 index 000000000000..2cf4b6ddffb9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocplib-simplex/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, ocaml, findlib }: + +let + pname = "ocplib-simplex"; + version = "0.4"; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "OCamlPro-Iguernlala"; + repo = pname; + rev = "v${version}"; + sha256 = "09niyidrjzrj8g1qwx4wgsdf5m6cwrnzg7zsgala36jliic4di60"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ ocaml findlib ]; + + installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + + createFindlibDestdir = true; + + meta = { + description = "An OCaml library implementing a simplex algorithm, in a functional style, for solving systems of linear inequalities"; + homepage = "https://github.com/OCamlPro-Iguernlala/ocplib-simplex"; + inherit (ocaml.meta) platforms; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix new file mode 100644 index 000000000000..84bc3ce678b1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, oasis, ocaml_optcomp, camlp4 +, num +}: + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" + then { + version = "0.8.1"; + sha256 = "03vzrybdpjydbpil97zmir71kpsn2yxkjnzysma7fvybk8ll4zh9"; + buildInputs = [ num ]; + } else { + version = "0.7.1"; + sha256 = "0gg3nr3iic4rwqrcc0qvfm9x0x57zclvdsnpy0z8rv2fl5isbzms"; + }; +in + +let inherit (param) version; in + +stdenv.mkDerivation { + pname = "ocsigen-deriving"; + inherit version; + src = fetchzip { + url = "https://github.com/ocsigen/deriving/archive/${version}.tar.gz"; + inherit (param) sha256; + }; + + buildInputs = [ ocaml findlib ocamlbuild oasis ocaml_optcomp camlp4 ] + ++ (param.buildInputs or []); + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/ocsigen/deriving"; + description = "Extension to OCaml for deriving functions from type declarations"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ + gal_bolle vbgl + ]; + }; + + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix new file mode 100644 index 000000000000..30ddd005b79b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -0,0 +1,66 @@ +{ stdenv, fetchFromGitHub, which, ocaml, findlib, lwt_react, ssl, lwt_ssl +, lwt_log, ocamlnet, ocaml_pcre, cryptokit, tyxml, xml-light, ipaddr +, pgocaml, camlzip, ocaml_sqlite3 +, makeWrapper, fetchpatch +}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.06.1" +then throw "ocsigenserver is not available for OCaml ${ocaml.version}" +else + +let mkpath = p: n: + "${p}/lib/ocaml/${ocaml.version}/site-lib/${n}"; +in + +stdenv.mkDerivation rec { + version = "2.16.0"; + pname = "ocsigenserver"; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "ocsigenserver"; + rev = version; + sha256 = "0dd7zfk8dlajv0297dswaaqh96hjk2ppy8zb67jbkd26nimahk9y"; + }; + + # unreleased fix for Makefile typos breaking compilation + patches = [ (fetchpatch { + url = "https://github.com/ocsigen/ocsigenserver/commit/014aefc4e460686a361b974f16ebb7e0c993b36b.patch"; + sha256 = "0xda4fj8p5102lh9xmrn5mv3s0ps6yykqj3mpjf72gf4zd6fzcn7"; + }) ]; + + buildInputs = [ which makeWrapper ocaml findlib + lwt_react pgocaml camlzip ocaml_sqlite3 + ]; + + propagatedBuildInputs = [ cryptokit ipaddr lwt_log lwt_ssl ocamlnet + ocaml_pcre tyxml xml-light + ]; + + configureFlags = [ "--root $(out)" "--prefix /" ]; + + dontAddPrefix = true; + + createFindlibDestdir = true; + + postFixup = + '' + rm -rf $out/var/run + wrapProgram $out/bin/ocsigenserver \ + --suffix CAML_LD_LIBRARY_PATH : "${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath ocaml_sqlite3 "sqlite3"}" + ''; + + dontPatchShebangs = true; + + meta = { + homepage = "http://ocsigen.org/ocsigenserver/"; + description = "A full featured Web server"; + longDescription ='' + A full featured Web server. It implements most features of the HTTP protocol, and has a very powerful extension mechanism that make very easy to plug your own OCaml modules for generating pages. + ''; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = [ stdenv.lib.maintainers.gal_bolle ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/default.nix new file mode 100644 index 000000000000..637c06e98dcf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocsigen-toolkit, pgocaml_ppx, macaque, safepass, yojson +, cohttp-lwt-unix +, resource-pooling +}: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocsigen-start-${version}"; + version = "2.18.0"; + + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ pgocaml_ppx safepass ocsigen-toolkit yojson resource-pooling cohttp-lwt-unix ]; + + patches = [ ./templates-dir.patch ]; + + postPatch = '' + substituteInPlace "src/os_db.ml" --replace "citext" "text" + ''; + + createFindlibDestdir = true; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "ocsigen-start"; + rev = version; + sha256 = "0wvh4c26g6qd6i1fryilcqz9giz7v6pnhc90sknhxh6jmwrbjl50"; + }; + + meta = { + homepage = "http://ocsigen.org/ocsigen-start"; + description = "Eliom application skeleton"; + longDescription ='' + An Eliom application skeleton, ready to use to build your own application with users, (pre)registration, notifications, etc. + ''; + license = stdenv.lib.licenses.lgpl21; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.gal_bolle ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/templates-dir.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/templates-dir.patch new file mode 100644 index 000000000000..38365a26b99a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-start/templates-dir.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/install.sh b/scripts/install.sh +index f88ae11..d6aae70 100755 +--- a/scripts/install.sh ++++ b/scripts/install.sh +@@ -11,9 +11,9 @@ fi + + TPL_DIR=$1 + TPL_NAME=$2 +-DEST0=$DESTDIR/$(eliom-distillery -dir) ++DEST0=$out/eliom-distillery-templates + DEST=$DEST0/$TPL_NAME + + mkdir -p $DEST0 diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix new file mode 100644 index 000000000000..a0f3136de22b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, opaline +, calendar, eliom, js_of_ocaml-ppx_deriving_json +}: + +stdenv.mkDerivation rec { + pname = "ocsigen-toolkit"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "2.7.0"; + + propagatedBuildInputs = [ calendar js_of_ocaml-ppx_deriving_json eliom ]; + buildInputs = [ ocaml findlib opaline ]; + + installPhase = + '' + export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH + make install + opaline -prefix $out + ''; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = pname; + rev = version; + sha256 = "0jan5779nc0jf993hmvfii15ralcs20sm4mcnqwqrnhjbq6f6zpk"; + }; + + createFindlibDestdir = true; + + meta = { + homepage = "http://ocsigen.org/ocsigen-toolkit/"; + description = " User interface widgets for Ocsigen applications"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.gal_bolle ]; + inherit (ocaml.meta) platforms; + }; + + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix new file mode 100644 index 000000000000..e0189c90181e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "octavius is not available for OCaml ${ocaml.version}" else + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-octavius-0.2.0"; + src = fetchurl { + url = "https://github.com/ocaml-doc/octavius/releases/download/v0.2.0/octavius-0.2.0.tbz"; + sha256 = "02milzzlr4xk5aymg2fjz27f528d5pyscqvld3q0dm41zcpkz5ml"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "Ocamldoc comment syntax parser"; + homepage = "https://github.com/ocaml-doc/octavius"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocurl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocurl/default.nix new file mode 100644 index 000000000000..4c2e4ee6a301 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ocurl/default.nix @@ -0,0 +1,24 @@ +{ stdenv, pkgconfig, ocaml, findlib, fetchurl, curl, ncurses }: + +if stdenv.lib.versionOlder ocaml.version "4.02" +then throw "ocurl is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocurl-0.9.1"; + src = fetchurl { + url = "http://ygrek.org.ua/p/release/ocurl/${name}.tar.gz"; + sha256 = "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"; + }; + + buildInputs = [ pkgconfig ocaml findlib ncurses ]; + propagatedBuildInputs = [ curl ]; + createFindlibDestdir = true; + meta = { + description = "OCaml bindings to libcurl"; + license = stdenv.lib.licenses.mit; + homepage = "http://ygrek.org.ua/p/ocurl/"; + maintainers = with stdenv.lib.maintainers; [ bennofs ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix new file mode 100644 index 000000000000..c9e5308f8af4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-data-notation-0.0.11"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-0.0.11.tar.gz"; + sha256 = "09a8zdyifpc2nl4hdvg9206142y31cq95ajgij011s1qcg3z93lj"; + }; + + buildInputs = [ ocaml findlib ocamlbuild type_conv ounit camlp4 ]; + + createFindlibDestdir = true; + + configurePhase = "ocaml setup.ml -configure"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + meta = with stdenv.lib; { + description = "Store data using OCaml notation"; + homepage = "https://forge.ocamlcore.org/projects/odn/"; + license = licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ + vbgl maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odoc/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odoc/default.nix new file mode 100644 index 000000000000..8dde7ba56ffb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/odoc/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage +, astring, cmdliner, cppo, fpath, result, tyxml +}: + +buildDunePackage rec { + pname = "odoc"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "ocaml"; + repo = pname; + rev = version; + sha256 = "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"; + }; + + buildInputs = [ astring cmdliner cppo fpath result tyxml ]; + + meta = { + description = "A documentation generator for OCaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/omd/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/omd/default.nix new file mode 100644 index 000000000000..cf4abeb7ea6d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/omd/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-omd-1.3.1"; + src = fetchurl { + url = "https://github.com/Chris00/omd/releases/download/1.3.1/omd-1.3.1.tar.gz"; + sha256 = "1sgdgzpx96br7npj8mh91cli5mqmzsjpngwm7x4212n3k1d0ivwa"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + + meta = { + description = "Extensible Markdown library and tool in OCaml"; + homepage = "https://github.com/ocaml/omd"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-core/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-core/default.nix new file mode 100644 index 000000000000..22c1ecdf7032 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-core/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, unzip +, opam, ocamlgraph, re, cppo }: + +buildDunePackage rec { + pname = "opam-core"; + + inherit (opam) src version; + + nativeBuildInputs = [ unzip cppo ]; + propagatedBuildInputs = [ ocamlgraph re ]; + + # get rid of check for curl at configure time + # opam-core does not call curl at run time + configureFlags = [ "--disable-checks" ]; + + meta = opam.meta // { + description = "Small standard library extensions, and generic system interaction modules used by opam"; + maintainers = with lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix new file mode 100644 index 000000000000..0ca332a2a06e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib }: + +stdenv.mkDerivation rec { + version = "2.0.0"; + name = "ocaml${ocaml.version}-opam-file-format-${version}"; + + src = fetchFromGitHub { + owner = "ocaml"; + repo = "opam-file-format"; + rev = version; + sha256 = "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"; + }; + + buildInputs = [ ocaml findlib ]; + + installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + + patches = [ ./optional-static.patch ]; + + meta = { + description = "Parser and printer for the opam file syntax"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch new file mode 100644 index 000000000000..5501fdd0c6c3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch @@ -0,0 +1,13 @@ +diff -u a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -1,1 +1,5 @@ +-TARGETS = opam-file-format.cma opam-file-format.cmxa opam-file-format.cmxs ++TARGETS = opam-file-format.cma opam-file-format.cmxa ++ ++ifeq "$(NATDYNLINK)" "true" ++TARGETS = $(TARGETS) opam-file-format.cmxs ++endif + +all: $(TARGETS) + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-format/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-format/default.nix new file mode 100644 index 000000000000..422729e6d0df --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-format/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, unzip, opam-core, opam-file-format }: + +buildDunePackage rec { + pname = "opam-format"; + + inherit (opam-core) src version; + + minimumOCamlVersion = "4.02.3"; + + # get rid of check for curl at configure time + # opam-format does not call curl at run time + configureFlags = [ "--disable-checks" ]; + + nativeBuildInputs = [ unzip ]; + propagatedBuildInputs = [ opam-core opam-file-format ]; + + meta = opam-core.meta // { + description = "Definition of opam datastructures and its file interface"; + maintainers = with lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix new file mode 100644 index 000000000000..1801a9e1c865 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, unzip, opam-format, curl }: + +buildDunePackage rec { + pname = "opam-repository"; + + minimumOCamlVersion = "4.02"; + + inherit (opam-format) src version; + + patches = [ ./download-tool.patch ]; + postPatch = '' + substituteInPlace src/repository/opamRepositoryConfig.ml \ + --replace "SUBSTITUTE_NIXOS_CURL_PATH" "\"${curl}/bin/curl\"" + ''; + + nativeBuildInputs = [ unzip ]; + buildInputs = [ curl ]; + propagatedBuildInputs = [ opam-format ]; + + meta = opam-format.meta // { + description = "OPAM repository and remote sources handling, including curl/wget, rsync, git, mercurial, darcs backends"; + maintainers = with lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/download-tool.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/download-tool.patch new file mode 100644 index 000000000000..5af720adca91 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-repository/download-tool.patch @@ -0,0 +1,29 @@ +diff --git a/src/repository/opamRepositoryConfig.ml b/src/repository/opamRepositoryConfig.ml +index c2954c1d..528fc621 100644 +--- a/src/repository/opamRepositoryConfig.ml ++++ b/src/repository/opamRepositoryConfig.ml +@@ -27,23 +27,7 @@ type 'a options_fun = + 'a + + let default = { +- download_tool = lazy ( +- try +- let tools = +- if OpamStd.Sys.(os () = Darwin) +- then ["wget", `Default; "curl", `Curl] +- else ["curl", `Curl; "wget", `Default] +- in +- let cmd, kind = +- List.find (fun (c,_) -> OpamSystem.resolve_command c <> None) tools +- in +- [ CIdent cmd, None ], kind +- with Not_found -> +- OpamConsole.error_and_exit `Configuration_error +- "Could not find a suitable download command. Please make sure you \ +- have either \"curl\" or \"wget\" installed, or specify a custom \ +- command through variable OPAMFETCH." +- ); ++ download_tool = lazy ([ CIdent SUBSTITUTE_NIXOS_CURL_PATH, None ], `Curl); + validation_hook = None; + retries = 3; + force_checksums = None; diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-state/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-state/default.nix new file mode 100644 index 000000000000..156976a4a5ad --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opam-state/default.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, unzip, opam, opam-repository }: + +buildDunePackage rec { + pname = "opam-state"; + + inherit (opam) src version; + + # get rid of check for curl at configure time + # opam-state does not call curl at run time + configureFlags = [ "--disable-checks" ]; + + nativeBuildInputs = [ unzip ]; + propagatedBuildInputs = [ opam-repository ]; + + meta = opam.meta // { + description = "OPAM development library handling the ~/.opam hierarchy, repository and switch states"; + maintainers = with lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium/default.nix new file mode 100644 index 000000000000..2681cc609d00 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium/default.nix @@ -0,0 +1,32 @@ +{ buildDunePackage + +, ppx_sexp_conv +, ppx_fields_conv + +, cmdliner +, cohttp-lwt-unix +, logs +, magic-mime +, opium_kernel +, stringext + +, alcotest +}: + +buildDunePackage { + pname = "opium"; + inherit (opium_kernel) version src meta minimumOCamlVersion; + + useDune2 = true; + + doCheck = true; + + buildInputs = [ + ppx_sexp_conv ppx_fields_conv + alcotest + ]; + + propagatedBuildInputs = [ + opium_kernel cmdliner cohttp-lwt-unix magic-mime logs stringext + ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix new file mode 100644 index 000000000000..8388e108feff --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildDunePackage +, fetchFromGitHub + +, ppx_fields_conv +, ppx_sexp_conv + +, cohttp-lwt +, ezjsonm +, hmap +}: + +buildDunePackage rec { + pname = "opium_kernel"; + version = "0.17.1"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchFromGitHub { + owner = "rgrinberg"; + repo = "opium"; + rev = "v${version}"; + sha256 = "03xzh0ik6k3c0yn1w1avph667vdagwclzimwwrlf9qdxnzxvcnp3"; + }; + + doCheck = true; + + buildInputs = [ + ppx_sexp_conv ppx_fields_conv + ]; + + propagatedBuildInputs = [ + hmap cohttp-lwt ezjsonm + ]; + + meta = { + description = "Sinatra like web toolkit for OCaml based on cohttp & lwt"; + homepage = "https://github.com/rgrinberg/opium"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.pmahoney ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/META b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/META new file mode 100644 index 000000000000..8a942288f752 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/META @@ -0,0 +1,12 @@ +# OASIS_START +# DO NOT EDIT (digest: ec844fa3189acb2a866b89a69d111ba4) +version = "1.6" +description = "Optional compilation with cpp-like directives" +requires = "camlp4" +archive(syntax, preprocessor) = "optcomp.cma" +archive(syntax, toploop) = "optcomp.cma" +archive(syntax, preprocessor, native) = "optcomp.cmxa" +archive(syntax, preprocessor, native, plugin) = "optcomp.cmxs" +exists_if = "optcomp.cma" +# OASIS_STOP + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/default.nix new file mode 100644 index 000000000000..c177ef52e151 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optcomp/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, camlp4 }: + +stdenv.mkDerivation { + name = "ocaml-optcomp-1.6"; + src = fetchurl { + url = "https://github.com/diml/optcomp/archive/1.6.tar.gz"; + sha256 = "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"; + }; + + patches = + let inherit (stdenv.lib) optional versionAtLeast; in + optional (versionAtLeast ocaml.version "4.02") (fetchpatch { + url = "https://github.com/diml/optcomp/commit/b7f809360c9794b383a4bc0492f6df381276b429.patch"; + sha256 = "1n095lk94jq1rwi0l24g2wbgms7249wdd31n0ji895dr6755s93y"; + }) + ; + + createFindlibDestdir = true; + + buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + + configurePhase = '' + cp ${./META} META + ''; + + buildPhase = '' + ocamlbuild src/optcomp.cmxs src/optcomp.cma src/optcomp_o.native src/optcomp_r.native + ''; + + installPhase = '' + mkdir -p $out/bin + cp _build/src/optcomp_o.native $out/bin/optcomp-o + cp _build/src/optcomp_r.native $out/bin/optcomp-r + ocamlfind install optcomp META _build/src/optcomp.{a,cma,cmxa,cmxs} _build/src/pa_optcomp.{cmi,cmx,mli} + ''; + + meta = { + homepage = "https://github.com/diml/optcomp"; + description = "Optional compilation for OCaml with cpp-like directives"; + license = stdenv.lib.licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opti/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opti/default.nix new file mode 100644 index 000000000000..82e2378869f6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/opti/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "opti"; + version = "1.0.3"; + + minimumOCamlVersion = "4.02"; + + src = fetchurl { + url = "https://github.com/magnusjonsson/opti/releases/download/${version}/opti-${version}.tbz"; + sha256 = "ed9ba56dc06e9d2b1bf097964cc65ea37db787d4f239c13d0dd74693f5b50a1e"; + }; + + meta = with stdenv.lib; { + description = "DSL to generate fast incremental C code from declarative specifications"; + license = licenses.bsd3; + maintainers = [ maintainers.jmagnusj ]; + homepage = "https://github.com/magnusjonsson/opti"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix new file mode 100644 index 000000000000..508bbfba6055 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + minimumOCamlVersion = "4.03"; + version = "0.0.3"; + pname = "optint"; + src = fetchurl { + url = "https://github.com/mirage/optint/releases/download/v${version}/optint-v${version}.tbz"; + sha256 = "0c7r3s6lal9xkixngkj25nqncj4s33ka40bjdi7fz7mly08djycj"; + }; + + meta = { + homepage = "https://github.com/mirage/optint"; + description = "Abstract type of integer between x64 and x86 architecture"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otfm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otfm/default.nix new file mode 100644 index 000000000000..8d5bf290c6e0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otfm/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf, result }: + +let + pname = "otfm"; + version = "0.3.0"; + webpage = "https://erratique.ch/software/${pname}"; +in + +assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; + +stdenv.mkDerivation { + + name = "ocaml-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ uutf result ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "OpenType font decoder for OCaml"; + longDescription = '' + Otfm is an in-memory decoder for the OpenType font data format. It + provides low-level access to font tables and functions to decode some + of them. + ''; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otr/default.nix new file mode 100644 index 000000000000..cec5d2ee0d07 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/otr/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchurl, buildDunePackage +, cstruct, sexplib0, rresult, mirage-crypto, mirage-crypto-pk, astring, base64 +, mirage-crypto-rng +}: + +buildDunePackage rec { + pname = "otr"; + version = "0.3.8"; + + src = fetchurl { + url = "https://github.com/hannesm/ocaml-otr/releases/download/v${version}/otr-v${version}.tbz"; + sha256 = "18hn9l8wznqnlh2jf1hpnp36f1cx80ncwiiivsbj34llhgp3893d"; + }; + + useDune2 = true; + + propagatedBuildInputs = [ cstruct sexplib0 mirage-crypto mirage-crypto-pk + astring rresult base64 ]; + + doCheck = true; + checkInputs = [ mirage-crypto-rng ]; + + meta = with lib; { + homepage = "https://github.com/hannesm/ocaml-otr"; + description = "Off-the-record messaging protocol, purely in OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit/default.nix new file mode 100644 index 000000000000..2f4a4f0437a2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit/default.nix @@ -0,0 +1,16 @@ +{ stdenv, ocaml, findlib, ounit2 }: + +stdenv.mkDerivation { + pname = "ocaml${ocaml.version}-ounit"; + inherit (ounit2) version src meta; + + buildInputs = [ findlib ]; + propagatedBuildInputs = [ ounit2 ]; + + phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; + + createFindlibDestdir = true; + + installTargets = "install-ounit version='${ounit2.version}'"; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit2/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit2/default.nix new file mode 100644 index 000000000000..708c9a6c19e2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ounit2/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchurl, stdlib-shims }: + +buildDunePackage rec { + minimumOCamlVersion = "4.04"; + + pname = "ounit2"; + version = "2.2.3"; + + src = fetchurl { + url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-v${version}.tbz"; + sha256 = "1naahh24lbyxmrnzpfz8karniqbf1nknivf96mrvsr6zlx5ad072"; + }; + + propagatedBuildInputs = [ stdlib-shims ]; + + meta = with lib; { + homepage = "https://github.com/gildor478/ounit"; + description = "A unit test framework for OCaml"; + license = licenses.mit; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owee/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owee/default.nix new file mode 100644 index 000000000000..9eb81003d47a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owee/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchFromGitHub }: + +buildDunePackage rec { + minimumOCamlVersion = "4.06"; + pname = "owee"; + version = "0.3"; + + src = fetchFromGitHub { + owner = "let-def"; + repo = "owee"; + rev = "v${version}"; + sha256 = "0jp8ca57488d7sj2nqy4yxcdpda6sxx51yyi8k6888hbinhyqp0j"; + }; + + meta = { + description = "An experimental OCaml library to work with DWARF format"; + inherit (src.meta) homepage; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix new file mode 100644 index 000000000000..3e1eb09faad6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, stdlib-shims }: + +buildDunePackage rec { + pname = "owl-base"; + version = "0.9.0"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "owlbarn"; + repo = "owl"; + rev = version; + sha256 = "0xxchsymmdbwszs6barqq8x4vqz5hbap64yxq82c2la9sdxgk0vv"; + }; + + propagatedBuildInputs = [ stdlib-shims ]; + + minimumOCamlVersion = "4.10"; + + meta = with stdenv.lib; { + description = "Numerical computing library for Ocaml"; + homepage = "https://ocaml.xyz"; + changelog = "https://github.com/owlbarn/owl/releases"; + platforms = platforms.x86_64; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl/default.nix new file mode 100644 index 000000000000..7dd1d525a462 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/owl/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, buildDunePackage +, dune-configurator +, fetchFromGitHub +, alcotest +, eigen +, stdio +, stdlib-shims +, openblasCompat +, owl-base +, npy +}: + + +buildDunePackage rec { + pname = "owl"; + + inherit (owl-base) version src meta useDune2; + + checkInputs = [ alcotest ]; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ + eigen stdio stdlib-shims openblasCompat owl-base npy + ]; + + doCheck = !stdenv.isDarwin; # https://github.com/owlbarn/owl/issues/462 +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_bench/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_bench/default.nix new file mode 100644 index 000000000000..1027d0fc21ab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_bench/default.nix @@ -0,0 +1,23 @@ +{stdenv, buildOcaml, fetchurl, type_conv, pa_ounit}: + +buildOcaml rec { + name = "pa_bench"; + version = "113.00.00"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/pa_bench/archive/${version}.tar.gz"; + sha256 = "1cd6291gdnk6h8ziclg6x3if8z5xy67nfz9gx8sx4k2cwv0j29k5"; + }; + + buildInputs = [ pa_ounit ]; + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/pa_bench"; + description = "Syntax extension for inline benchmarks"; + license = stdenv.lib.licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_ounit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_ounit/default.nix new file mode 100644 index 000000000000..3bd8baac4b76 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pa_ounit/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildOcaml, ocaml, fetchurl, ounit }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "pa_ounit is not available for OCaml ${ocaml.version}" +else + +buildOcaml rec { + name = "pa_ounit"; + version = "113.00.00"; + + src = fetchurl { + url = "https://github.com/janestreet/pa_ounit/archive/${version}.tar.gz"; + sha256 = "0vi0p2hxcrdsl0319c9s8mh9hmk2i4ir6c6vrj8axkc37zkgc437"; + }; + + propagatedBuildInputs = [ ounit ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/pa_ounit"; + description = "OCaml inline testing"; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parany/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parany/default.nix new file mode 100644 index 000000000000..0a4fc9ecea45 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parany/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ocamlnet, cpu }: + +buildDunePackage rec { + pname = "parany"; + version = "8.0.0"; + + src = fetchFromGitHub { + owner = "UnixJunkie"; + repo = pname; + rev = "v${version}"; + sha256 = "19yz1yqyqx6gawy93jlh3x6vji2p9qsy6nsbj65q5pii8p1fjlsm"; + }; + + propagatedBuildInputs = [ ocamlnet cpu ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Generalized map/reduce for multicore computing"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix new file mode 100644 index 000000000000..5127dc3b1e6d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "parmap"; + version = "1.1.1"; + + src = fetchurl { + url = "https://github.com/rdicosmo/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "1pci7b1jqxkgmrbhr0p5j98i4van5nfmmb3sak8cyvxhwgna93j4"; + }; + + doCheck = true; + + meta = with lib; { + description = "Library for multicore parallel programming"; + homepage = "https://rdicosmo.github.io/parmap"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl2; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pcre/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pcre/default.nix new file mode 100644 index 000000000000..94af6fce2602 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pcre/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, pcre, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-pcre-${version}"; + version = "7.2.3"; + + src = fetchurl { + url = "https://github.com/mmottl/pcre-ocaml/releases/download/v${version}/pcre-ocaml-${version}.tar.gz"; + sha256 = "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [pcre]; + + createFindlibDestdir = true; + + dontConfigure = true; # Skip configure phase + + meta = with stdenv.lib; { + homepage = "https://bitbucket.org/mmottl/pcre-ocaml"; + description = "An efficient C-library for pattern matching with Perl-style regular expressions in OCaml"; + license = licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ maggesi vbmithr ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix new file mode 100644 index 000000000000..8896675f63c8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildDunePackage +, calendar, csv, hex, re +}: + +buildDunePackage rec { + pname = "pgocaml"; + version = "4.0"; + src = fetchFromGitHub { + owner = "darioteixeira"; + repo = "pgocaml"; + rev = "v${version}"; + sha256 = "1s8c5prr7jb9k76bz990m836czm6k8rv5bvp6s2zg9ra0w19w90j"; + }; + + minimumOCamlVersion = "4.05"; + + preConfigure = "patchShebangs src/genconfig.sh"; + + propagatedBuildInputs = [ calendar csv hex re ]; + + meta = with lib; { + description = "An interface to PostgreSQL databases for OCaml applications"; + inherit (src.meta) homepage; + license = licenses.lgpl2; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/ppx.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/ppx.nix new file mode 100644 index 000000000000..f8bc4a40e7f9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgocaml/ppx.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, pgocaml, ppx_tools, ppx_tools_versioned, rresult }: + +buildDunePackage { + pname = "pgocaml_ppx"; + inherit (pgocaml) src version meta; + + propagatedBuildInputs = [ pgocaml ppx_tools ppx_tools_versioned rresult ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgsolver/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgsolver/default.nix new file mode 100644 index 000000000000..a1d6fe6486ac --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pgsolver/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchFromGitHub, buildOasisPackage, ounit, tcslib, ocaml-sat-solvers }: + +buildOasisPackage rec { + pname = "pgsolver"; + version = "4.1"; + + src = fetchFromGitHub { + owner = "tcsprojects"; + repo = "pgsolver"; + rev = "v${version}"; + sha256 = "16skrn8qql9djpray25xv66rjgfl20js5wqnxyq1763nmyizyj8a"; + }; + + buildInputs = [ ounit ]; + propagatedBuildInputs = [ tcslib ocaml-sat-solvers ]; + + meta = { + homepage = "https://github.com/tcsprojects/pgsolver"; + description = "A collection of tools for generating, manipulating and - most of all - solving parity games"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ mgttlinger ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/phylogenetics/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/phylogenetics/default.nix new file mode 100644 index 000000000000..1873a4e0c583 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/phylogenetics/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ppx_deriving +, alcotest, biocaml, gnuplot, lacaml, menhir, ocaml-r, owl, printbox }: + +buildDunePackage rec { + pname = "phylogenetics"; + version = "unstable-2020-01-25"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = "752a7d0324709ba919ef43630a270afd45d6b734"; + sha256 = "1zsxpl1yjbw6y6n1q7qk3h0l7c0lxhh8yp8bkxlwnpzlkqq28ycg"; + }; + + minimumOCamlVersion = "4.08"; # e.g., uses Float.min + + checkInputs = [ alcotest ]; + propagatedBuildInputs = [ biocaml gnuplot lacaml menhir ocaml-r owl ppx_deriving printbox ]; + + doCheck = false; # many tests require bppsuite + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Bioinformatics library for Ocaml"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.cecill-b; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix new file mode 100644 index 000000000000..f62978c0a9cd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix @@ -0,0 +1,20 @@ +{stdenv, buildOcaml, fetchurl}: + +buildOcaml rec { + name = "pipebang"; + version = "113.00.00"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/pipebang/archive/${version}.tar.gz"; + sha256 = "0acm2y8wxvnapa248lkgm0vcc44hlwhrjxqkx1awjxzcmarnxhfk"; + }; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/pipebang"; + description = "Syntax extension to transform x |! f into f x"; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix new file mode 100644 index 000000000000..39201d0570b3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims }: + +stdenv.mkDerivation rec { + version = "0.7.7"; + pname = "piqi-ocaml"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "alavrik"; + repo = pname; + rev = "v${version}"; + sha256 = "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"; + }; + + buildInputs = [ ocaml findlib piqi stdlib-shims ]; + + createFindlibDestdir = true; + + installPhase = "DESTDIR=$out make install"; + + meta = with stdenv.lib; { + homepage = "http://piqi.org"; + description = "Universal schema language and a collection of tools built around it. These are the ocaml bindings"; + license = licenses.asl20; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix new file mode 100644 index 000000000000..f3c489723b2f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex_2, easy-format, xmlm, base64 }: + +stdenv.mkDerivation rec { + version = "0.6.15"; + pname = "piqi"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "alavrik"; + repo = pname; + rev = "v${version}"; + sha256 = "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"; + }; + + buildInputs = [ ocaml findlib which ]; + propagatedBuildInputs = [ sedlex_2 xmlm easy-format base64 ]; + + patches = [ ./no-ocamlpath-override.patch ]; + + createFindlibDestdir = true; + + buildPhase = '' + make + make -C piqilib piqilib.cma + ''; + + installPhase = '' + make install; + make ocaml-install; + ''; + + meta = with stdenv.lib; { + homepage = "http://piqi.org"; + description = "Universal schema language and a collection of tools built around it"; + license = licenses.asl20; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/no-ocamlpath-override.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/no-ocamlpath-override.patch new file mode 100644 index 000000000000..bf85a42551c0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/piqi/no-ocamlpath-override.patch @@ -0,0 +1,17 @@ +diff -rupN piqi-0.6.12.orig/make/Makefile.ocaml piqi-0.6.12/make/Makefile.ocaml +--- piqi-0.6.12.orig/make/Makefile.ocaml 2015-03-13 13:35:19.000000000 +0100 ++++ piqi-0.6.12/make/Makefile.ocaml 2015-06-10 21:19:57.231000000 +0200 +@@ -1,13 +1,5 @@ + OCAMLMAKEFILE := $(PIQI_ROOT)/make/OCamlMakefile + +- +-OCAMLPATH := $(PIQI_BUILD)/lib/ocaml +-ifeq ($(SYSTEM),$(filter $(SYSTEM),mingw mingw64)) +-OCAMLPATH := $(shell cygpath -w $(OCAMLPATH)) +-endif +-export OCAMLPATH +- +- + # make sure camlp4o produces pretty-printed text instead of AST + export CAMLP4_O = $(CAMLP4)o -printer o + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/base.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/base.nix new file mode 100644 index 000000000000..a6fe690ebcc7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/base.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, fetchFromGitHub +, ctypes, integers +}: + +buildDunePackage rec { + pname = "posix-base"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "savonet"; + repo = "ocaml-posix"; + rev = "v${version}"; + sha256 = "18px8hfqcfy2lk8105ki3hrxxigs44gs046ba0fqda6wzd0hr82b"; + }; + + useDune2 = true; + + propagatedBuildInputs = [ ctypes integers ]; + + meta = { + homepage = "https://www.liquidsoap.info/ocaml-posix/"; + description = "Base module for the posix bindings"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/socket.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/socket.nix new file mode 100644 index 000000000000..69a469bbeced --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/socket.nix @@ -0,0 +1,16 @@ +{ lib, buildDunePackage, posix-base }: + +buildDunePackage { + pname = "posix-socket"; + + inherit (posix-base) version src useDune2; + + propagatedBuildInputs = [ posix-base ]; + + doCheck = true; + + meta = posix-base.meta // { + description = "Bindings for posix sockets"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/types.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/types.nix new file mode 100644 index 000000000000..2512fe892c13 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/posix/types.nix @@ -0,0 +1,15 @@ +{ lib, buildDunePackage, posix-base }: + +buildDunePackage { + pname = "posix-types"; + + inherit (posix-base) version src useDune2; + + minimumOCamlVersion = "4.03"; + + propagatedBuildInputs = [ posix-base ]; + + meta = posix-base.meta // { + description = "Bindings for the types defined in <sys/types.h>"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pprint/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pprint/default.nix new file mode 100644 index 000000000000..0e4f9fea7d92 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pprint/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "20171003"; + sha256 = "06zwsskri8kaqjdszj9360nf36zvwh886xwf033aija8c9k4w6cx"; + } else { + version = "20140424"; + sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk"; +}; in + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-pprint-${param.version}"; + + src = fetchurl { + url = "http://gallium.inria.fr/~fpottier/pprint/pprint-${param.version}.tar.gz"; + inherit (param) sha256; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + dontBuild = true; + installFlags = [ "-C" "src" ]; + + meta = with stdenv.lib; { + homepage = "http://gallium.inria.fr/~fpottier/pprint/"; + description = "An OCaml adaptation of Wadler’s and Leijen’s prettier printer"; + license = licenses.cecill-c; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix new file mode 100644 index 000000000000..d7d662e74a5e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_blob/default.nix @@ -0,0 +1,21 @@ +{ lib, fetchurl, buildDunePackage, ocaml, alcotest, ocaml-migrate-parsetree }: + +buildDunePackage rec { + pname = "ppx_blob"; + version = "0.4.0"; + + src = fetchurl { + url = "https://github.com/johnwhitington/${pname}/releases/download/${version}/ppx_blob-${version}.tbz"; + sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16"; + }; + + checkInputs = lib.optional doCheck alcotest; + buildInputs = [ ocaml-migrate-parsetree ]; + doCheck = lib.versionAtLeast ocaml.version "4.03"; + + meta = with lib; { + homepage = "https://github.com/johnwhitington/ppx_blob"; + description = "OCaml ppx to include binary data from a file as a string"; + license = licenses.unlicense; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_derivers/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_derivers/default.nix new file mode 100644 index 000000000000..20b78870f93b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_derivers/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchFromGitHub, buildDunePackage }: + +buildDunePackage rec { + pname = "ppx_derivers"; + version = "1.2.1"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "diml"; + repo = pname; + rev = version; + sha256 = "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"; + }; + + meta = { + description = "Shared [@@deriving] plugin registry"; + license = stdenv.lib.licenses.bsd3; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving/default.nix new file mode 100644 index 000000000000..37a3a55229d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchzip, buildDunePackage +, cppo, ppxfind, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree +}: + +buildDunePackage rec { + pname = "ppx_deriving"; + version = "4.5"; + + src = fetchzip { + url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz"; + sha256 = "1v2xldag54n0xk69vv3j4nln9bzkkpq3rildq118sydzsc9v239z"; + }; + + buildInputs = [ ppxfind cppo ounit ]; + propagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ppx_tools result ]; + + doCheck = true; + + meta = with lib; { + description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02."; + maintainers = [ maintainers.maurer ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix new file mode 100644 index 000000000000..4af711ce3950 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, cppo, ppx_tools, ppx_deriving +, ppxfind }: + +buildDunePackage rec { + pname = "ppx_deriving_protobuf"; + version = "2.7"; + + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = pname; + rev = "v${version}"; + sha256 = "0aq4f3gbkhhai0c8i5mcw2kpqy8l610f4dknwkrxh0nsizwbwryn"; + }; + + buildInputs = [ cppo ppx_tools ppxfind ppx_deriving ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/ocaml-ppx/ppx_deriving_protobuf"; + description = "A Protocol Buffers codec generator for OCaml"; + license = licenses.mit; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix new file mode 100644 index 000000000000..92d73e540f48 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, rpclib, ppxlib, ppx_deriving }: + +buildDunePackage rec { + pname = "ppx_deriving_rpc"; + + inherit (rpclib) version src; + + buildInputs = [ ppxlib ]; + + propagatedBuildInputs = [ rpclib ppx_deriving ]; + + meta = with lib; { + homepage = "https://github.com/mirage/ocaml-rpc"; + description = "Ppx deriver for ocaml-rpc"; + license = licenses.isc; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix new file mode 100644 index 000000000000..9af2c6edb320 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDunePackage, fetchFromGitHub, ppxfind, ounit +, ppx_deriving, yojson +}: + +buildDunePackage rec { + pname = "ppx_deriving_yojson"; + version = "3.5.3"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = "ppx_deriving_yojson"; + rev = "v${version}"; + sha256 = "030638gp39mr4hkilrjhd98q4s8gjqxifm6fy6bwqrg74hmrl2y5"; + }; + + buildInputs = [ ppxfind ounit ]; + + propagatedBuildInputs = [ ppx_deriving yojson ]; + + doCheck = true; + + meta = { + description = "A Yojson codec generator for OCaml >= 4.04"; + inherit (src.meta) homepage; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix new file mode 100644 index 000000000000..32865bed6316 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, buildDunePackage, ocaml-migrate-parsetree }: + +buildDunePackage rec { + pname = "ppx_gen_rec"; + version = "1.1.0"; + + minimumOCamlVersion = "4.01"; + + src = fetchurl { + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh"; + }; + + buildInputs = [ ocaml-migrate-parsetree ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/flowtype/ocaml-ppx_gen_rec"; + description = "ocaml preprocessor that generates a recursive module"; + license = licenses.mit; + maintainers = [ maintainers.frontsideair ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix new file mode 100644 index 000000000000..f4977992759d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchurl, buildDunePackage, ocaml +, ounit, ppx_deriving, ppx_tools_versioned +}: + +if !lib.versionAtLeast ocaml.version "4.04" +then throw "ppx_import is not available for OCaml ${ocaml.version}" +else + +buildDunePackage rec { + pname = "ppx_import"; + version = "1.7.1"; + + src = fetchurl { + url = "https://github.com/ocaml-ppx/ppx_import/releases/download/v${version}/ppx_import-v${version}.tbz"; + sha256 = "16dyxfb7syz659rqa7yq36ny5vzl7gkqd7f4m6qm2zkjc1gc8j4v"; + }; + + buildInputs = [ ounit ppx_deriving ]; + propagatedBuildInputs = [ ppx_tools_versioned ]; + + doCheck = true; + + meta = { + description = "A syntax extension that allows to pull in types or signatures from other compiled interface files"; + license = lib.licenses.mit; + homepage = "https://github.com/ocaml-ppx/ppx_import"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix new file mode 100644 index 000000000000..5f3f0916178a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -0,0 +1,69 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib }: + +let param = + let v6_2 = { + version = "6.2"; + sha256 = "0qf4fwnn4hhk52kjw9frv21v23azqnn4mjvwf1hs0nxf7q4kacb5"; + }; in +{ + "4.02" = { + version = "5.0+4.02.0"; + sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"; }; + "4.03" = { + version = "5.0+4.03.0"; + sha256 = "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"; }; + "4.04" = { + version = "unstable-20161114"; + rev = "49c08e2e4ea8fef88692cd1dcc1b38a9133f17ac"; + sha256 = "0ywzfkf5brj33nwh49k9if8x8v433ral25f3nbklfc9vqr06zrfl"; }; + "4.05" = { + version = "5.0+4.05.0"; + sha256 = "1jvvhk6wnkvm7b9zph309ihsc0hyxfpahmxxrq19vx8c674jsdm4"; }; + "4.06" = { + version = "5.1+4.06.0"; + sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; + "4.07" = { + version = "5.1+4.06.0"; + sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; + "4.08" = v6_2; + "4.09" = v6_2; + "4.10" = v6_2; + "4.11" = v6_2; +}.${ocaml.meta.branch}; +in + +let src = fetchFromGitHub { + owner = "alainfrisch"; + repo = pname; + rev = param.rev or param.version; + inherit (param) sha256; + }; + pname = "ppx_tools"; + meta = with stdenv.lib; { + description = "Tools for authors of ppx rewriters"; + homepage = "https://www.lexifi.com/ppx_tools"; + license = licenses.mit; + maintainers = with maintainers; [ vbgl ]; + }; +in +if stdenv.lib.versionAtLeast param.version "6.0" +then + buildDunePackage { + inherit pname src meta; + inherit (param) version; + } +else + stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${param.version}"; + + inherit src; + + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + dontStrip = true; + + meta = meta // { inherit (ocaml.meta) platforms; }; + } diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix new file mode 100644 index 000000000000..7fd939e58ec2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml-migrate-parsetree }: + +buildDunePackage rec { + pname = "ppx_tools_versioned"; + version = "5.3.0"; + + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = pname; + rev = version; + sha256 = "0c735w9mq49dmvkdw9ahfwh0icsk2sbhnfwmdhpibj86phfm17yj"; + }; + + propagatedBuildInputs = [ ocaml-migrate-parsetree ]; + + meta = with lib; { + homepage = "https://github.com/let-def/ppx_tools_versioned"; + description = "Tools for authors of syntactic tools (such as ppx rewriters)"; + license = licenses.gpl2; + maintainers = [ maintainers.volth ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_yojson_conv_lib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_yojson_conv_lib/default.nix new file mode 100644 index 000000000000..442a4126a897 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppx_yojson_conv_lib/default.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fetchFromGitHub, yojson }: + +buildDunePackage rec { + pname = "ppx_yojson_conv_lib"; + version = "0.14.0"; + + minimumOCamlVersion = "4.02.3"; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = pname; + rev = "v${version}"; + sha256 = "12s3xshayy1f8cp9lk6zqwnw60n7cdap55gkksz5w65gdd8bfxmf"; + }; + + propagatedBuildInputs = [ yojson ]; + + meta = with lib; { + description = "Runtime lib for ppx_yojson_conv"; + homepage = "https://github.com/janestreet/ppx_yojson_conv_lib"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxfind/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxfind/default.nix new file mode 100644 index 000000000000..1008dfe62a9a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxfind/default.nix @@ -0,0 +1,29 @@ +{ stdenv, lib, buildDunePackage, fetchurl, ocaml, ocaml-migrate-parsetree }: + +buildDunePackage (rec { + pname = "ppxfind"; + version = "1.4"; + src = fetchurl { + url = "https://github.com/diml/ppxfind/releases/download/${version}/ppxfind-${version}.tbz"; + sha256 = "0wa9vcrc26kirc2cqqs6kmarbi8gqy3dgdfiv9y7nzsgy1liqacq"; + }; + + minimumOCamlVersion = "4.03"; + useDune2 = true; + + buildInputs = [ ocaml-migrate-parsetree ]; + + # Don't run the native `strip' when cross-compiling. + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; + + meta = { + homepage = "https://github.com/diml/ppxfind"; + description = "ocamlfind ppx tool"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + }; +} // ( +if lib.versions.majorMinor ocaml.version == "4.04" then { + dontStrip = true; +} else {} +)) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxlib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxlib/default.nix new file mode 100644 index 000000000000..8821e5621295 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ppxlib/default.nix @@ -0,0 +1,40 @@ +{ lib, fetchFromGitHub, buildDunePackage, ocaml +, legacy ? false +, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio +}: + +let param = + if legacy then { + version = "0.8.1"; + sha256 = "0vm0jajmg8135scbg0x60ivyy5gzv4abwnl7zls2mrw23ac6kml6"; + } else { + version = "0.12.0"; + sha256 = "1cg0is23c05k1rc94zcdz452p9zn11dpqxm1pnifwx5iygz3w0a1"; + }; in + +if lib.versionAtLeast ocaml.version "4.10" && legacy +then throw "ppxlib-${param.version} is not available for OCaml ${ocaml.version}" +else + +buildDunePackage rec { + pname = "ppxlib"; + inherit (param) version; + + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = pname; + rev = version; + inherit (param) sha256; + }; + + propagatedBuildInputs = [ + ocaml-compiler-libs ocaml-migrate-parsetree ppx_derivers stdio + ]; + + meta = { + description = "Comprehensive ppx tool set"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix new file mode 100644 index 000000000000..f2bbfdcec18a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, uucp, uutf }: + +buildDunePackage rec { + pname = "printbox"; + version = "0.4"; + + minimumOCamlVersion = "4.05"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = pname; + rev = version; + sha256 = "0bq2v37v144i00h1zwyqhkfycxailr245n97yff0f7qnidxprix0"; + }; + + checkInputs = lib.optionals doCheck [ uucp uutf ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/c-cube/printbox/"; + description = "Allows to print nested boxes, lists, arrays, tables in several formats"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.romildo ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/process/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/process/default.nix new file mode 100644 index 000000000000..92fb18378037 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/process/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-process-${version}"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "dsheets"; + repo = "ocaml-process"; + rev = version; + sha256 = "0m1ldah5r9gcq09d9jh8lhvr77910dygx5m309k1jm60ah9mdcab"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + meta = { + description = "Easy process control in OCaml"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/prof_spacetime/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/prof_spacetime/default.nix new file mode 100644 index 000000000000..91e30e155db4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/prof_spacetime/default.nix @@ -0,0 +1,43 @@ +{ buildDunePackage +, lib +, fetchFromGitHub +, cmdliner +, spacetime_lib +, yojson +, cohttp +, ocaml_lwt +, cohttp-lwt-unix +, lambdaTerm +, stdlib-shims +}: + +buildDunePackage rec { + pname = "prof_spacetime"; + version = "0.3.0"; + useDune2 = true; + + src = fetchFromGitHub { + owner = "lpw25"; + repo = pname; + rev = version; + sha256 = "1s88gf6x5almmyi58zx4q23w89mvahfjwhvyfg29ya5s1pjbc9hi"; + }; + + buildInputs = [ + cmdliner + spacetime_lib + yojson + cohttp + ocaml_lwt + cohttp-lwt-unix + lambdaTerm + stdlib-shims + ]; + + meta = { + description = "A viewer for OCaml spacetime profiles"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.symphorien ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix new file mode 100644 index 000000000000..485620514e45 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, ocaml, findlib, menhir }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "psmt2-frontend is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + version = "0.2"; + name = "ocaml${ocaml.version}-psmt2-frontend-${version}"; + + src = fetchFromGitHub { + owner = "Coquera"; + repo = "psmt2-frontend"; + rev = version; + sha256 = "097zmbrx4gp2gnrxdmsm9lkkp5450gwi0blpxqy3833m6k5brx3n"; + }; + + prefixKey = "-prefix "; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ ocaml findlib menhir ]; + + createFindlibDestdir = true; + + installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + + meta = { + description = "A simple parser and type-checker for polomorphic extension of the SMT-LIB 2 language"; + license = stdenv.lib.licenses.asl20; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psq/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psq/default.nix new file mode 100644 index 000000000000..ff9c52c50a76 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/psq/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchurl, seq }: + +buildDunePackage rec { + minimumOCamlVersion = "4.03"; + pname = "psq"; + version = "0.2.0"; + + src = fetchurl { + url = "https://github.com/pqwy/psq/releases/download/v${version}/psq-v${version}.tbz"; + sha256 = "1j4lqkq17rskhgcrpgr4n1m1a2b1x35mlxj6f9g05rhpmgvgvknk"; + }; + + propagatedBuildInputs = [ seq ]; + + meta = { + description = "Functional Priority Search Queues for OCaml"; + homepage = "https://github.com/pqwy/psq"; + maintainers = [ lib.maintainers.vbgl ]; + license = lib.licenses.isc; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptime/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptime/default.nix new file mode 100644 index 000000000000..e60a8d5a86d8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptime/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml }: + +stdenv.mkDerivation rec { + version = "0.8.5"; + name = "ocaml${ocaml.version}-ptime-${version}"; + + src = fetchurl { + url = "https://erratique.ch/software/ptime/releases/ptime-${version}.tbz"; + sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg js_of_ocaml ]; + + propagatedBuildInputs = [ result ]; + + buildPhase = "${topkg.run} build --with-js_of_ocaml true"; + + inherit (topkg) installPhase; + + meta = { + homepage = "https://erratique.ch/software/ptime"; + description = "POSIX time for OCaml"; + longDescription = '' + Ptime has platform independent POSIX time support in pure OCaml. + It provides a type to represent a well-defined range of POSIX timestamps + with picosecond precision, conversion with date-time values, conversion + with RFC 3339 timestamps and pretty printing to a human-readable, + locale-independent representation. + + The additional Ptime_clock library provides access to a system POSIX clock + and to the system's current time zone offset. + + Ptime is not a calendar library. + ''; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptmap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptmap/default.nix new file mode 100644 index 000000000000..018f1e3edf06 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptmap/default.nix @@ -0,0 +1,29 @@ +{ lib, buildDunePackage, fetchurl +, seq +, stdlib-shims +}: + +buildDunePackage rec { + pname = "ptmap"; + version = "2.0.5"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/backtracking/ptmap/releases/download/${version}/ptmap-${version}.tbz"; + sha256 = "1apk61fc1y1g7x3m3c91fnskvxp6i0vk5nxwvipj56k7x2pzilgb"; + }; + + propagatedBuildInputs = [ seq ]; + + doCheck = true; + + checkInputs = [ stdlib-shims ]; + + meta = { + homepage = "https://www.lri.fr/~filliatr/software.en.html"; + description = "Maps over integers implemented as Patricia trees"; + license = lib.licenses.lgpl21; + maintainers = with lib.maintainers; [ volth ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptset/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptset/default.nix new file mode 100644 index 000000000000..b9c534e763d0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ptset/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchurl, buildDunePackage +, stdlib-shims +}: + +buildDunePackage rec { + pname = "ptset"; + version = "1.0.1"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/backtracking/ptset/releases/download/${version}/ptset-${version}.tbz"; + sha256 = "1pr80mgk12l93mdq1wfsv2b6ccraxs334d5h92qzjh7bw2g13424"; + }; + + doCheck = true; + + propagatedBuildInputs = [ stdlib-shims ]; + + meta = { + description = "Integer set implementation using Patricia trees"; + homepage = "https://github.com/backtracking/ptset"; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pycaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pycaml/default.nix new file mode 100644 index 000000000000..1aa2590f2ae5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/pycaml/default.nix @@ -0,0 +1,46 @@ +{stdenv, fetchurl, ocaml, findlib, ncurses, python, ocaml_make}: + +# This is the original pycaml version with patches from debian. + +stdenv.mkDerivation { + name = "pycaml-0.82-14"; + + srcs = [ + (fetchurl { + url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82.orig.tar.gz"; + sha256 = "d57be559c8d586c575717d47817986bbdbcebe2ffd16ad6b291525c62868babe"; + }) + + (fetchurl { + url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz"; + sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1"; + }) + ]; + + postPatch = '' + rm -f Makefile* configure* + cp ../debian/META ../debian/Makefile . + sed -i "Makefile" -e's|/usr/share/ocamlmakefile/OCamlMakefile|${ocaml_make}/include/OCamlMakefile|g' + ''; + + sourceRoot = "pycaml"; + patches = [ "../debian/patches/*.patch" ]; + + buildInputs = [ ncurses ocaml findlib python ocaml_make ]; + createFindlibDestdir = true; + + # the Makefile is not shipped with an install target, hence we do it ourselves. + installPhase = '' + ocamlfind install pycaml \ + dllpycaml_stubs.so libpycaml_stubs.a pycaml.a pycaml.cma \ + pycaml.cmi pycaml.cmo pycaml.cmx pycaml.cmxa \ + META + ''; + + meta = { + homepage = "https://github.com/chemoelectric/pycaml"; + description = "Bindings for python and ocaml"; + license = "LGPL"; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/alcotest.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/alcotest.nix new file mode 100644 index 000000000000..4f1baec1e556 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/alcotest.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, qcheck-core, alcotest }: + +buildDunePackage { + pname = "qcheck-alcotest"; + + inherit (qcheck-core) version src; + + propagatedBuildInputs = [ qcheck-core alcotest ]; + + meta = qcheck-core.meta // { + description = "Alcotest backend for qcheck"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/core.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/core.nix new file mode 100644 index 000000000000..fa72a211ef45 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/core.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, fetchFromGitHub }: + +buildDunePackage rec { + pname = "qcheck-core"; + version = "0.15"; + + minimumOCamlVersion = "4.03"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "qcheck"; + rev = version; + sha256 = "1ywaklqm1agvxvzv7pwl8v4zlwc3ykw6l251w43f0gy9cfwqmh3j"; + }; + + meta = { + description = "Core qcheck library"; + homepage = "https://c-cube.github.io/qcheck/"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/default.nix new file mode 100644 index 000000000000..2a0e6c0ae40c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/default.nix @@ -0,0 +1,14 @@ +{ buildDunePackage, qcheck-ounit }: + +buildDunePackage { + pname = "qcheck"; + + inherit (qcheck-ounit) version src; + + propagatedBuildInputs = [ qcheck-ounit ]; + + meta = qcheck-ounit.meta // { + description = "Compatibility package for qcheck"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/ounit.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/ounit.nix new file mode 100644 index 000000000000..06897987a954 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qcheck/ounit.nix @@ -0,0 +1,14 @@ +{ buildDunePackage, qcheck-core, ounit }: + +buildDunePackage { + pname = "qcheck-ounit"; + + inherit (qcheck-core) version src; + + propagatedBuildInputs = [ qcheck-core ounit ]; + + meta = qcheck-core.meta // { + description = "OUnit backend for qcheck"; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qtest/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qtest/default.nix new file mode 100644 index 000000000000..3bbb542bcba5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/qtest/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchFromGitHub, qcheck }: + +buildDunePackage rec { + pname = "qtest"; + version = "2.11"; + + src = fetchFromGitHub { + owner = "vincent-hugot"; + repo = pname; + rev = "v${version}"; + sha256 = "10fi2093ny8pp3jsi1gdqsllp3lr4r5mfcs2hrm7qvbnhrdbb0g3"; + }; + + propagatedBuildInputs = [ qcheck ]; + + meta = { + description = "Inline (Unit) Tests for OCaml"; + inherit (src.meta) homepage; + maintainers = with lib.maintainers; [ vbgl ]; + license = lib.licenses.gpl3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/randomconv/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/randomconv/default.nix new file mode 100644 index 000000000000..7abb153b9be3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/randomconv/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchurl, cstruct }: + +buildDunePackage rec { + pname = "randomconv"; + version = "0.1.3"; + + src = fetchurl { + url = "https://github.com/hannesm/randomconv/releases/download/v${version}/randomconv-v${version}.tbz"; + sha256 = "1iv3r0s5kqxs893b0d55f0r62k777haiahfkkvvfbqwgqsm6la4v"; + }; + + propagatedBuildInputs = [ cstruct ]; + + meta = { + homepage = "https://github.com/hannesm/randomconv"; + description = "Convert from random bytes to random native numbers"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/re/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/re/default.nix new file mode 100644 index 000000000000..8881821490ab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/re/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchzip, buildDunePackage, ocaml, ounit, seq }: + +buildDunePackage rec { + pname = "re"; + version = "1.9.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchzip { + url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz"; + sha256 = "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"; + }; + + buildInputs = lib.optional doCheck ounit; + propagatedBuildInputs = [ seq ]; + doCheck = lib.versionAtLeast ocaml.version "4.04"; + + meta = { + homepage = "https://github.com/ocaml/ocaml-re"; + description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings"; + license = lib.licenses.lgpl2; + maintainers = with lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/react/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/react/default.nix new file mode 100644 index 000000000000..02bba95405d5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/react/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }: + +stdenv.mkDerivation { + name = "ocaml-react-1.2.1"; + + src = fetchurl { + url = "https://erratique.ch/software/react/releases/react-1.2.1.tbz"; + sha256 = "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"; + }; + + buildInputs = [ ocaml findlib topkg ocamlbuild ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + homepage = "https://erratique.ch/software/react"; + description = "Applicative events and signals for OCaml"; + license = licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ maggesi vbmithr gal_bolle]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/reactivedata/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/reactivedata/default.nix new file mode 100644 index 000000000000..667c97276045 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/reactivedata/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, react, opaline }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.04" +then throw "reactiveData is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-reactiveData-0.2.2"; + src = fetchurl { + url = "https://github.com/ocsigen/reactiveData/archive/0.2.2.tar.gz"; + sha256 = "0jzagyp4zla28wykvcgqwd8df71ir0vb4s8akp02cfacd5v86sng"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opaline ]; + propagatedBuildInputs = [ react ]; + + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + + installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; + + meta = with stdenv.lib; { + description = "An OCaml module for functional reactive programming (FRP) based on React"; + homepage = "https://github.com/ocsigen/reactiveData"; + license = licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/resource-pooling/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/resource-pooling/default.nix new file mode 100644 index 000000000000..773fb76bcc75 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/resource-pooling/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, lwt_log }: + +buildDunePackage rec { + version = "1.1"; + pname = "resource-pooling"; + + minimumOCamlVersion = "4.06"; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = pname; + rev = version; + sha256 = "0wsbnwszafdv3gsiiaslgf6m6pfx74h7h19i0gp2c4ivdiv3wck9"; + }; + + propagatedBuildInputs = [ lwt_log ]; + + doCheck = true; + + meta = { + inherit (src.meta) homepage; + description = "A library for pooling resources like connections, threads, or similar"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rope/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rope/default.nix new file mode 100644 index 000000000000..41d2d258b97a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rope/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, dune, benchmark }: + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" + then rec { + version = "0.6.2"; + url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz"; + sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i"; + buildInputs = [ dune ]; + extra = { + buildPhase = "dune build -p rope"; + inherit (dune) installPhase; + }; + } else { + version = "0.5"; + url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-0.5.tar.gz"; + sha256 = "05fr2f5ch2rqhyaj06rv5218sbg99p1m9pq5sklk04hpslxig21f"; + buildInputs = [ ocamlbuild ]; + extra = { createFindlibDestdir = true; }; + }; +in + +stdenv.mkDerivation ({ + name = "ocaml${ocaml.version}-rope-${param.version}"; + + src = fetchurl { + inherit (param) url sha256; + }; + + buildInputs = [ ocaml findlib benchmark ] ++ param.buildInputs; + + meta = { + homepage = "http://rope.forge.ocamlcore.org/"; + platforms = ocaml.meta.platforms or []; + description = ''Ropes ("heavyweight strings") in OCaml''; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} // param.extra) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rpclib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rpclib/default.nix new file mode 100644 index 000000000000..9216a489248b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rpclib/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildDunePackage, alcotest, cmdliner, rresult, result, xmlm, yojson }: + +buildDunePackage rec { + pname = "rpclib"; + version = "7.0.0"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-rpc"; + rev = "v${version}"; + sha256 = "0d8nb272mjxkq5ddn65cy9gjpa8yvd0v3jv3wp5xfh9gj29wd2jj"; + }; + + buildInputs = [ alcotest cmdliner yojson ]; + propagatedBuildInputs = [ rresult result xmlm ]; + + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/mirage/ocaml-rpc"; + description = "Light library to deal with RPCs in OCaml"; + license = licenses.isc; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rresult/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rresult/default.nix new file mode 100644 index 000000000000..cdaa7857398f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/rresult/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-rresult-${version}"; + version = "0.6.0"; + src = fetchurl { + url = "https://erratique.ch/software/rresult/releases/rresult-${version}.tbz"; + sha256 = "1k69a3gvrk7f2cshwjzvk7818f0bwxhacgd14wxy6d4gmrggci86"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ result ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + license = stdenv.lib.licenses.isc; + homepage = "https://erratique.ch/software/rresult"; + description = "Result value combinators for OCaml"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/safepass/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/safepass/default.nix new file mode 100644 index 000000000000..884bcdebba4f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/safepass/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }: + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "2.0"; + url = "http://forge.ocamlcore.org/frs/download.php/1615/ocaml-safepass-2.0.tgz"; + sha256 = "1zxx3wcyzhxxvm5w9c21y7hpa11h67paaaz9mfsyiqk6fs6hcvmw"; + } else { + version = "1.3"; + url = "http://forge.ocamlcore.org/frs/download.php/1432/ocaml-safepass-1.3.tgz"; + sha256 = "0lb8xbpyc5d1zml7s7mmcr6y2ipwdp7qz73lkv9asy7dyi6cj15g"; + }; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-safepass-${param.version}"; + src = fetchurl { + inherit (param) url sha256; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://ocaml-safepass.forge.ocamlcore.org/"; + description = "An OCaml library offering facilities for the safe storage of user passwords"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/Makefile.config.example.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/Makefile.config.example.patch new file mode 100644 index 000000000000..4f2cc99e76b2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/Makefile.config.example.patch @@ -0,0 +1,9 @@ +--- sawja-1.5-orig/Makefile.config.example 2013-10-30 08:35:29.000000000 +0100 ++++ sawja-1.5/Makefile.config.example 2014-07-05 18:54:37.902423482 +0200 +@@ -1,6 +1,3 @@ +-export OCAMLFIND_DESTDIR=$(LOCALDEST) +-export OCAMLPATH=$(LOCALDEST) +- + RECODE=-charset utf-8 + DOCDIR = doc/api + diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/configure.sh.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/configure.sh.patch new file mode 100644 index 000000000000..8165de242f57 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/configure.sh.patch @@ -0,0 +1,11 @@ +--- sawja-1.5-orig/configure.sh 2013-10-30 08:35:29.000000000 +0100 ++++ sawja-1.5/configure.sh 2014-07-05 18:50:26.833798254 +0200 +@@ -39,7 +39,7 @@ + DESTDIR= + # The ocamlpath variable for the compiler to locate the locally-installed + # packages (depends on LOCALDEST) +-OCAMLPATH= ++#OCAMLPATH= + # The path to ocamlfind + FINDER=`which ocamlfind` + # The perl executable diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix new file mode 100644 index 000000000000..c6cda7d05736 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub, which, perl, ocaml, findlib, javalib }: + +let + pname = "sawja"; + version = "1.5.8"; + webpage = "http://sawja.inria.fr/"; +in + +if !stdenv.lib.versionAtLeast ocaml.version "4.07" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "javalib-team"; + repo = pname; + rev = "v${version}"; + sha256 = "0rawr0jav33rvagm8sxc0arc7ya1fd9w5nng3lhfk8p02f9z8wrp"; + }; + + buildInputs = [ which perl ocaml findlib ]; + + patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; + + createFindlibDestdir = true; + + preConfigure = "patchShebangs ./configure.sh"; + + configureScript = "./configure.sh"; + dontAddPrefix = "true"; + + propagatedBuildInputs = [ javalib ]; + + meta = with stdenv.lib; { + description = "A library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs"; + homepage = webpage; + license = licenses.gpl3Plus; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/secp256k1/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/secp256k1/default.nix new file mode 100644 index 000000000000..aab98a9cc6b3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/secp256k1/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, base, stdio, dune-configurator, secp256k1 }: + +buildDunePackage rec { + pname = "secp256k1"; + version = "0.4.1"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "dakk"; + repo = "secp256k1-ml"; + rev = version; + sha256 = "0jkd7mc5kynhg0b76dfk70pww97qsq2jbd991634i16xf8qja9fj"; + }; + + buildInputs = [ base stdio dune-configurator secp256k1 ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/dakk/secp256k1-ml"; + description = "Elliptic curve library secp256k1 wrapper for Ocaml"; + license = licenses.mit; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/2.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/2.nix new file mode 100644 index 000000000000..b1a892d5b804 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/2.nix @@ -0,0 +1,61 @@ +{ lib +, fetchFromGitHub +, fetchurl +, buildDunePackage +, ocaml +, gen +, ppx_tools_versioned +, ocaml-migrate-parsetree +, uchar +}: + +if lib.versionOlder ocaml.version "4.02.3" +then throw "sedlex is not available for OCaml ${ocaml.version}" +else + +let + DerivedCoreProperties = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt"; + sha256 = "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"; + }; + DerivedGeneralCategory = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt"; + sha256 = "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"; + }; + PropList = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt"; + sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"; + }; +in +buildDunePackage rec { + pname = "sedlex"; + version = "2.1"; + + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "sedlex"; + rev = "v${version}"; + sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"; + }; + + propagatedBuildInputs = [ + gen uchar ocaml-migrate-parsetree ppx_tools_versioned + ]; + + preBuild = '' + ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt + ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt + ln -s ${PropList} src/generator/data/PropList.txt + ''; + + doCheck = true; + + dontStrip = true; + + meta = { + homepage = "https://github.com/ocaml-community/sedlex"; + description = "An OCaml lexer generator for Unicode"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.marsam ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix new file mode 100644 index 000000000000..d34b18bf059e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "sedlex is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-sedlex-${version}"; + version = "1.99.5"; + + src = fetchzip { + url = "https://github.com/ocaml-community/sedlex/archive/fb84e1766fc4b29e79ec40029ffee5cdb37b392f.tar.gz"; + sha256 = "0phnqyn6mpv5byr1kkphl24y9q9fb2k3xg9yb457h5816q6ya72n"; + }; + + buildInputs = [ ocaml findlib ]; + + propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ]; + + buildFlags = [ "all" "opt" ]; + + createFindlibDestdir = true; + + dontStrip = true; + + meta = { + homepage = "https://github.com/ocaml-community/sedlex"; + description = "An OCaml lexer generator for Unicode"; + license = stdenv.lib.licenses.mit; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix new file mode 100644 index 000000000000..7a50d1517db8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }: + +stdenv.mkDerivation ({ + version = "0.1"; + name = "ocaml${ocaml.version}-seq-0.1"; + + meta = { + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + homepage = "https://github.com/c-cube/seq"; + inherit (ocaml.meta) platforms; + }; + +} // (if stdenv.lib.versionOlder ocaml.version "4.07" then { + + src = fetchFromGitHub { + owner = "c-cube"; + repo = "seq"; + rev = "0.1"; + sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + createFindlibDestdir = true; + + meta.description = "Compatibility package for OCaml’s standard iterator type starting from 4.07"; + +} else { + + src = ./src-base; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq + cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq + ''; + + meta.description = "dummy backward-compatibility package for iterators"; + +})) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/src-base/META b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/src-base/META new file mode 100644 index 000000000000..06b95eff3f8d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/seq/src-base/META @@ -0,0 +1,4 @@ +name="seq" +version="[distributed with OCaml 4.07 or above]" +description="dummy backward-compatibility package for iterators" +requires="" diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix new file mode 100644 index 000000000000..5d8154565806 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }: + +if stdenv.lib.versionAtLeast ocaml.version "4.10" +then throw "sodium is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-sodium"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "dsheets"; + repo = "ocaml-sodium"; + rev = version; + sha256 = "124gpi1jhac46x05gp5viykyrafnlp03v1cmkl13c6pgcs8w04pv"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ ctypes libsodium ]; + + createFindlibDestdir = true; + + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + + meta = with stdenv.lib; { + homepage = "https://github.com/dsheets/ocaml-sodium"; + description = "Binding to libsodium 1.0.9+"; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.rixed ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sosa/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sosa/default.nix new file mode 100644 index 000000000000..4278989341f1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sosa/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchFromGitHub, stdenv +, findlib, nonstd, ocaml, ocamlbuild +}: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-sosa-${version}"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "hammerlab"; + repo = "sosa"; + rev = "sosa.${version}"; + sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk"; + }; + + buildInputs = [ nonstd ocaml ocamlbuild findlib ]; + + buildPhase = "make build"; + + createFindlibDestdir = true; + + doCheck = true; + + meta = with lib; { + homepage = http://www.hammerlab.org/docs/sosa/master/index.html; + description = "Sane OCaml String API"; + license = licenses.isc; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spacetime_lib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spacetime_lib/default.nix new file mode 100644 index 000000000000..db6d184655cb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spacetime_lib/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, owee }: + +buildDunePackage rec { + pname = "spacetime_lib"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "lpw25"; + repo = "spacetime_lib"; + rev = version; + sha256 = "0biisgbycr5v3nm5jp8i0h6vq76vzasdjkcgh8yr7fhxc81jgv3p"; + }; + + propagatedBuildInputs = [ owee ]; + + preConfigure = '' + bash ./configure.sh + ''; + + meta = { + description = "An OCaml library providing some simple operations for handling OCaml “spacetime” profiles"; + inherit (src.meta) homepage; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spelll/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spelll/default.nix new file mode 100644 index 000000000000..5901dcb896ac --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/spelll/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage +, seq +}: + +buildDunePackage rec { + pname = "spelll"; + version = "0.3"; + + src = fetchFromGitHub { + owner = "c-cube"; + repo = pname; + rev = "v${version}"; + sha256 = "03adqisgsazsxdkrypp05k3g91hydfgcif2014il63gdbd9nhzlh"; + }; + + propagatedBuildInputs = [ seq ]; + + meta = { + inherit (src.meta) homepage; + description = "Fuzzy string searching, using Levenshtein automaton"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/default.nix new file mode 100644 index 000000000000..df6b6f0854d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, buildDunePackage, ocaml_lwt +, lwt_ppx, ocaml-migrate-parsetree, ppx_tools_versioned, csv, ocaml_sqlite3 +}: + +buildDunePackage rec { + pname = "sqlexpr"; + version = "0.9.0"; + + src = fetchurl { + url = "https://github.com/mfp/ocaml-sqlexpr/releases/download/${version}/ocaml-sqlexpr-${version}.tar.gz"; + sha256 = "0z0bkzi1mh0m39alzr2ds7hjpfxffx6azpfsj2wpaxrg64ks8ypd"; + }; + + buildInputs = [ lwt_ppx ocaml-migrate-parsetree ppx_tools_versioned ]; + propagatedBuildInputs = [ ocaml_lwt csv ocaml_sqlite3 ]; + doCheck = true; + + preBuild = "rm META.sqlexpr"; + + meta = { + description = "Type-safe, convenient SQLite database access"; + homepage = "https://github.com/mfp/ocaml-sqlexpr"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/ppx.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/ppx.nix new file mode 100644 index 000000000000..7cc455b01957 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlexpr/ppx.nix @@ -0,0 +1,11 @@ +{ buildDunePackage, sqlexpr, ounit +, ppx_core, ppx_tools_versioned, re, lwt_ppx +}: + +buildDunePackage { + pname = "ppx_sqlexpr"; + inherit (sqlexpr) version src meta; + + buildInputs = [ sqlexpr ounit ppx_core ppx_tools_versioned re lwt_ppx ]; + doCheck = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3/default.nix new file mode 100644 index 000000000000..2cc02abbb44d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, sqlite, pkgconfig, buildDunePackage }: + +buildDunePackage rec { + pname = "sqlite3"; + version = "5.0.1"; + minimumOCamlVersion = "4.05"; + + src = fetchurl { + url = "https://github.com/mmottl/sqlite3-ocaml/releases/download/${version}/sqlite3-${version}.tbz"; + sha256 = "0iymkszrs6qwak0vadfzc8yd8jfwn06zl08ggb4jr2mgk2c8mmsn"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ sqlite ]; + + meta = with lib; { + homepage = "http://mmottl.github.io/sqlite3-ocaml/"; + description = "OCaml bindings to the SQLite 3 database access library"; + license = licenses.mit; + maintainers = with maintainers; [ + maggesi vbgl + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3EZ/default.nix new file mode 100644 index 000000000000..a3e26a31a8f9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/sqlite3EZ/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12"; + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "sqlite3EZ is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + name = "ocaml-sqlite3EZ-0.1.0"; + + src = fetchurl { + url = "https://github.com/mlin/ocaml-sqlite3EZ/archive/v0.1.0.tar.gz"; + sha256 = "8ed2c5d5914a65cbd95589ef11bfb8b38a020eb850cdd49b8adce7ee3a563748"; + }; + + buildInputs = [ ocaml findlib ocamlbuild twt ]; + + propagatedBuildInputs = [ ocaml_sqlite3 ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/mlin/ocaml-sqlite3EZ"; + description = "A thin wrapper for sqlite3-ocaml with a simplified interface"; + license = licenses.mit; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/srt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/srt/default.nix new file mode 100644 index 000000000000..7f0897ae6626 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/srt/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDunePackage, fetchFromGitHub +, dune-configurator +, posix-socket +, srt +}: + +buildDunePackage rec { + pname = "srt"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "savonet"; + repo = "ocaml-srt"; + rev = "v${version}"; + sha256 = "0xh89w4j7lljvpy2n08x6m9kw88f82snmzf23kp0gw637sjnrj6f"; + }; + + useDune2 = true; + + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ posix-socket srt ]; + + meta = { + description = "OCaml bindings for the libsrt library"; + license = lib.licenses.gpl2Only; + inherit (src.meta) homepage; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ssl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ssl/default.nix new file mode 100644 index 000000000000..9a574a0457a5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ssl/default.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage, fetchFromGitHub, pkg-config, openssl }: + +buildDunePackage rec { + pname = "ssl"; + version = "0.5.9"; + + src = fetchFromGitHub { + owner = "savonet"; + repo = "ocaml-ssl"; + rev = version; + sha256 = "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"; + }; + + nativeBuildInputs = [ pkg-config ]; + propagatedBuildInputs = [openssl]; + + meta = { + homepage = "http://savonet.rastageeks.org/"; + description = "OCaml bindings for libssl "; + license = "LGPL+link exception"; + maintainers = [ + lib.maintainers.maggesi + ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdint/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdint/default.nix new file mode 100644 index 000000000000..bffef61956e2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdint/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, buildDunePackage }: + +buildDunePackage rec { + pname = "stdint"; + version = "0.6.0"; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + owner = "andrenth"; + repo = "ocaml-stdint"; + rev = version; + sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y"; + }; + + meta = { + description = "Various signed and unsigned integers for OCaml"; + homepage = "https://github.com/andrenth/ocaml-stdint"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.gebner ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdlib-shims/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdlib-shims/default.nix new file mode 100644 index 000000000000..d76ec29e63aa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stdlib-shims/default.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, lib, fetchurl, ocaml }: + +buildDunePackage rec { + pname = "stdlib-shims"; + version = "0.1.0"; + src = fetchurl { + url = "https://github.com/ocaml/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "1jv6yb47f66239m7hsz7zzw3i48mjpbvfgpszws48apqx63wjwsk"; + }; + minimumOCamlVersion = "4.02"; + doCheck = true; + meta = { + description = "Shims for forward-compatibility between versions of the OCaml standard library"; + homepage = "https://github.com/ocaml/stdlib-shims"; + inherit (ocaml.meta) license; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stringext/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stringext/default.nix new file mode 100644 index 000000000000..bd0187dc5f4f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/stringext/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit, qcheck +# Optionally enable tests; test script use OCaml-4.01+ features +, doCheck ? stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01" +}: + +let version = "1.4.3"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-stringext-${version}"; + + src = fetchzip { + url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz"; + sha256 = "121k79vjazvsd254yg391fp4spsd1p32amccrahd0g6hjhf5w6sl"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ounit qcheck ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out" + + stdenv.lib.optionalString doCheck " --enable-tests"; + buildPhase = "ocaml setup.ml -build"; + inherit doCheck; + checkPhase = "ocaml setup.ml -test"; + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = { + homepage = "https://github.com/rgrinberg/stringext"; + platforms = ocaml.meta.platforms or []; + description = "Extra string functions for OCaml"; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/syslog/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/syslog/default.nix new file mode 100644 index 000000000000..2fa032225e7e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/syslog/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03.0"; + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-syslog"; + version = "1.5"; + + src = fetchFromGitHub { + owner = "rixed"; + repo = "ocaml-syslog"; + rev = "v${version}"; + sha256 = "1kqpc55ppzv9n555qgqpda49n7nvkqimzisyjx2a7338r7q4r5bw"; + }; + + buildInputs = [ ocaml findlib ]; + + buildFlags = [ "all" "opt" ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/rixed/ocaml-syslog"; + description = "Simple wrapper to access the system logger from OCaml"; + license = licenses.lgpl21Plus; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.rixed ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tcslib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tcslib/default.nix new file mode 100644 index 000000000000..a8ddea79b77f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tcslib/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, ocaml_extlib, num }: + +buildOasisPackage rec { + pname = "tcslib"; + version = "0.3"; + + minimumOCamlVersion = "4.03.0"; + + src = fetchFromGitHub { + owner = "tcsprojects"; + repo = "tcslib"; + rev = "v${version}"; + sha256 = "05g6m82blsccq8wx8knxv6a5fzww7hi624jx91f9h87nk2fsplhi"; + }; + + buildInputs = [ ounit ]; + propagatedBuildInputs = [ ocaml_extlib num ]; + + meta = { + homepage = "https://github.com/tcsprojects/tcslib"; + description = "A multi-purpose library for OCaml"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ mgttlinger ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix new file mode 100644 index 000000000000..b52561d760e9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix @@ -0,0 +1,33 @@ +{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct +, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng +, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime +, hacl_x25519, fiat-p256, hkdf, logs, alcotest }: + +buildDunePackage rec { + minimumOCamlVersion = "4.08"; + + version = "0.12.5"; + pname = "tls"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz"; + sha256 = "1zsh3fx8l3d9lc9w516apzabqsix2ss8nv6kbbzjmp2d4hwh818b"; + }; + + useDune2 = true; + + doCheck = true; + checkInputs = [ cstruct-unix ounit2 alcotest ]; + + propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp + sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng + x509 domain-name fmt ocaml_lwt ptime hacl_x25519 fiat-p256 + hkdf logs ]; + + meta = with lib; { + homepage = "https://github.com/mirleft/ocaml-tls"; + description = "TLS in pure OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/toml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/toml/default.nix new file mode 100644 index 000000000000..0e25d9bc6b65 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/toml/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage +, iso8601, menhir +}: + +buildDunePackage rec { + pname = "toml"; + version = "5.0.0"; + src = fetchFromGitHub { + owner = "ocaml-toml"; + repo = "to.ml"; + rev = "v${version}"; + sha256 = "1505kwcwklcfaxw8wckajm8kc6yrlikmxyhi8f8cpvhlw9ys90nj"; + }; + + buildInputs = [ menhir ]; + propagatedBuildInputs = [ iso8601 ]; + + meta = { + description = "Implementation in OCaml of the Toml minimal langage"; + homepage = "http://ocaml-toml.github.io/To.ml"; + license = lib.licenses.lgpl3; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/topkg/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/topkg/default.nix new file mode 100644 index 000000000000..1bd926b1ddbf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/topkg/default.nix @@ -0,0 +1,54 @@ +/* Topkg is a packager for distributing OCaml software. This derivation +provides facilities to describe derivations for OCaml libraries +using topkg. +The `buildPhase` and `installPhase` attributes can be reused directly +in many cases. When more fine-grained control on how to run the “topkg” +build system is required, the attribute `run` can be used. +*/ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opaline }: + +let + param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" then { + version = "1.0.3"; + sha256 = "0b77gsz9bqby8v77kfi4lans47x9p2lmzanzwins5r29maphb8y6"; + } else { + version = "1.0.0"; + sha256 = "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"; + propagatedBuildInputs = [ result ]; + }; + +/* This command allows to run the “topkg” build system. + * It is usually called with `build` or `test` as argument. + * Packages that use `topkg` may call this command as part of + * their `buildPhase` or `checkPhase`. +*/ + run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml"; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-topkg-${version}"; + inherit (param) version; + + src = fetchurl { + url = "https://erratique.ch/software/topkg/releases/topkg-${version}.tbz"; + inherit (param) sha256; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = param.propagatedBuildInputs or []; + + buildPhase = "${run} build"; + createFindlibDestdir = true; + installPhase = "${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; + + passthru = { inherit run; }; + + meta = { + homepage = "https://erratique.ch/software/topkg"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + description = "A packager for distributing OCaml software"; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/torch/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/torch/default.nix new file mode 100644 index 000000000000..0e2bdf7311c2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/torch/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, buildDunePackage +, fetchFromGitHub +, cmdliner +, ctypes +, npy +, ocaml-compiler-libs +, ppx_custom_printf +, ppx_expect +, ppx_sexp_conv +, sexplib +, stdio +, pytorch +}: + +buildDunePackage rec { + pname = "torch"; + version = "0.10"; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + owner = "LaurentMazare"; + repo = "ocaml-${pname}"; + rev = version; + sha256 = "1rqrv6hbical8chk0bl2nf60q6m4b5d1gab9fc5q03vkz2987f9b"; + }; + + propagatedBuildInputs = [ + cmdliner + ctypes + npy + ocaml-compiler-libs + pytorch + pytorch.dev + ppx_custom_printf + ppx_expect + ppx_sexp_conv + sexplib + stdio + ]; + + preBuild = ''export LIBTORCH=${pytorch.dev}/''; + + doCheck = !stdenv.isAarch64; + checkPhase = "dune runtest"; + + meta = with lib; { + inherit (src.meta) homepage; + description = "Ocaml bindings to Pytorch"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsdl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsdl/default.nix new file mode 100644 index 000000000000..f614c476140e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsdl/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "tsdl is not available for OCaml ${ocaml.version}" +else + +let + pname = "tsdl"; + version = "0.9.7"; + webpage = "https://erratique.ch/software/${pname}"; +in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + propagatedBuildInputs = [ SDL2 ctypes ]; + + preConfigure = '' + # The following is done to avoid an additional dependency (ncurses) + # due to linking in the custom bytecode runtime. Instead, just + # compile directly into a native binary, even if it's just a + # temporary build product. + substituteInPlace myocamlbuild.ml \ + --replace ".byte" ".native" + ''; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + homepage = webpage; + description = "Thin bindings to the cross-platform SDL library"; + license = licenses.isc; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsort/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsort/default.nix new file mode 100644 index 000000000000..d47236ba96b8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tsort/default.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, fetchFromGitHub, containers }: + +buildDunePackage rec { + pname = "tsort"; + version = "2.0.0"; + src = fetchFromGitHub { + owner = "dmbaturin"; + repo = "ocaml-tsort"; + rev = version; + sha256 = "0i67ys5p5i8q9p0nhkq4pjg9jav8dy0fiy975a365j7m6bhrwgc1"; + }; + + propagatedBuildInputs = [ containers ]; + + meta = { + description = "Easy to use and user-friendly topological sort"; + inherit (src.meta) homepage; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tuntap/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tuntap/default.nix new file mode 100644 index 000000000000..a4536316ba41 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tuntap/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchurl +, ipaddr, macaddr, cmdliner +}: + +buildDunePackage rec { + pname = "tuntap"; + version = "2.0.0"; + + minimumOCamlVersion = "4.04.2"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-tuntap/releases/download/v${version}/tuntap-v${version}.tbz"; + sha256 = "12wmls28h3jzikwyfw08d5f7ycsc9njwzbhd3qk2l8jnf5rakfsa"; + }; + + propagatedBuildInputs = [ ipaddr macaddr cmdliner ]; + + # tests manipulate network devices and use network + # also depend on LWT 5 + doCheck = false; + + meta = { + description = "Bindings to the UNIX tuntap facility"; + license = lib.licenses.isc; + homepage = "https://github.com/mirage/ocaml-tuntap"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/twt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/twt/default.nix new file mode 100644 index 000000000000..235d04ba99bd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/twt/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchzip, ocaml, findlib }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-twt-0.94.0"; + + src = fetchzip { + url = "https://github.com/mlin/twt/archive/v0.94.0.tar.gz"; + sha256 = "0298gdgzl4cifxnc1d8sbrvz1lkiq5r5ifkq1fparm6gvqywpf65"; + }; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + configurePhase = '' + mkdir $out/bin + ''; + + dontBuild = true; + + installFlags = [ "PREFIX=$(out)" ]; + + dontStrip = true; + + meta = with stdenv.lib; { + homepage = "http://people.csail.mit.edu/mikelin/ocaml+twt/"; + description = "“The Whitespace Thing” for OCaml"; + license = licenses.mit; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/108.08.00.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/108.08.00.nix new file mode 100644 index 000000000000..69439c1c265f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/108.08.00.nix @@ -0,0 +1,27 @@ +{stdenv, fetchurl, ocaml, findlib, camlp4}: + +if !stdenv.lib.versionAtLeast ocaml.version "3.12" +|| stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "type_conv-108.08.00 is not available for OCaml ${ocaml.version}" else + +stdenv.mkDerivation { + name = "ocaml-type_conv-108.08.00"; + + src = fetchurl { + url = "https://ocaml.janestreet.com/ocaml-core/108.08.00/individual/type_conv-108.08.00.tar.gz"; + sha256 = "08ysikwwp69zvc147lzzg79nwlrzrk738rj0ggcfadi8h5il42sl"; + }; + + buildInputs = [ocaml findlib camlp4]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://ocaml.janestreet.com/"; + description = "Support library for OCaml preprocessor type conversions"; + license = licenses.asl20; + branch = "108"; + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ maggesi ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/109.60.01.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/109.60.01.nix new file mode 100644 index 000000000000..a970091df51d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/109.60.01.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, ocaml, findlib, camlp4}: + +if !stdenv.lib.versionAtLeast ocaml.version "4.00" +|| stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "type_conv-109.60.01 is not available for OCaml ${ocaml.version}" else + +stdenv.mkDerivation { + name = "ocaml-type_conv-109.60.01"; + + src = fetchurl { + url = "https://github.com/janestreet/type_conv/archive/109.60.01.tar.gz"; + sha256 = "0lpxri68glgq1z2pp02rp45cb909xywbff8d4idljrf6fzzil2zx"; + }; + + buildInputs = [ocaml findlib camlp4]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://forge.ocamlcore.org/projects/type-conv/"; + description = "Support library for OCaml preprocessor type conversions"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms or []; + maintainers = with stdenv.lib.maintainers; [ maggesi ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/112.01.01.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/112.01.01.nix new file mode 100644 index 000000000000..ee0ce0ae0be1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/type_conv/112.01.01.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, buildOcaml}: + +buildOcaml rec { + minimumSupportedOcamlVersion = "4.02"; + + name = "type_conv"; + version = "113.00.02"; + + src = fetchurl { + url = "https://github.com/janestreet/type_conv/archive/${version}.tar.gz"; + sha256 = "1718yl2q8zandrs4xqffkfmssfld1iz62dzcqdm925735c1x01fk"; + }; + + meta = { + homepage = "https://github.com/janestreet/type_conv/"; + description = "Support library for preprocessor type conversions"; + license = stdenv.lib.licenses.asl20; + maintainers = with stdenv.lib.maintainers; [ maggesi ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/typerep/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/typerep/default.nix new file mode 100644 index 000000000000..859bd21b0a7c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/typerep/default.nix @@ -0,0 +1,23 @@ +{stdenv, buildOcaml, fetchurl, type_conv}: + +buildOcaml rec { + name = "typerep"; + version = "112.24.00"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/typerep/archive/${version}.tar.gz"; + sha256 = "4f1ab611a00aaf774e9774b26b687233e0c70d91f684415a876f094a9969eada"; + }; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/typerep"; + description = "Runtime types for OCaml (beta version)"; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix new file mode 100644 index 000000000000..5d5e7dedd233 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, fetchurl, re, uutf }: + +buildDunePackage rec { + pname = "tyxml"; + version = "4.4.0"; + + src = fetchurl { + url = "https://github.com/ocsigen/tyxml/releases/download/${version}/tyxml-${version}.tbz"; + sha256 = "0c150h2f4c4id73ickkdqkir3jya66m6c7f5jxlp4caw9bfr8qsi"; + }; + + propagatedBuildInputs = [ uutf re ]; + + meta = with lib; { + homepage = "http://ocsigen.org/tyxml/"; + description = "A library that makes it almost impossible for your OCaml programs to generate wrong XML output, using static typing"; + license = licenses.lgpl21; + maintainers = with maintainers; [ + gal_bolle vbgl + ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix new file mode 100644 index 000000000000..819d8527b2a5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-uchar-0.0.2"; + + src = fetchurl { + url = "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz"; + sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"; + }; + + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ findlib ocaml ocamlbuild ]; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}"; + installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; + configurePlatforms = []; + + meta = { + description = "Compatibility library for OCaml’s Uchar module"; + inherit (ocaml.meta) platforms license; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix new file mode 100644 index 000000000000..d32fcf07b6cc --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4 }: + +let + pname = "ulex"; + param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" then { + version = "1.2"; + sha256 = "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic"; + } else { + version = "1.1"; + sha256 = "0cmscxcmcxhlshh4jd0lzw5ffzns12x3bj7h27smbc8waxkwffhl"; + }; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + inherit (param) version; + + src = fetchFromGitHub { + owner = "whitequark"; + repo = pname; + rev = "v${version}"; + inherit (param) sha256; + }; + + createFindlibDestdir = true; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ camlp4 ]; + + buildFlags = [ "all" "all.opt" ]; + + meta = { + inherit (src.meta) homepage; + description = "A lexer generator for Unicode and OCaml"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = [ stdenv.lib.maintainers.roconnor ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix new file mode 100644 index 000000000000..6a7c03b9bb6b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchurl, buildDunePackage, ounit +, re, stringext +}: + +buildDunePackage rec { + minimumOCamlVersion = "4.03"; + pname = "uri"; + version = "3.1.0"; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0hxc2mshmqxz2qmjya47dzf858s6lsf3xvqswpzprkvhv0zq4ln4"; + }; + + buildInputs = [ ounit ]; + propagatedBuildInputs = [ re stringext ]; + doCheck = true; + + meta = { + homepage = "https://github.com/mirage/ocaml-uri"; + description = "RFC3986 URI parsing library for OCaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix new file mode 100644 index 000000000000..c6f979e5a3e7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix @@ -0,0 +1,13 @@ +{ lib, ocaml, buildDunePackage, uri, ounit, ppx_sexp_conv, sexplib0 }: + +if !lib.versionAtLeast ocaml.version "4.04" +then throw "uri-sexp is not available for OCaml ${ocaml.version}" +else + +buildDunePackage { + pname = "uri-sexp"; + inherit (uri) version src doCheck meta; + + buildInputs = [ ounit ]; + propagatedBuildInputs = [ ppx_sexp_conv sexplib0 uri ]; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucd/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucd/default.nix new file mode 100644 index 000000000000..355b177b204f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucd/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, xmlm, topkg }: + +let + pname = "uucd"; + webpage = "https://erratique.ch/software/${pname}"; +in +stdenv.mkDerivation rec { + name = "ocaml-${pname}-${version}"; + version = "13.0.0"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1fg77hg4ibidkv1x8hhzl8z3rzmyymn8m4i35jrdibb8adigi8v2"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + inherit (topkg) buildPhase installPhase; + + propagatedBuildInputs = [ xmlm ]; + + meta = with stdenv.lib; { + description = "An OCaml module to decode the data of the Unicode character database from its XML representation"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.vbgl ]; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucp/default.nix new file mode 100644 index 000000000000..d657a6f02053 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uucp/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, uunf }: + +let + pname = "uucp"; + version = "11.0.0"; + webpage = "https://erratique.ch/software/${pname}"; +in + +assert stdenv.lib.versionAtLeast ocaml.version "4.01"; + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "0pidg2pmqsifmk4xx9cc5p5jprhg26xb68g1xddjm7sjzbdzhlm4"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg uutf uunf ]; + + propagatedBuildInputs = [ uchar ]; + + buildPhase = "${topkg.buildPhase} --with-cmdliner false"; + + inherit (topkg) installPhase; + + meta = with stdenv.lib; { + description = "An OCaml library providing efficient access to a selection of character properties of the Unicode character database"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuidm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuidm/default.nix new file mode 100644 index 000000000000..399f147bd0d1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuidm/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }: + +stdenv.mkDerivation rec { + version = "0.9.7"; + pname = "uuidm"; + src = fetchurl { + url = "https://erratique.ch/software/uuidm/releases/uuidm-${version}.tbz"; + sha256 = "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + configurePlatforms = []; + buildInputs = [ topkg cmdliner ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "An OCaml module implementing 128 bits universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122"; + homepage = "https://erratique.ch/software/uuidm"; + license = licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.maurer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uunf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uunf/default.nix new file mode 100644 index 000000000000..1d0e5b2bcd94 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uunf/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchurl, unzip, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner, uucd }: +let + pname = "uunf"; + webpage = "https://erratique.ch/software/${pname}"; + version = "13.0.0"; + ucdxml = fetchurl { + url = "http://www.unicode.org/Public/${version}/ucdxml/ucd.all.grouped.zip"; + sha256 = "04gpl09ggb6fb0kmk6298rd8184dv6vcscn28l1gpdv1yjlw1a8q"; + }; + gen = fetchurl { + url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen.ml"; + sha256 = "08j2mpi7j6q3rqc6bcdwspqn1s7pkkphznxfdycqjv4h9yaqsymj"; + }; + gen_norm = fetchurl { + url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen_norm.ml"; + sha256 = "11vx5l5bag6bja7qj8jv4s2x9fknj3557n0mj87k2apq5gs5f4m5"; + }; + gen_props = fetchurl { + url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen_props.ml"; + sha256 = "0a6lhja498kp9lxql0pbfvkgvajs10wx88wkqc7y5m3lrvw46268"; + }; +in + +assert stdenv.lib.versionAtLeast ocaml.version "4.03"; + +stdenv.mkDerivation { + name = "ocaml-${pname}-${version}"; + inherit version; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1qci04nkp24kdls1z4s8kz5dzgky4nwd5r8345nwdrgwmxhw7ksm"; + }; + + postConfigure = '' + rm -f src/uunf_data.ml + mkdir -p support/ + cp ${gen} support/gen.ml + cp ${gen_norm} support/gen_norm.ml + cp ${gen_props} support/gen_props.ml + funzip ${ucdxml} > support/ucd.xml + ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/build_support.ml + ''; + + nativeBuildInputs = [ unzip ]; + + buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner uucd ]; + + propagatedBuildInputs = [ uchar ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "An OCaml module for normalizing Unicode text"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuseg/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuseg/default.nix new file mode 100644 index 000000000000..8fb9d207576d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uuseg/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uucp, uutf, cmdliner }: + +let + pname = "uuseg"; + webpage = "https://erratique.ch/software/${pname}"; +in + +stdenv.mkDerivation rec { + + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "11.0.0"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "17mn8p9pn340kmvfgnl1m64zbpy60r6svkwsdn2lcg3yi2jlbrwp"; + }; + + buildInputs = [ ocaml findlib ocamlbuild cmdliner topkg uutf ]; + propagatedBuildInputs = [ uucp uchar ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "An OCaml library for segmenting Unicode text"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix new file mode 100644 index 000000000000..f289781b422c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }: +let + pname = "uutf"; + webpage = "https://erratique.ch/software/${pname}"; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "1.0.2"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1nx1rly3qj23jzn9yk3x6fwqimcxjd84kv5859vvhdg56psq26p6"; + }; + + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ findlib topkg cmdliner ]; + propagatedBuildInputs = [ uchar ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "Non-blocking streaming Unicode codec for OCaml"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/variantslib/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/variantslib/default.nix new file mode 100644 index 000000000000..ebb0857e9186 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/variantslib/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildOcaml, ocaml, fetchurl, type_conv }: + +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}" +else + +buildOcaml rec { + name = "variantslib"; + version = "109.15.03"; + + minimumSupportedOcamlVersion = "4.00"; + + src = fetchurl { + url = "https://github.com/janestreet/variantslib/archive/${version}.tar.gz"; + sha256 = "a948dcdd4ca54786fe0646386b6e37a9db03bf276c6557ea374d82740bf18055"; + }; + + propagatedBuildInputs = [ type_conv ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/janestreet/variantslib"; + description = "OCaml variants as first class values"; + license = licenses.asl20; + maintainers = [ maintainers.ericbmerritt ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/vg/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/vg/default.nix new file mode 100644 index 000000000000..d33f03a0d347 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/vg/default.nix @@ -0,0 +1,61 @@ +{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg +, uchar, result, gg, uutf, otfm +, js_of_ocaml, js_of_ocaml-ppx, + pdfBackend ? true, # depends on uutf and otfm + htmlcBackend ? true # depends on js_of_ocaml +}: + +with lib; + +let + inherit (stdenv.lib) optionals versionAtLeast; + + pname = "vg"; + version = "0.9.4"; + webpage = "https://erratique.ch/software/${pname}"; +in + +if !versionAtLeast ocaml.version "4.03" +then throw "vg is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "181sz6l5xrj5jvwg4m2yqsjzwp2s5h8v0mwhjcwbam90kdfx2nak"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + propagatedBuildInputs = [ uchar result gg ] + ++ optionals pdfBackend [ uutf otfm ] + ++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ppx ]; + + buildPhase = topkg.buildPhase + + " --with-uutf ${boolToString pdfBackend}" + + " --with-otfm ${boolToString pdfBackend}" + + " --with-js_of_ocaml ${boolToString htmlcBackend}" + + " --with-cairo2 false"; + + inherit (topkg) installPhase; + + meta = { + description = "Declarative 2D vector graphics for OCaml"; + longDescription = '' + Vg is an OCaml module for declarative 2D vector graphics. In Vg, images + are values that denote functions mapping points of the cartesian plane + to colors. The module provides combinators to define and compose these + values. + + Renderers for PDF, SVG and the HTML canvas are distributed with the + module. An API allows to implement new renderers. + ''; + homepage = webpage; + inherit (ocaml.meta) platforms; + license = licenses.isc; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/visitors/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/visitors/default.nix new file mode 100644 index 000000000000..35cdfc3a9af4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/visitors/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, cppo, ppx_tools, ppx_deriving, result }: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-visitors-20190711"; + + src = fetchurl { + url = "http://gallium.inria.fr/~fpottier/visitors/visitors-20190711.tar.gz"; + sha256 = "1h794xczfczf573mpwzm4ah9ir1rbbrkqipbh3aflfpdq2mgsbvg"; + }; + + buildInputs = [ ocaml findlib ocamlbuild cppo ]; + propagatedBuildInputs = [ ppx_tools ppx_deriving result ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://gitlab.inria.fr/fpottier/visitors"; + license = licenses.lgpl21; + description = "An OCaml syntax extension (technically, a ppx_deriving plugin) which generates object-oriented visitors for traversing and transforming data structures"; + inherit (ocaml.meta) platforms; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix new file mode 100644 index 000000000000..06c84531482e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "wasm is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-wasm-${version}"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "WebAssembly"; + repo = "spec"; + rev = "opam-${version}"; + sha256 = "1kp72yv4k176i94np0m09g10cviqp2pnpm7jmiq6ik7fmmbknk7c"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + makeFlags = [ "-C" "interpreter" ]; + + createFindlibDestdir = true; + + postInstall = '' + mkdir $out/bin + cp -L interpreter/wasm $out/bin + ''; + + meta = { + description = "An executable and OCaml library to run, read and write Web Assembly (wasm) files and manipulate their AST"; + license = stdenv.lib.licenses.asl20; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + homepage = "https://github.com/WebAssembly/spec/tree/master/interpreter"; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webbrowser/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webbrowser/default.nix new file mode 100644 index 000000000000..463bfbc79f9d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webbrowser/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg +, astring, bos, cmdliner, rresult +}: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-webbrowser-${version}"; + version = "0.6.1"; + src = fetchurl { + url = "https://erratique.ch/software/webbrowser/releases/webbrowser-${version}.tbz"; + sha256 = "137a948bx7b71zfv4za3hhznrn5lzbbrgzjy0das83zms508isx3"; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = []; + propagatedBuildInputs = [ astring bos cmdliner rresult ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "Open and reload URIs in browsers from OCaml"; + homepage = "https://erratique.ch/software/webbrowser"; + license = stdenv.lib.licenses.isc; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webmachine/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webmachine/default.nix new file mode 100644 index 000000000000..3bf163607cd2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/webmachine/default.nix @@ -0,0 +1,32 @@ +{ lib, buildDunePackage, fetchFromGitHub +, cohttp, dispatch, ptime +, ounit +}: + +buildDunePackage rec { + pname = "webmachine"; + version = "0.6.2"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = "ocaml-webmachine"; + rev = "${version}"; + sha256 = "1zi1vsm589y2njwzsqkmdbxvs9s4xlgbd62xqw2scp60mccp09nk"; + }; + + propagatedBuildInputs = [ cohttp dispatch ptime ]; + + checkInputs = lib.optional doCheck ounit; + + doCheck = true; + + meta = { + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + description = "A REST toolkit for OCaml"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wtf8/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wtf8/default.nix new file mode 100644 index 000000000000..ea09b326d393 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/wtf8/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, buildDunePackage }: + +buildDunePackage rec { + pname = "wtf8"; + version = "1.0.2"; + + minimumOCamlVersion = "4.02"; + + src = fetchurl { + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp"; + }; + + meta = with stdenv.lib; { + homepage = "https://github.com/flowtype/ocaml-wtf8"; + description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates."; + license = licenses.mit; + maintainers = [ maintainers.eqyiel ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix new file mode 100644 index 000000000000..289a3891c783 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchurl, buildDunePackage +, alcotest, cstruct-unix +, asn1-combinators, domain-name, fmt, gmap, rresult, mirage-crypto, mirage-crypto-pk +, logs, base64 +}: + +buildDunePackage rec { + minimumOCamlVersion = "4.07"; + + pname = "x509"; + version = "0.11.2"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-x509/releases/download/v${version}/x509-v${version}.tbz"; + sha256 = "1b4lcphmlyjhdgqi0brakgjp3diwmrj1y9hx87svi5xklw3zik22"; + }; + + useDune2 = true; + + buildInputs = [ alcotest cstruct-unix ]; + propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap mirage-crypto mirage-crypto-pk rresult logs base64 ]; + + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/mirleft/ocaml-x509"; + description = "X509 (RFC5280) handling in OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xml-light/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xml-light/default.nix new file mode 100644 index 000000000000..82f635afb684 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xml-light/default.nix @@ -0,0 +1,43 @@ +{stdenv, fetchurl, ocaml, findlib}: +let + pname = "xml-light"; + version = "2.4"; +in +stdenv.mkDerivation { + name = "ocaml-${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/ncannasse/${pname}/archive/${version}.tar.gz"; + sha256 = "10b55qf6mvdp11ny3h0jv6k6wrs78jr9lhsiswl0xya7z8r8j0a2"; + }; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + buildPhase = '' + make all + make opt + ''; + + installPhase = '' + make install_ocamlfind + mkdir -p $out/share + cp -vai doc $out/share/ + ''; + + meta = { + description = "Minimal Xml parser and printer for OCaml"; + longDescription = '' + Xml-Light provides functions to parse an XML document into an OCaml + data structure, work with it, and print it back to an XML + document. It support also DTD parsing and checking, and is + entirely written in OCaml, hence it does not require additional C + library. + ''; + homepage = "http://tech.motion-twin.com/xmllight.html"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.romildo ]; + platforms = ocaml.meta.platforms or []; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xmlm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xmlm/default.nix new file mode 100644 index 000000000000..bb05b89d7bef --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xmlm/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: +let + pname = "xmlm"; + webpage = "https://erratique.ch/software/${pname}"; +in + +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "xmlm is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "1.3.0"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"; + }; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + inherit (topkg) buildPhase installPhase; + + meta = with stdenv.lib; { + description = "An OCaml streaming codec to decode and encode the XML data format"; + homepage = webpage; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.vbgl ]; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/default.nix new file mode 100644 index 000000000000..2264f0dedbf9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml +, js_of_ocaml-ppx, re }: + +if stdenv.lib.versionOlder ocaml.version "4.03" +then throw "xtmpl not supported for ocaml ${ocaml.version}" +else +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-xtmpl-${version}"; + version = "0.17.0"; + src = fetchFromGitLab { + domain = "framagit.org"; + owner = "zoggy"; + repo = "xtmpl"; + rev = version; + sha256 = "1hq6y4rhz958q40145k4av8hx8jyvspg78xf741samd7vc3jd221"; + }; + + 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; + + meta = with stdenv.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/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/jsoo.patch b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/jsoo.patch new file mode 100644 index 000000000000..7546dbca924a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/xtmpl/jsoo.patch @@ -0,0 +1,26 @@ +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/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yaml/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yaml/default.nix new file mode 100644 index 000000000000..317907553571 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yaml/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, buildDunePackage +, ppx_sexp_conv +, bos, ctypes, fmt, logs, rresult, sexplib +}: + +buildDunePackage rec { + pname = "yaml"; + version = "2.0.1"; + + src = fetchurl { + url = "https://github.com/avsm/ocaml-yaml/releases/download/v${version}/yaml-v${version}.tbz"; + sha256 = "1r8jj572h416g2zliwmxj2j9hkv73nxnpfb9gmbj9gixg24lskx0"; + }; + + propagatedBuildInputs = [ bos ctypes fmt logs ppx_sexp_conv rresult sexplib ]; + + meta = { + description = "Parse and generate YAML 1.1 files"; + homepage = "https://github.com/avsm/ocaml-yaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yojson/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yojson/default.nix new file mode 100644 index 000000000000..dca97a53cbfb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/yojson/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchzip, ocaml, findlib, dune, cppo, easy-format, biniou }: +let + pname = "yojson"; + param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" then rec { + version = "1.7.0"; + url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; + sha256 = "08llz96if8bcgnaishf18si76cv11zbkni0aldb54k3cn7ipiqvd"; + nativeBuildInputs = [ dune ]; + extra = { inherit (dune) installPhase; }; + } else rec { + version = "1.2.3"; + url = "https://github.com/ocaml-community/yojson/archive/v${version}.tar.gz"; + sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl"; + extra = { + createFindlibDestdir = true; + + makeFlags = [ "PREFIX=$(out)" ]; + + preBuild = "mkdir $out/bin"; + }; + }; +in +stdenv.mkDerivation ({ + + name = "ocaml${ocaml.version}-${pname}-${param.version}"; + + src = fetchzip { + inherit (param) url sha256; + }; + + nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []); + propagatedNativeBuildInputs = [ cppo ]; + propagatedBuildInputs = [ easy-format biniou ]; + configurePlatforms = []; + + meta = with stdenv.lib; { + description = "An optimized parsing and printing library for the JSON format"; + homepage = "https://github.com/ocaml-community/${pname}"; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + platforms = ocaml.meta.platforms or []; + }; +} // param.extra) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/z3/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/z3/default.nix new file mode 100644 index 000000000000..d24a95102013 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/z3/default.nix @@ -0,0 +1,29 @@ +{ stdenv, ocaml, findlib, zarith, z3 }: + +let z3-with-ocaml = z3.override { + ocamlBindings = true; + inherit ocaml findlib zarith; +}; in + +stdenv.mkDerivation { + + pname = "ocaml${ocaml.version}-z3"; + inherit (z3-with-ocaml) version; + + phases = [ "installPhase" "fixupPhase" ]; + + installPhase = '' + runHook preInstall + mkdir -p $OCAMLFIND_DESTDIR + cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/stublibs $OCAMLFIND_DESTDIR + cp -r ${z3-with-ocaml.ocaml}/lib/ocaml/${ocaml.version}/site-lib/Z3 $OCAMLFIND_DESTDIR/z3 + runHook postInstall + ''; + + buildInputs = [ findlib ]; + propagatedBuildInputs = [ zarith ]; + + meta = z3.meta // { + description = "Z3 Theorem Prover (OCaml API)"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix new file mode 100644 index 000000000000..f9996eb6af62 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl +, ocaml, findlib, pkgconfig, perl +, gmp +}: + +let source = + if stdenv.lib.versionAtLeast ocaml.version "4.02" + then { + version = "1.10"; + url = "https://github.com/ocaml/Zarith/archive/release-1.10.tar.gz"; + sha256 = "1qxrl0v2mk9wghc1iix3n0vfz2jbg6k5wpn1z7p02m2sqskb0zhb"; + } else { + version = "1.3"; + url = "http://forge.ocamlcore.org/frs/download.php/1471/zarith-1.3.tgz"; + sha256 = "1mx3nxcn5h33qhx4gbg0hgvvydwlwdvdhqcnvfwnmf9jy3b8frll"; + }; +in + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-zarith-${version}"; + inherit (source) version; + src = fetchurl { inherit (source) url sha256; }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib perl ]; + propagatedBuildInputs = [ gmp ]; + + patchPhase = "patchShebangs ./z_pp.pl"; + dontAddPrefix = true; + configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ]; + + preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs"; + + meta = with stdenv.lib; { + description = "Fast, arbitrary precision OCaml integers"; + homepage = "http://forge.ocamlcore.org/projects/zarith"; + license = licenses.lgpl2; + inherit (ocaml.meta) platforms; + maintainers = with maintainers; [ thoughtpolice vbgl ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zed/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zed/default.nix new file mode 100644 index 000000000000..847951783ee0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zed/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, camomile, react, dune, charInfo_width }: + +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.02" then + { + version = "3.1.0"; + sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p"; + buildInputs = [ dune ]; + propagatedBuildInputs = [ charInfo_width ]; + extra = { + buildPhase = "dune build -p zed"; + inherit (dune) installPhase; }; + } else { + version = "1.4"; + sha256 = "0d8qfy0qiydrrqi8qc9rcwgjigql6vx9gl4zp62jfz1lmjgb2a3w"; + buildInputs = [ ocamlbuild ]; + propagatedBuildInputs = [ camomile ]; + extra = { createFindlibDestdir = true; }; + } +; in + +stdenv.mkDerivation (rec { + inherit (param) version; + name = "ocaml-zed-${version}"; + + src = fetchzip { + url = "https://github.com/diml/zed/archive/${version}.tar.gz"; + inherit (param) sha256; + }; + + buildInputs = [ ocaml findlib ] ++ param.buildInputs; + + propagatedBuildInputs = [ react ] ++ param.propagatedBuildInputs; + + meta = { + description = "Abstract engine for text edition in OCaml"; + longDescription = '' + Zed is an abstract engine for text edition. It can be used to write text editors, edition widgets, readlines, ... + + Zed uses Camomile to fully support the Unicode specification, and implements an UTF-8 encoded string type with validation, and a rope datastructure to achieve efficient operations on large Unicode buffers. Zed also features a regular expression search on ropes. + + To support efficient text edition capabilities, Zed provides macro recording and cursor management facilities. + ''; + homepage = "https://github.com/diml/zed"; + license = stdenv.lib.licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; +} // param.extra) diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/default.nix new file mode 100644 index 000000000000..d454d244959f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchFromGitHub, buildDunePackage, czmq, stdint }: + +buildDunePackage rec { + minimumOCamlVersion = "4.03"; + pname = "zmq"; + version = "20180726"; + src = fetchFromGitHub { + owner = "issuu"; + repo = "ocaml-zmq"; + rev = "d312a8458d6b688f75470248f11875fbbfa5bb1a"; + sha256 = "1f5l4bw78y4drabhyvmpj3z8k30bill33ca7bzhr02m55yf6gqpf"; + }; + + buildInputs = [ czmq ]; + + propagatedBuildInputs = [ stdint ]; + + meta = { + description = "ZeroMQ bindings for OCaml"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ akavel ]; + inherit (src.meta) homepage; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/lwt.nix b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/lwt.nix new file mode 100644 index 000000000000..f8fc06791b1b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/zmq/lwt.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, zmq, ocaml_lwt }: + +buildDunePackage { + pname = "zmq-lwt"; + inherit (zmq) version src meta; + + propagatedBuildInputs = [ zmq ocaml_lwt ]; +} |