diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
91 files changed, 665 insertions, 408 deletions
diff --git a/pkgs/development/ocaml-modules/algaeff/default.nix b/pkgs/development/ocaml-modules/algaeff/default.nix index 7877d255a0a..a146e0f53f5 100644 --- a/pkgs/development/ocaml-modules/algaeff/default.nix +++ b/pkgs/development/ocaml-modules/algaeff/default.nix @@ -1,22 +1,26 @@ { lib , buildDunePackage , fetchFromGitHub +, alcotest +, qcheck-core }: buildDunePackage rec { pname = "algaeff"; - version = "0.2.1"; + version = "1.1.0"; minimalOCamlVersion = "5.0"; - duneVersion = "3"; src = fetchFromGitHub { owner = "RedPRL"; repo = pname; rev = version; - hash = "sha256-jpnJhF+LN2ef6QPLcCHxcMg3Fr3GSLOnJkZ9ZUIOrlY="; + hash = "sha256-7kwQmoT8rpQWPHc+BZQi9fcZhgHxS99158ebXAXlpQ8="; }; + doCheck = true; + checkInputs = [ alcotest qcheck-core ]; + meta = { description = "Reusable Effects-Based Components"; homepage = "https://github.com/RedPRL/algaeff"; diff --git a/pkgs/development/ocaml-modules/apron/default.nix b/pkgs/development/ocaml-modules/apron/default.nix index fddf128d0d9..5ad98224962 100644 --- a/pkgs/development/ocaml-modules/apron/default.nix +++ b/pkgs/development/ocaml-modules/apron/default.nix @@ -1,30 +1,29 @@ { stdenv, lib, fetchFromGitHub, perl, gmp, mpfr, ppl, ocaml, findlib, camlidl, mlgmpidl -, gnumake42 +, flint, pplite }: stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-apron"; - version = "0.9.13"; + version = "0.9.14"; src = fetchFromGitHub { owner = "antoinemine"; repo = "apron"; rev = "v${version}"; - sha256 = "14ymjahqdxj26da8wik9d5dzlxn81b3z1iggdl7rn2nn06jy7lvy"; + hash = "sha256-e8bSf0FPB6E3MFHHoSrE0x/6nrUStO+gOKxJ4LDHBi0="; }; - # fails with make 4.4 - nativeBuildInputs = [ ocaml findlib perl gnumake42 ]; - buildInputs = [ gmp mpfr ppl camlidl ]; + nativeBuildInputs = [ ocaml findlib perl ]; + buildInputs = [ gmp mpfr ppl camlidl flint pplite ]; propagatedBuildInputs = [ mlgmpidl ]; # TODO: Doesn't produce the library correctly if true strictDeps = false; - outputs = [ "out" "bin" "dev" ]; + outputs = [ "out" "dev" ]; configurePhase = '' runHook preConfigure - ./configure -prefix $out + ./configure -prefix $out ${lib.optionalString stdenv.isDarwin "-no-strip"} mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs runHook postConfigure ''; @@ -32,8 +31,6 @@ stdenv.mkDerivation rec { postInstall = '' mkdir -p $dev/lib mv $out/lib/ocaml $dev/lib/ - mkdir -p $bin - mv $out/bin $bin/ ''; meta = { diff --git a/pkgs/development/ocaml-modules/asai/default.nix b/pkgs/development/ocaml-modules/asai/default.nix new file mode 100644 index 00000000000..b089eba7687 --- /dev/null +++ b/pkgs/development/ocaml-modules/asai/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchFromGitHub, buildDunePackage +, algaeff +, bwd +, eio +, eio_main +, lsp +, notty +}: + +buildDunePackage rec { + pname = "asai"; + version = "0.1.1"; + src = fetchFromGitHub { + owner = "RedPRL"; + repo = pname; + rev = version; + hash = "sha256-Jd90WhSjK4K2amFA5uyGF57NzsgHA8QiccX6qtxO1rQ="; + }; + + propagatedBuildInputs = [ + algaeff + bwd + lsp + eio + eio_main + notty + ]; + + meta = { + description = "A library for constructing and printing compiler diagnostics"; + homepage = "https://redprl.org/asai/asai/"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/b0/default.nix b/pkgs/development/ocaml-modules/b0/default.nix new file mode 100644 index 00000000000..e3c21c31e68 --- /dev/null +++ b/pkgs/development/ocaml-modules/b0/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild, cmdliner }: + +let + +in lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") +"b0 is not available for OCaml ${ocaml.version}" + +stdenv.mkDerivation rec { + + pname = "ocaml${ocaml.version}-b0"; + version = "0.0.5"; + + src = fetchurl { + url = "${meta.homepage}/releases/b0-${version}.tbz"; + sha256 = "sha256-ty04JQcP4RCme/VQw0ko2IBebWWX5cBU6nRTTeV1I/I="; + }; + + strictDeps = true; + + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg cmdliner ]; + + inherit (topkg) buildPhase installPhase; + + meta = with lib; { + description = "Software construction and deployment kit"; + longDescription = '' + WARNING this package is unstable and work in progress, do not depend on + it. + B0 describes software construction and deployments using modular and + customizable definitions written in OCaml. B0 describes: + * Build environments. + * Software configuration, build and testing. + * Source and binary deployments. + * Software life-cycle procedures. + B0 also provides the B00 build library which provides abitrary build + abstraction with reliable and efficient incremental rebuilds. The B00 + library can be – and has been – used on its own to devise domain specific + build systems. + ''; + homepage = "https://erratique.ch/software/b0"; + inherit (ocaml.meta) platforms; + license = licenses.isc; + maintainers = [ maintainers.Julow ]; + }; +} diff --git a/pkgs/development/ocaml-modules/brr/default.nix b/pkgs/development/ocaml-modules/brr/default.nix index 709a9b09292..816a52bbab9 100644 --- a/pkgs/development/ocaml-modules/brr/default.nix +++ b/pkgs/development/ocaml-modules/brr/default.nix @@ -2,18 +2,17 @@ , ocaml, findlib, ocamlbuild, topkg , js_of_ocaml-compiler , js_of_ocaml-toplevel -, note }: stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-brr"; - version = "0.0.4"; + version = "0.0.6"; src = fetchurl { url = "https://erratique.ch/software/brr/releases/brr-${version}.tbz"; - hash = "sha256-v+Ik1tdRBVnNDqhmNoJuLelL3k5OhxIsUorGdTb9sbw="; + hash = "sha256-paYZlzujXsG1S+s/4/kAPBlDuV1Ljorw7okAu4qaAV0="; }; buildInputs = [ ocaml findlib ocamlbuild topkg ]; - propagatedBuildInputs = [ js_of_ocaml-compiler js_of_ocaml-toplevel note ]; + propagatedBuildInputs = [ js_of_ocaml-compiler js_of_ocaml-toplevel ]; inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix index 0d08cc48cb7..b1d3d51c866 100644 --- a/pkgs/development/ocaml-modules/camlimages/default.nix +++ b/pkgs/development/ocaml-modules/camlimages/default.nix @@ -6,8 +6,6 @@ buildDunePackage rec { pname = "camlimages"; version = "5.0.4"; - duneVersion = "3"; - minimalOCamlVersion = "4.07"; src = fetchFromGitLab { @@ -17,6 +15,10 @@ buildDunePackage rec { sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4"; }; + postPatch = '' + substituteInPlace core/{images,units}.ml --replace String.lowercase String.lowercase_ascii + ''; + nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator findlib graphics lablgtk stdio ]; diff --git a/pkgs/development/ocaml-modules/camomile/default.nix b/pkgs/development/ocaml-modules/camomile/default.nix index ea2a6539368..b1178a4e8dd 100644 --- a/pkgs/development/ocaml-modules/camomile/default.nix +++ b/pkgs/development/ocaml-modules/camomile/default.nix @@ -1,34 +1,57 @@ -{ lib, fetchFromGitHub, buildDunePackage, ocaml, cppo }: +{ stdenv, lib, darwin, fetchFromGitHub, buildDunePackage, ocaml, cppo +, camlp-streams, dune-site +, version ? if lib.versionAtLeast ocaml.version "4.08" then "2.0.0" else "1.0.2" +}: -buildDunePackage rec { - pname = "camomile"; - version = "1.0.2"; +let params = + { + "1.0.2" = lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "camomile 1 is not available for OCaml ${ocaml.version}" { + src = fetchFromGitHub { + owner = "yoriyuki"; + repo = "camomile"; + rev = version; + sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; + }; - useDune2 = true; + nativeBuildInputs = [ cppo ]; - src = fetchFromGitHub { - owner = "yoriyuki"; - repo = pname; - rev = version; - sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; - }; + configurePhase = '' + runHook preConfigure + ocaml configure.ml --share $out/share/camomile + runHook postConfigure + ''; + + postInstall = '' + echo "version = \"${version}\"" >> $out/lib/ocaml/${ocaml.version}/site-lib/camomile/META + ''; + + }; - nativeBuildInputs = [ cppo ]; + "2.0.0" = { + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "camomile"; + rev = "v${version}"; + hash = "sha256-HklX+VPD0Ta3Knv++dBT2rhsDSlDRH90k4Cj1YtWIa8="; + }; - configurePhase = '' - runHook preConfigure - ocaml configure.ml --share $out/share/camomile - runHook postConfigure - ''; + nativeBuildInputs = lib.optional stdenv.isDarwin darwin.sigtool; - postInstall = '' - echo "version = \"${version}\"" >> $out/lib/ocaml/${ocaml.version}/site-lib/camomile/META - ''; + propagatedBuildInputs = [ camlp-streams dune-site ]; + }; + } +; in + + +buildDunePackage (params."${version}" // { + pname = "camomile"; + inherit version; meta = { - inherit (src.meta) homepage; + homepage = "https://github.com/ocaml-community/Camomile"; maintainers = [ lib.maintainers.vbgl ]; license = lib.licenses.lgpl21; description = "A Unicode library for OCaml"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/carton/default.nix b/pkgs/development/ocaml-modules/carton/default.nix index 727d407ac54..7ba02d68ff5 100644 --- a/pkgs/development/ocaml-modules/carton/default.nix +++ b/pkgs/development/ocaml-modules/carton/default.nix @@ -8,14 +8,13 @@ buildDunePackage rec { pname = "carton"; - version = "0.6.0"; + version = "0.7.0"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/ocaml-git/releases/download/${pname}-v${version}/git-${pname}-v${version}.tbz"; - hash = "sha256-NAm4Xq7L0Dgynr8cKZQ356M4GR6D19LbCRxvnSlIf1U="; + hash = "sha256-vWkBJdP4ZpRCEwzrFMzsdHay4VyiXix/+1qzk+7yDvk="; }; patches = [ diff --git a/pkgs/development/ocaml-modules/charInfo_width/default.nix b/pkgs/development/ocaml-modules/charInfo_width/default.nix index aaf18110454..ab4e53a42b3 100644 --- a/pkgs/development/ocaml-modules/charInfo_width/default.nix +++ b/pkgs/development/ocaml-modules/charInfo_width/default.nix @@ -3,13 +3,15 @@ buildDunePackage rec { pname = "charInfo_width"; version = "1.1.0"; - duneVersion = "3"; src = fetchzip { url = "https://bitbucket.org/zandoye/charinfo_width/get/${version}.tar.bz2"; sha256 = "19mnq9a1yr16srqs8n6hddahr4f9d2gbpmld62pvlw1ps7nfrp9w"; }; - propagatedBuildInputs = [ camomile result ]; + propagatedBuildInputs = [ + (camomile.override { version = "1.0.2"; }) + result + ]; meta = { homepage = "https://bitbucket.org/zandoye/charinfo_width/"; diff --git a/pkgs/development/ocaml-modules/checkseum/default.nix b/pkgs/development/ocaml-modules/checkseum/default.nix index 498dcdfe04c..7e3a17ac560 100644 --- a/pkgs/development/ocaml-modules/checkseum/default.nix +++ b/pkgs/development/ocaml-modules/checkseum/default.nix @@ -1,28 +1,22 @@ -{ lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config +{ lib, fetchurl, buildDunePackage, ocaml, dune-configurator , optint , fmt, rresult, bos, fpath, astring, alcotest -, withFreestanding ? false -, ocaml-freestanding }: buildDunePackage rec { - version = "0.4.0"; + version = "0.5.2"; pname = "checkseum"; minimalOCamlVersion = "4.07"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-${version}.tbz"; - hash = "sha256-K6QPMts5+hxH2a+WQ1N0lwMBoshG2T0bSozNgzRvAlo="; + hash = "sha256-nl5P1EBctKi03wCHdUMlGDPgimSZ70LMuNulgt8Nr8g="; }; buildInputs = [ dune-configurator ]; - nativeBuildInputs = [ pkg-config ]; propagatedBuildInputs = [ optint - ] ++ lib.optionals withFreestanding [ - ocaml-freestanding ]; checkInputs = [ diff --git a/pkgs/development/ocaml-modules/containers/data.nix b/pkgs/development/ocaml-modules/containers/data.nix index bdad78cdf6f..98b6ec75064 100644 --- a/pkgs/development/ocaml-modules/containers/data.nix +++ b/pkgs/development/ocaml-modules/containers/data.nix @@ -1,16 +1,19 @@ { buildDunePackage, containers +, ocaml , dune-configurator , gen, iter, qcheck-core +, mdx }: buildDunePackage { pname = "containers-data"; - inherit (containers) src version doCheck; + inherit (containers) src version; - duneVersion = "3"; + doCheck = containers.doCheck && ocaml.meta.branch != "5.0"; buildInputs = [ dune-configurator ]; + nativeCheckInputs = [ mdx.bin ]; checkInputs = [ gen iter qcheck-core ]; propagatedBuildInputs = [ containers ]; diff --git a/pkgs/development/ocaml-modules/containers/default.nix b/pkgs/development/ocaml-modules/containers/default.nix index f1c82f189bb..ee3d7045d56 100644 --- a/pkgs/development/ocaml-modules/containers/default.nix +++ b/pkgs/development/ocaml-modules/containers/default.nix @@ -5,16 +5,14 @@ }: buildDunePackage rec { - version = "3.11"; + version = "3.12"; pname = "containers"; - duneVersion = "3"; - src = fetchFromGitHub { owner = "c-cube"; repo = "ocaml-containers"; rev = "v${version}"; - hash = "sha256-tGAsg98/T6VKvG95I4qioabWM3TEKrDKlsrfUJqxCyM="; + hash = "sha256-15Wd6k/NvjAvTmxlPlZPClODBtFXM6FG3VxniC66u88="; }; buildInputs = [ dune-configurator ]; diff --git a/pkgs/development/ocaml-modules/cooltt/default.nix b/pkgs/development/ocaml-modules/cooltt/default.nix index b19e01ceb34..7cf63e5c0b1 100644 --- a/pkgs/development/ocaml-modules/cooltt/default.nix +++ b/pkgs/development/ocaml-modules/cooltt/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , fetchurl , buildDunePackage +, bos , bwd , cmdliner , containers @@ -16,22 +17,21 @@ , yuujinchou , ounit2 , qcheck +, qcheck-core }: let bantorra = buildDunePackage rec { pname = "bantorra"; - version = "unstable-2022-04-20"; + version = "unstable-2022-05-08"; src = fetchFromGitHub { owner = "RedPRL"; repo = "bantorra"; - rev = "1e78633d9a2ef7104552a24585bb8bea36d4117b"; - sha256 = "sha256:15v1cggm7awp11iwl3lzpaar91jzivhdxggp5mr48gd28kfipzk2"; + rev = "d05c34295727dd06d0ac4416dc2e258732e8593d"; + hash = "sha256-s6lUTs3VRl6YhLAn3PO4aniANhFp8ytoTsFAgcOlee4="; }; - duneVersion = "3"; - - propagatedBuildInputs = [ ezjsonm findlib ]; + propagatedBuildInputs = [ bos ezjsonm findlib ]; meta = { description = "Extensible Library Management and Path Resolution"; @@ -41,19 +41,18 @@ let }; kado = buildDunePackage rec { pname = "kado"; - version = "unstable-2022-04-30"; + version = "unstable-2023-10-03"; src = fetchFromGitHub { owner = "RedPRL"; repo = "kado"; - rev = "8dce50e7d759d482b82565090e550d3860d64729"; - sha256 = "sha256:1xb754fha4s0bgjfqjxzqljvalmkfdwdn5y4ycsp51wiah235bsy"; + rev = "6b2e9ba2095e294e6e0fc6febc280d80c5799c2b"; + hash = "sha256-fP6Ade3mJeyOMjuDIvrW88m6E3jfb2z3L8ufgloz4Tc="; }; - duneVersion = "3"; - propagatedBuildInputs = [ bwd ]; doCheck = true; + checkInputs = [ qcheck-core ]; meta = { description = "Cofibrations in Cartecian Cubical Type Theory"; @@ -65,16 +64,15 @@ in buildDunePackage { pname = "cooltt"; - version = "unstable-2022-04-28"; + version = "unstable-2023-10-03"; - minimalOCamlVersion = "4.13"; - duneVersion = "3"; + minimalOCamlVersion = "5.0"; src = fetchFromGitHub { owner = "RedPRL"; repo = "cooltt"; - rev = "88511e10cb9e17286f585882dee334f3d8ace47c"; - sha256 = "sha256:1n9bh86r2n9s3mm7ayfzwjbnjqcphpsf8yqnf4whd3yi930sqisw"; + rev = "a5eaf4db195b5166a7102d47d42724f59cf3de19"; + hash = "sha256-48bEf59rtPRrCRjab7+GxppjfR2c87HjQ+uKY2Bag0I="; }; nativeBuildInputs = [ @@ -108,6 +106,6 @@ buildDunePackage { homepage = "https://github.com/RedPRL/cooltt"; description = "A cool implementation of normalization by evaluation (nbe) & elaboration for Cartesian cubical type theory"; license = licenses.asl20; - maintainers = with maintainers; [ fortuneteller2k ]; + maintainers = with maintainers; [ moni ]; }; } diff --git a/pkgs/development/ocaml-modules/cry/default.nix b/pkgs/development/ocaml-modules/cry/default.nix index bf294b76db9..8e475a7987c 100644 --- a/pkgs/development/ocaml-modules/cry/default.nix +++ b/pkgs/development/ocaml-modules/cry/default.nix @@ -2,15 +2,21 @@ buildDunePackage rec { pname = "cry"; - version = "0.6.7"; + version = "1.0.1"; src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-cry"; rev = "v${version}"; - sha256 = "sha256-1Omp3LBKGTPVwEBd530H0Djn3xiEjOHLqso6S8yIJSQ="; + sha256 = "sha256-wn9hLqbydzFTdYsJ1e76dmDLtwcZ7CGjbzFe5o9veYQ="; }; + postPatch = '' + substituteInPlace src/dune --replace bytes "" + ''; + + minimalOCamlVersion = "4.12"; + meta = with lib; { homepage = "https://github.com/savonet/ocaml-cry"; description = "OCaml client for the various icecast & shoutcast source protocols"; diff --git a/pkgs/development/ocaml-modules/decompress/default.nix b/pkgs/development/ocaml-modules/decompress/default.nix index 3e15bd5bbcd..b20ef17d08b 100644 --- a/pkgs/development/ocaml-modules/decompress/default.nix +++ b/pkgs/development/ocaml-modules/decompress/default.nix @@ -6,14 +6,13 @@ buildDunePackage rec { pname = "decompress"; - version = "1.5.2"; + version = "1.5.3"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-${version}.tbz"; - hash = "sha256-qMmmuhMlFNVq02JvvV55EkhEg2AQNQ7hYdQ7spv1di4="; + hash = "sha256-+R5peL7/P8thRA0y98mcmfHoZUtPsYQIdB02A1NzrGA="; }; buildInputs = [ cmdliner ]; diff --git a/pkgs/development/ocaml-modules/dum/default.nix b/pkgs/development/ocaml-modules/dum/default.nix index 3faef36e8ec..43584461af1 100644 --- a/pkgs/development/ocaml-modules/dum/default.nix +++ b/pkgs/development/ocaml-modules/dum/default.nix @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr"; }; + postPatch = '' + substituteInPlace "dum.ml" \ + --replace "Lazy.lazy_is_val" "Lazy.is_val" \ + --replace "Obj.final_tag" "Obj.custom_tag" + ''; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ easy-format ]; diff --git a/pkgs/development/ocaml-modules/eio/default.nix b/pkgs/development/ocaml-modules/eio/default.nix index 1f9e18e887e..005364039e0 100644 --- a/pkgs/development/ocaml-modules/eio/default.nix +++ b/pkgs/development/ocaml-modules/eio/default.nix @@ -1,4 +1,6 @@ { lib +, ocaml +, version ? if lib.versionAtLeast ocaml.version "5.1" then "0.13" else "0.12" , buildDunePackage , bigstringaf , cstruct @@ -16,16 +18,26 @@ , mdx }: +let + param = { + "0.12" = { + minimalOCamlVersion = "5.0"; + hash = "sha256-2EhHzoX/t4ZBSWrSS+PGq1zCxohc7a1q4lfsrFnZJqA="; + }; + "0.13" = { + minimalOCamlVersion = "5.1"; + hash = "sha256-glN+4cWxgp/eggdhSk459WC9WCMyhBKQ7V73ZpHzr3A="; + }; + }."${version}"; +in buildDunePackage rec { pname = "eio"; - version = "0.12"; - - minimalOCamlVersion = "5.0"; - duneVersion = "3"; + inherit version; + inherit (param) minimalOCamlVersion; src = fetchurl { url = "https://github.com/ocaml-multicore/${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - sha256 = "2EhHzoX/t4ZBSWrSS+PGq1zCxohc7a1q4lfsrFnZJqA="; + inherit (param) hash; }; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/eio/linux.nix b/pkgs/development/ocaml-modules/eio/linux.nix index 62f9800790b..b376f709794 100644 --- a/pkgs/development/ocaml-modules/eio/linux.nix +++ b/pkgs/development/ocaml-modules/eio/linux.nix @@ -10,7 +10,6 @@ buildDunePackage { inherit (eio) meta src version; minimalOCamlVersion = "5.0"; - duneVersion = "3"; dontStrip = true; diff --git a/pkgs/development/ocaml-modules/eio/main.nix b/pkgs/development/ocaml-modules/eio/main.nix index def30f2a059..410e5355127 100644 --- a/pkgs/development/ocaml-modules/eio/main.nix +++ b/pkgs/development/ocaml-modules/eio/main.nix @@ -11,7 +11,6 @@ buildDunePackage { inherit (eio) meta src version; minimalOCamlVersion = "5.0"; - duneVersion = "3"; dontStrip = true; diff --git a/pkgs/development/ocaml-modules/eio/posix.nix b/pkgs/development/ocaml-modules/eio/posix.nix index 6c3042e65fa..e8dc4072bab 100644 --- a/pkgs/development/ocaml-modules/eio/posix.nix +++ b/pkgs/development/ocaml-modules/eio/posix.nix @@ -11,7 +11,6 @@ buildDunePackage { inherit (eio) meta src version; minimalOCamlVersion = "5.0"; - duneVersion = "3"; dontStrip = true; diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index f3c587428a4..5be5f09d196 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -8,6 +8,7 @@ , opaline , ocamlbuild , ppx_deriving +, ppx_optcomp , findlib , js_of_ocaml-ocamlbuild , js_of_ocaml-ppx @@ -21,13 +22,13 @@ stdenv.mkDerivation rec { pname = "eliom"; - version = "9.4.0"; + version = "10.1.0"; src = fetchFromGitHub { owner = "ocsigen"; repo = "eliom"; rev = version; - sha256 = "sha256:1yn8mqxv9yz51x81j8wv1jn7l7crm8azp1m2g4zn5nz2s4nmfv6q"; + hash = "sha256-nzrLl8adaRW6c+IQfJ7s+7KtFT8uU27Umyrv0aWXuxw="; }; nativeBuildInputs = [ @@ -41,6 +42,7 @@ stdenv.mkDerivation rec { js_of_ocaml-ocamlbuild js_of_ocaml-ppx_deriving_json ocamlnet + ppx_optcomp ]; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix index d1f93f57264..082f47313bd 100644 --- a/pkgs/development/ocaml-modules/erm_xml/default.nix +++ b/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -1,6 +1,7 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }: if lib.versionOlder ocaml.version "4.02" +|| lib.versionAtLeast ocaml.version "5.0" then throw "erm_xml is not available for OCaml ${ocaml.version}" else diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index 5f491a1bb6d..2449308567e 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -5,13 +5,13 @@ lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-expat"; - version = "1.1.0"; + version = "1.3.0"; src = fetchFromGitHub { owner = "whitequark"; repo = "ocaml-expat"; rev = "v${version}"; - sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q"; + hash = "sha256-eDA6MUcztaI+fpunWBdanNnPo9Y5gvbj/ViVcxYYEBg="; }; prePatch = '' diff --git a/pkgs/development/ocaml-modules/ffmpeg/base.nix b/pkgs/development/ocaml-modules/ffmpeg/base.nix index 59405349130..e8bb6128db6 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/base.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/base.nix @@ -1,15 +1,13 @@ { lib, fetchFromGitHub }: rec { - version = "1.1.7"; - - duneVersion = "3"; + version = "1.1.8"; src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-ffmpeg"; rev = "v${version}"; - sha256 = "sha256-0QDy0ZUAtojYIuNliiDV2uywBnWxtKUhZ/LPqkfSOZ4="; + sha256 = "sha256-XqZATaxpW0lEdrRTXVTc0laQAx437+eoa/zOzZV1kHk="; }; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/ffmpeg/default.nix b/pkgs/development/ocaml-modules/ffmpeg/default.nix index f3364cb548a..10e837dcd62 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/default.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/default.nix @@ -14,7 +14,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; propagatedBuildInputs = [ ffmpeg-avutil diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix index 73b8ed0f6ae..b902f72bc1e 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-av.nix @@ -11,7 +11,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AudioToolbox VideoToolbox ]; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix index 1ff5a89ee30..bce592a8a2c 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix @@ -11,7 +11,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix index b2537bd25be..3d27ab80315 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix @@ -17,7 +17,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix index 32342860d13..524bc600093 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix @@ -13,7 +13,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix index a271b984d14..6cd71ebd58e 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix @@ -9,7 +9,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AudioToolbox VideoToolbox ]; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix index fb6fbda58d2..a6012a44171 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix @@ -10,7 +10,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; diff --git a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix index a085795831b..773b10ee168 100644 --- a/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix +++ b/pkgs/development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix @@ -10,7 +10,7 @@ buildDunePackage { minimalOCamlVersion = "4.08"; - inherit (ffmpeg-base) version src duneVersion; + inherit (ffmpeg-base) version src; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; diff --git a/pkgs/development/ocaml-modules/flac/default.nix b/pkgs/development/ocaml-modules/flac/default.nix index d79416b7053..c30236e0e2c 100644 --- a/pkgs/development/ocaml-modules/flac/default.nix +++ b/pkgs/development/ocaml-modules/flac/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "flac"; - version = "0.3.1"; + version = "0.5.0"; src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-flac"; rev = "v${version}"; - sha256 = "sha256-oMmxZtphEX/OPfyTumjkWQJidAjSRqriygaTjVJTCG0="; + sha256 = "sha256-HRRQd//e6Eh2HuyO+U00ILu5FoBT9jf/nRJzDOie70A="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/development/ocaml-modules/fontconfig/default.nix b/pkgs/development/ocaml-modules/fontconfig/default.nix index 2eca9a4644b..5d7e5f59b8b 100644 --- a/pkgs/development/ocaml-modules/fontconfig/default.nix +++ b/pkgs/development/ocaml-modules/fontconfig/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }: stdenv.mkDerivation { - pname = "ocaml-fontconfig"; + pname = "ocaml${ocaml.version}-fontconfig"; version = "unstable-2013-11-03"; src = fetchFromGitHub { @@ -11,6 +11,12 @@ stdenv.mkDerivation { sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh"; }; + postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.03") '' + substituteInPlace extract_consts.ml \ + --replace String.lowercase String.lowercase_ascii \ + --replace String.capitalize String.capitalize_ascii + ''; + nativeBuildInputs = [ pkg-config ocaml ]; buildInputs = [ fontconfig ]; @@ -24,7 +30,7 @@ stdenv.mkDerivation { meta = { description = "Fontconfig bindings for OCaml"; license = lib.licenses.gpl2Plus; - platforms = ocaml.meta.platforms or [ ]; + platforms = ocaml.meta.platforms; maintainers = with lib.maintainers; [ vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/functory/default.nix b/pkgs/development/ocaml-modules/functory/default.nix index 3c56aaf0a0a..8a960dedcb5 100644 --- a/pkgs/development/ocaml-modules/functory/default.nix +++ b/pkgs/development/ocaml-modules/functory/default.nix @@ -1,7 +1,5 @@ { lib, stdenv, fetchurl, ocaml, findlib }: -assert lib.versionAtLeast (lib.getVersion ocaml) "3.11"; - let param = if lib.versionAtLeast ocaml.version "4.02" then { version = "0.6"; @@ -12,6 +10,9 @@ let param = }; in +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "functory is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation { pname = "ocaml${ocaml.version}-functory"; inherit (param) version; diff --git a/pkgs/development/ocaml-modules/gd4o/default.nix b/pkgs/development/ocaml-modules/gd4o/default.nix index cd206964856..f3206c2385a 100644 --- a/pkgs/development/ocaml-modules/gd4o/default.nix +++ b/pkgs/development/ocaml-modules/gd4o/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchurl, ocaml, gd, freetype, findlib, zlib, libpng, libjpeg }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "gd4o is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-gd4o"; version = "1.0a5"; diff --git a/pkgs/development/ocaml-modules/getopt/default.nix b/pkgs/development/ocaml-modules/getopt/default.nix index e3bf2fb5d64..db03f7b0793 100644 --- a/pkgs/development/ocaml-modules/getopt/default.nix +++ b/pkgs/development/ocaml-modules/getopt/default.nix @@ -1,28 +1,22 @@ -{ lib, fetchzip, stdenv, ocaml, findlib, ocamlbuild }: +{ lib, fetchFromGitHub, buildDunePackage }: -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-getopt"; - version = "20120615"; +buildDunePackage rec { + pname = "getopt"; + version = "20230213"; - src = fetchzip { - url = "https://download.ocamlcore.org/ocaml-getopt/ocaml-getopt/${version}/ocaml-getopt-${version}.tar.gz"; - sha256 = "0bng2mmdixpmj23xn8krlnaq66k22iclwz46r8zjrsrq3wcn1xgn"; - }; - - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; + minimalOCamlVersion = "4.07"; - strictDeps = true; + src = fetchFromGitHub { + owner = "scemama"; + repo = "ocaml-getopt"; + rev = version; + hash = "sha256-oYDm945LgjIW+8x7UrO4FlbHywnu8480aiEVvnjBxc8="; + }; doCheck = true; - createFindlibDestdir = true; meta = { - inherit (ocaml.meta) platforms; - homepage = "https://github.com/gildor478/ocaml-getopt"; + homepage = "https://github.com/scemama/ocaml-getopt"; description = "Parsing of command line arguments (similar to GNU GetOpt) for OCaml"; license = lib.licenses.mit; maintainers = [ lib.maintainers.ulrikstrid ]; diff --git a/pkgs/development/ocaml-modules/hacl-star/default.nix b/pkgs/development/ocaml-modules/hacl-star/default.nix index e12454759a3..18d30765558 100644 --- a/pkgs/development/ocaml-modules/hacl-star/default.nix +++ b/pkgs/development/ocaml-modules/hacl-star/default.nix @@ -4,9 +4,9 @@ buildDunePackage { pname = "hacl-star"; - inherit (hacl-star-raw) version src meta doCheck minimalOCamlVersion; + inherit (hacl-star-raw) version src meta doCheck; - duneVersion = "3"; + minimalOCamlVersion = "4.08"; propagatedBuildInputs = [ hacl-star-raw diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix index de20299cd4a..00b524606fc 100644 --- a/pkgs/development/ocaml-modules/hacl-star/raw.nix +++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix @@ -12,11 +12,11 @@ }: stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-hacl-star-raw"; - version = "0.7.0"; + version = "0.7.1"; src = fetchzip { url = "https://github.com/cryspen/hacl-packages/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz"; - sha256 = "sha256-jJtxVYhQgP8ItfLhQ2wcF8RKNRnYhB2j0nR7/YH1NfY="; + hash = "sha256-TcAEaJou4BOVXSz5DYewzKfvIpjXmhLAlgF0hlq3ToQ="; stripRoot = false; }; @@ -24,8 +24,6 @@ stdenv.mkDerivation rec { ./aligned-alloc.patch ]; - minimalOCamlVersion = "4.08"; - # strictoverflow is disabled because it breaks aarch64-darwin hardeningDisable = [ "strictoverflow" ]; diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix index da843fe1511..fba8e35fb5b 100644 --- a/pkgs/development/ocaml-modules/higlo/default.nix +++ b/pkgs/development/ocaml-modules/higlo/default.nix @@ -2,14 +2,14 @@ buildDunePackage rec { pname = "higlo"; - version = "0.8"; - duneVersion = "3"; + version = "0.9"; + src = fetchFromGitLab { domain = "framagit.org"; owner = "zoggy"; repo = "higlo"; rev = version; - sha256 = "sha256:09hsbwy5asacgh4gdj0vjpy4kzfnq3qji9szbsbyswsf1nbyczir"; + hash = "sha256-SaFFzp4FCjVLdMLH6mNIv3HzJbkXJ5Ojbku258LCfLI="; }; propagatedBuildInputs = [ sedlex xtmpl ]; diff --git a/pkgs/development/ocaml-modules/janestreet/0.15.nix b/pkgs/development/ocaml-modules/janestreet/0.15.nix index f9612c0c011..ccd2d4eab29 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.15.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.15.nix @@ -3,6 +3,7 @@ , fetchpatch , fzf , lib +, ocaml , openssl , zstd }: @@ -264,6 +265,7 @@ with self; buildInputs = [ jst-config ]; propagatedBuildInputs = [ base base_bigstring base_quickcheck ppx_jane time_now ]; doCheck = false; # circular dependency with core_kernel + meta.broken = lib.versionAtLeast ocaml.version "5.1"; }; core_bench = janePackage { diff --git a/pkgs/development/ocaml-modules/kafka/default.nix b/pkgs/development/ocaml-modules/kafka/default.nix index 7636942033a..28c380a4616 100644 --- a/pkgs/development/ocaml-modules/kafka/default.nix +++ b/pkgs/development/ocaml-modules/kafka/default.nix @@ -5,8 +5,6 @@ buildDunePackage rec { pname = "kafka"; version = "0.5"; - useDune2 = true; - src = fetchurl { url = "https://github.com/didier-wenzek/ocaml-kafka/releases/download/${version}/kafka-${version}.tbz"; sha256 = "0m9212yap0a00hd0f61i4y4fna3141p77qj3mm7jl1h4q60jdhvy"; diff --git a/pkgs/development/ocaml-modules/kafka/lwt.nix b/pkgs/development/ocaml-modules/kafka/lwt.nix index a6cef66b276..da931d6e8bf 100644 --- a/pkgs/development/ocaml-modules/kafka/lwt.nix +++ b/pkgs/development/ocaml-modules/kafka/lwt.nix @@ -1,13 +1,18 @@ { buildDunePackage +, ocaml +, lib , kafka , lwt , cmdliner }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "kafka_lwt is not available for OCaml ${ocaml.version}" + buildDunePackage rec { pname = "kafka_lwt"; - inherit (kafka) version useDune2 src; + inherit (kafka) version src; buildInputs = [ cmdliner ]; diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix index cb885b7b069..abe1649e009 100644 --- a/pkgs/development/ocaml-modules/lablgl/default.nix +++ b/pkgs/development/ocaml-modules/lablgl/default.nix @@ -1,24 +1,24 @@ -{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut, darwin } : +{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut, camlp-streams, darwin } : -if lib.versionOlder ocaml.version "4.03" +if lib.versionOlder ocaml.version "4.06" then throw "lablgl is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-lablgl"; - version = "1.06"; + version = "1.07"; src = fetchFromGitHub { owner = "garrigue"; repo = "lablgl"; rev = "v${version}"; - sha256 = "sha256:141kc816iv59z96738i3vn9m9iw9g2zhi45hk4cchpwd99ar5l6k"; + hash = "sha256-GiQKHMn5zHyvDrA2ve12X5YTm3/RZp8tukIqifgVaW4="; }; strictDeps = true; nativeBuildInputs = [ ocaml findlib ]; - buildInputs = [ freeglut ]; + buildInputs = [ freeglut camlp-streams ]; propagatedBuildInputs = [ libGLU libGL diff --git a/pkgs/development/ocaml-modules/lun/default.nix b/pkgs/development/ocaml-modules/lun/default.nix new file mode 100644 index 00000000000..aab83d4c3cd --- /dev/null +++ b/pkgs/development/ocaml-modules/lun/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "lun"; + version = "0.0.1"; + + minimalOCamlVersion = "4.12.0"; + + src = fetchurl { + url = "https://github.com/robur-coop/lun/releases/download/v${version}/lun-${version}.tbz"; + hash = "sha256-zKi63/g7Rw/c+xhAEW+Oim8suGzeL0TtKM8my/aSp5M="; + }; + + meta = { + description = "Optics in OCaml"; + homepage = "https://git.robur.coop/robur/lun"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ marsam ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lun/ppx.nix b/pkgs/development/ocaml-modules/lun/ppx.nix new file mode 100644 index 00000000000..fc138f1a6f8 --- /dev/null +++ b/pkgs/development/ocaml-modules/lun/ppx.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage, fetchurl, fmt, lun, ppxlib }: + +buildDunePackage { + pname = "ppx_lun"; + inherit (lun) version src; + + propagatedBuildInputs = [ lun ppxlib ]; + + checkInputs = [ fmt ]; + + doCheck = true; + + meta = lun.meta // { + description = "Optics with lun package and PPX"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 4033336ae11..167df30ae35 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -4,7 +4,7 @@ buildDunePackage rec { pname = "lwt"; - version = "5.6.1"; + version = "5.7.0"; minimalOCamlVersion = "4.08"; @@ -12,16 +12,9 @@ buildDunePackage rec { owner = "ocsigen"; repo = "lwt"; rev = version; - sha256 = "sha256-XstKs0tMwliCyXnP0Vzi5WC27HKJGnATUYtbbQmH1TE="; + hash = "sha256-o0wPK6dPdnsr/LzwcSwbIGcL85wkDjdFuEcAxuS/UEs="; }; - postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") '' - substituteInPlace src/core/dune \ - --replace "(libraries bytes)" "" - substituteInPlace src/unix/dune \ - --replace "libraries bigarray lwt" "libraries lwt" - ''; - nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ libev ocplib-endian ]; diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix index 85a1a798b47..ccda3f38b5e 100644 --- a/pkgs/development/ocaml-modules/mdx/default.nix +++ b/pkgs/development/ocaml-modules/mdx/default.nix @@ -1,23 +1,22 @@ { lib, fetchurl, buildDunePackage, ocaml, findlib , alcotest -, astring, cppo, fmt, logs, ocaml-version, odoc-parser, lwt, re, csexp +, astring, cppo, fmt, logs, ocaml-version, camlp-streams, lwt, re, csexp , gitUpdater }: buildDunePackage rec { pname = "mdx"; - version = "2.3.0"; + version = "2.3.1"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz"; - hash = "sha256-MqCDmBAK/S0ueYi8O0XJtplxJx96twiFHe04Q8lHBmE="; + hash = "sha256-mkCkX6p41H4pOSvU/sJg0UAWysGweOSrAW6jrcCXQ/M="; }; nativeBuildInputs = [ cppo ]; - propagatedBuildInputs = [ astring fmt logs csexp ocaml-version odoc-parser re findlib ]; + propagatedBuildInputs = [ astring fmt logs csexp ocaml-version camlp-streams re findlib ]; checkInputs = [ alcotest lwt ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/metadata/default.nix b/pkgs/development/ocaml-modules/metadata/default.nix new file mode 100644 index 00000000000..789825175e4 --- /dev/null +++ b/pkgs/development/ocaml-modules/metadata/default.nix @@ -0,0 +1,22 @@ +{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, pkg-config, ogg, flac }: + +buildDunePackage rec { + pname = "metadata"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "savonet"; + repo = "ocaml-metadata"; + rev = "v${version}"; + sha256 = "sha256-sSekkyJ8D6mCCmxIyd+pBk/khaehA3BcpUQl2Gln+Ic="; + }; + + minimalOCamlVersion = "4.14"; + + meta = with lib; { + homepage = "https://github.com/savonet/ocaml-metadata"; + description = "Library to read metadata from files in various formats. "; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dandellion ]; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index 69d8cc440b6..3c8b00285e9 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -8,11 +8,11 @@ buildDunePackage rec { duneVersion = "3"; pname = "mirage-crypto"; - version = "0.11.1"; + version = "0.11.2"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz"; - sha256 = "sha256-DNoUeyCpK/cMXJ639VxnXQOrx2u9Sx8N2c9/w4AW0pw="; + sha256 = "sha256-1rl8t/DcNEpgJRPMAxN8Hn8K4QXQchYUYmz08jHt92Q="; }; doCheck = true; diff --git a/pkgs/development/ocaml-modules/mldoc/default.nix b/pkgs/development/ocaml-modules/mldoc/default.nix index 7a7e83d3c65..b55faf222cf 100644 --- a/pkgs/development/ocaml-modules/mldoc/default.nix +++ b/pkgs/development/ocaml-modules/mldoc/default.nix @@ -29,7 +29,7 @@ let in buildDunePackage rec { pname = "mldoc"; - version = "1.5.6"; + version = "1.5.8"; minimalOCamlVersion = "4.10"; @@ -38,8 +38,8 @@ buildDunePackage rec { src = fetchFromGitHub { owner = "logseq"; repo = "mldoc"; - rev = "2a700b2e4797e47505f423fd47dc07372bd7b04e"; # version not tagged - hash = "sha256-OS06fb/Nz8grztFEVwWiqsQQt2PQjqcgQFxQuAEYC54="; + rev = "v${version}"; + hash = "sha256-7uuNUFMSQEgakTKfpYixp43gnfpQSW++snBzgr0Ni0Y="; }; buildInputs = [ diff --git a/pkgs/development/ocaml-modules/msgpck/default.nix b/pkgs/development/ocaml-modules/msgpck/default.nix new file mode 100644 index 00000000000..2871e774f3f --- /dev/null +++ b/pkgs/development/ocaml-modules/msgpck/default.nix @@ -0,0 +1,31 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, ocplib-endian +, alcotest +}: + +buildDunePackage rec { + pname = "msgpck"; + version = "1.7"; + + src = fetchFromGitHub { + owner = "vbmithr"; + repo = "ocaml-msgpck"; + rev = "${version}"; + hash = "sha256-gBHIiicmk/5KBkKzRKyV0ymEH8dGCZG8vfE0mtpcDCM="; + }; + + propagatedBuildInputs = [ ocplib-endian ]; + + checkInputs = [ alcotest ]; + + doCheck = true; + + meta = { + description = "Fast MessagePack (http://msgpack.org) library "; + license = lib.licenses.isc; + homepage = "https://github.com/vbmithr/ocaml-msgpck"; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/development/ocaml-modules/note/default.nix b/pkgs/development/ocaml-modules/note/default.nix index 5bb0da7dd10..9640a33569c 100644 --- a/pkgs/development/ocaml-modules/note/default.nix +++ b/pkgs/development/ocaml-modules/note/default.nix @@ -1,18 +1,20 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }: +{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, brr }: lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") "note is not available for OCaml ${ocaml.version}" stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-note"; - version = "0.0.2"; + version = "0.0.3"; src = fetchurl { url = "https://erratique.ch/software/note/releases/note-${version}.tbz"; - hash = "sha256-b35XcaDUXQLqwkNfsJKX5A1q1pAhw/mgdwyOdacZiiY="; + hash = "sha256-ZZOvCnyz7UWzFtGFI1uC0ZApzyylgZYM/HYIXGVXY2k="; }; buildInputs = [ ocaml findlib ocamlbuild topkg ]; inherit (topkg) buildPhase installPhase; + propagatedBuildInputs = [ brr ]; + meta = { homepage = "https://erratique.ch/software/note"; description = "An OCaml module for functional reactive programming"; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix index 1a96c7adfe9..3fde1d463cc 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix @@ -4,7 +4,10 @@ buildDunePackage { pname = "gettext-camomile"; inherit (ocaml_gettext) src version; - propagatedBuildInputs = [ camomile ocaml_gettext ]; + propagatedBuildInputs = [ + (camomile.override { version = "1.0.2"; }) + ocaml_gettext + ]; doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit fileutils ]; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix index 43bd194b655..7c197f9e87b 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix @@ -1,6 +1,9 @@ { lib, buildDunePackage, ocaml, ocaml_gettext, dune-configurator, ounit }: -buildDunePackage rec { +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "gettext-stub is not available for OCaml ${ocaml.version}" + +buildDunePackage { pname = "gettext-stub"; diff --git a/pkgs/development/ocaml-modules/ocaml-protoc-plugin/default.nix b/pkgs/development/ocaml-modules/ocaml-protoc-plugin/default.nix index 39794dac456..067b61212ac 100644 --- a/pkgs/development/ocaml-modules/ocaml-protoc-plugin/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-protoc-plugin/default.nix @@ -13,13 +13,13 @@ buildDunePackage rec { pname = "ocaml-protoc-plugin"; - version = "4.3.1"; + version = "4.5.0"; src = fetchFromGitHub { owner = "issuu"; repo = "ocaml-protoc-plugin"; rev = version; - hash = "sha256-KFd43Ukz5gMeM3ik2VlfaIPwcZe9yaxk9VcQIrauUGU="; + hash = "sha256-ZHeOi3y2X11MmkRuthmYFSjPLoGlGTO1pnRfk/XmgPU="; }; nativeBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/ocamlformat/generic.nix b/pkgs/development/ocaml-modules/ocamlformat/generic.nix index 215c0268562..ca5c78bca7d 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/generic.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/generic.nix @@ -1,6 +1,6 @@ -{ lib, fetchurl, version, astring, base, camlp-streams, cmdliner_1_0 +{ lib, fetchurl, version ? "0.26.1", astring, base, camlp-streams, cmdliner_1_0 , cmdliner_1_1, csexp, dune-build-info, either, fix, fpath, menhirLib, menhirSdk -, ocaml-version, ocp-indent, odoc-parser, result, stdio, uuseg, uutf }: +, ocaml-version, ocp-indent, odoc-parser, result, stdio, uuseg, uutf, ... }: # The ocamlformat package have been split into two in version 0.25.1: # one for the library and one for the executable. @@ -23,9 +23,12 @@ rec { "0.24.1" = "sha256-AjQl6YGPgOpQU3sjcaSnZsFJqZV9BYB+iKAE0tX0Qc4="; "0.25.1" = "sha256-3I8qMwyjkws2yssmI7s2Dti99uSorNKT29niJBpv0z0="; "0.26.0" = "sha256-AxSUq3cM7xCo9qocvrVmDkbDqmwM1FexEP7IWadeh30="; + "0.26.1" = "sha256-2gBuQn8VuexhL7gI1EZZm9m3w+4lq+s9VVdHpw10xtc="; }."${version}"; }; + inherit version; + odoc-parser_v = odoc-parser.override { version = if lib.versionAtLeast version "0.24.0" then "2.0.0" diff --git a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-lib.nix b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-lib.nix index cefae4af027..9e271fe186b 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-lib.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-lib.nix @@ -1,6 +1,7 @@ -{ lib, callPackage, buildDunePackage, menhir, version ? "0.25.1" }: +# Version can be selected with the 'version' argument, see generic.nix. +{ lib, callPackage, buildDunePackage, menhir, ... }@args: -let inherit (callPackage ./generic.nix { inherit version; }) src library_deps; +let inherit (callPackage ./generic.nix args) src version library_deps; in assert (lib.versionAtLeast version "0.25.1"); diff --git a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-rpc-lib.nix b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-rpc-lib.nix index a4492b2ead3..e1f5f29aa2f 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-rpc-lib.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat-rpc-lib.nix @@ -1,25 +1,16 @@ -{ lib, fetchurl, buildDunePackage, ocaml, csexp, sexplib0 }: +# Version can be selected with the 'version' argument, see generic.nix. +{ lib, fetchurl, buildDunePackage, ocaml, csexp, sexplib0, callPackage, ... }@args: -# for compat with ocaml-lsp -let source = - if lib.versionAtLeast ocaml.version "4.13" - then { - version = "0.26.0"; - sha256 = "sha256-AxSUq3cM7xCo9qocvrVmDkbDqmwM1FexEP7IWadeh30="; - } else { - version = "0.20.0"; - sha256 = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk="; - }; -in +let + # for compat with ocaml-lsp + version_arg = + if lib.versionAtLeast ocaml.version "4.13" then {} else { version = "0.20.0"; }; -buildDunePackage rec { - pname = "ocamlformat-rpc-lib"; - inherit (source) version; + inherit (callPackage ./generic.nix (args // version_arg)) src version; - src = fetchurl { - url = "https://github.com/ocaml-ppx/ocamlformat/releases/download/${version}/ocamlformat-${version}.tbz"; - inherit (source) sha256; - }; +in buildDunePackage rec { + pname = "ocamlformat-rpc-lib"; + inherit src version; minimalOCamlVersion = "4.08"; duneVersion = "3"; diff --git a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix index a2456dbef3b..4c3b6607737 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix @@ -1,3 +1,4 @@ +# Version can be selected with the 'version' argument, see generic.nix. { lib , callPackage , buildDunePackage @@ -5,10 +6,10 @@ , re , ocamlformat-lib , menhir -, version ? "0.26.0" -}: +, ... +}@args: -let inherit (callPackage ./generic.nix { inherit version; }) src library_deps; +let inherit (callPackage ./generic.nix args) src version library_deps; in lib.throwIf (lib.versionAtLeast ocaml.version "5.0" && !lib.versionAtLeast version "0.23") diff --git a/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/pkgs/development/ocaml-modules/ocamlsdl/default.nix deleted file mode 100644 index 2a33d8b17cc..00000000000 --- a/pkgs/development/ocaml-modules/ocamlsdl/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{stdenv, lib, fetchurl, ocaml, pkg-config, findlib, SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_gfx, lablgl }: - -let - pname = "ocamlsdl"; -in - -if 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"; - }; - - strictDeps = true; - - nativeBuildInputs = [ pkg-config ocaml findlib ]; - buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl ]; - - propagatedBuildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx pkg-config ]; - createFindlibDestdir = true; - - meta = { - homepage = "http://ocamlsdl.sourceforge.net/"; - description = "OCaml bindings for SDL 1.2"; - license = lib.licenses.lgpl21; - }; -} diff --git a/pkgs/development/ocaml-modules/ocolor/default.nix b/pkgs/development/ocaml-modules/ocolor/default.nix new file mode 100644 index 00000000000..16663a8db64 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocolor/default.nix @@ -0,0 +1,30 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, cppo +}: + +buildDunePackage rec { + pname = "ocolor"; + version = "1.3.1"; + + minimalOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "marc-chevalier"; + repo = pname; + rev = "refs/tags/${version}"; + sha256 = "osQTZGJp9yDoKNa6WoyhViNbRg1ukcD0Jxiu4VxqeUc="; + }; + + nativeBuildInputs = [ + cppo + ]; + + meta = { + description = "Print with style in your terminal using Format’s semantic tags"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ toastal ]; + homepage = "https://github.com/marc-chevalier/ocolor"; + }; +} diff --git a/pkgs/development/ocaml-modules/ocplib-simplex/default.nix b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix index 474f69546d1..768c0baa6d2 100644 --- a/pkgs/development/ocaml-modules/ocplib-simplex/default.nix +++ b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix @@ -1,33 +1,24 @@ -{ stdenv, lib, fetchFromGitHub, autoreconfHook, ocaml, findlib }: +{ lib, fetchFromGitHub, buildDunePackage, logs, num }: -let +buildDunePackage rec { pname = "ocplib-simplex"; - version = "0.4"; -in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "0.5"; src = fetchFromGitHub { owner = "OCamlPro-Iguernlala"; repo = pname; rev = "v${version}"; - sha256 = "09niyidrjzrj8g1qwx4wgsdf5m6cwrnzg7zsgala36jliic4di60"; + hash = "sha256-sy5QUmghG28tXlwbKWx3PpBGTtzXarTSzd1WLSYyvbc="; }; - nativeBuildInputs = [ autoreconfHook ocaml findlib ]; - - strictDeps = true; - - installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + propagatedBuildInputs = [ logs num ]; - createFindlibDestdir = true; + doCheck = 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 = lib.licenses.lgpl21; + license = lib.licenses.lgpl21Only; maintainers = [ lib.maintainers.vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/ocsigen-server/cohttp-5.patch b/pkgs/development/ocaml-modules/ocsigen-server/cohttp-5.patch deleted file mode 100644 index 44ade8da929..00000000000 --- a/pkgs/development/ocaml-modules/ocsigen-server/cohttp-5.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/src/server/ocsigen_cohttp.ml b/src/server/ocsigen_cohttp.ml -index 4363cff7..b0cc0c53 100644 ---- a/src/server/ocsigen_cohttp.ml -+++ b/src/server/ocsigen_cohttp.ml -@@ -14,25 +14,13 @@ exception Ext_http_error of - - let _print_request fmt request = - -- let print_list print_data out_ch lst = -- let rec aux = function -- | [] -> () -- | [ x ] -> print_data out_ch x -- | x :: r -> print_data out_ch x; aux r -- in aux lst -- in -- - Format.fprintf fmt "%s [%s/%s]:\n" - (Uri.to_string (Cohttp.Request.uri request)) - Cohttp.(Code.string_of_version (Request.version request)) - Cohttp.(Code.string_of_method (Request.meth request)); - - Cohttp.Header.iter -- (fun key values -> -- (print_list -- (fun fmt value -> Format.fprintf fmt "\t%s = %s\n" key value) -- fmt -- values)) -+ (Format.fprintf fmt "\t%s = %s\n") - (Cohttp.Request.headers request) - - let connections = Hashtbl.create 256 diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index f4225c917db..515fd218d8f 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -1,7 +1,7 @@ { lib, buildDunePackage, fetchFromGitHub, which, ocaml, lwt_react, ssl, lwt_ssl, findlib , bigstringaf, lwt, cstruct, mirage-crypto, zarith, mirage-crypto-ec, ptime, mirage-crypto-rng, mtime, ca-certs , cohttp, cohttp-lwt-unix, hmap -, lwt_log, ocaml_pcre, cryptokit, xml-light, ipaddr +, lwt_log, re, cryptokit, xml-light, ipaddr , camlzip , makeWrapper }: @@ -12,33 +12,30 @@ in let caml_ld_library_path = lib.concatMapStringsSep ":" mkpath [ - bigstringaf lwt ssl cstruct mirage-crypto zarith mirage-crypto-ec ptime mirage-crypto-rng mtime ca-certs cryptokit ocaml_pcre + bigstringaf lwt ssl cstruct mirage-crypto zarith mirage-crypto-ec ptime mirage-crypto-rng mtime ca-certs cryptokit re ] ; in buildDunePackage rec { - version = "5.0.1"; + version = "5.1.0"; pname = "ocsigenserver"; - duneVersion = "3"; minimalOCamlVersion = "4.08"; src = fetchFromGitHub { owner = "ocsigen"; repo = "ocsigenserver"; - rev = version; - sha256 = "sha256:1vzza33hd41740dqrx4854rqpyd8wv7kwpsvvmlpck841i9lh8h5"; + rev = "refs/tags/${version}"; + hash = "sha256-6xO+4eYSp6rlgPT09L7cvlaz6kYYuUPRa3K/TgZmaqE="; }; nativeBuildInputs = [ makeWrapper which ]; buildInputs = [ lwt_react camlzip findlib ]; propagatedBuildInputs = [ cohttp cohttp-lwt-unix cryptokit hmap ipaddr lwt_log lwt_ssl - ocaml_pcre xml-light + re xml-light ]; - patches = [ ./cohttp-5.patch ]; - configureFlags = [ "--root $(out)" "--prefix /" "--temproot ''" ]; dontAddPrefix = true; diff --git a/pkgs/development/ocaml-modules/ocsigen-start/default.nix b/pkgs/development/ocaml-modules/ocsigen-start/default.nix index 1df74b9036d..86dcbe053ef 100644 --- a/pkgs/development/ocaml-modules/ocsigen-start/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-start/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-ocsigen-start"; - version = "6.0.1"; + version = "6.1.0"; nativeBuildInputs = [ ocaml findlib eliom ]; buildInputs = [ ocsigen-ppx-rpc ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { owner = "ocsigen"; repo = "ocsigen-start"; rev = version; - sha256 = "sha256:097bjaxvb1canilmqr8ay3ihig2msq7z8mi0g0rnbciikj1jsrym"; + hash = "sha256-gHFPutoPYKTDsFninwBTc2WOIFd3+ghRYW2hi1y5MUs="; }; preInstall = '' diff --git a/pkgs/development/ocaml-modules/odig/default.nix b/pkgs/development/ocaml-modules/odig/default.nix new file mode 100644 index 00000000000..5ea3730c7ff --- /dev/null +++ b/pkgs/development/ocaml-modules/odig/default.nix @@ -0,0 +1,25 @@ +{ lib, stdenv, fetchurl, buildTopkgPackage, cmdliner, odoc, b0 }: + +buildTopkgPackage rec { + pname = "odig"; + version = "0.0.9"; + + src = fetchurl { + url = "${meta.homepage}/releases/odig-${version}.tbz"; + sha256 = "sha256-sYKvGYkxeF5FmrNQdOyMAtlsJqhlmUESi9SkPn/cjM4="; + }; + + buildInputs = [ cmdliner odoc b0 ]; + + meta = with lib; { + description = "Lookup documentation of installed OCaml packages"; + longDescription = '' + odig is a command line tool to lookup documentation of installed OCaml + packages. It shows package metadata, readmes, change logs, licenses, + cross-referenced `odoc` API documentation and manuals. + ''; + homepage = "https://erratique.ch/software/odig"; + license = licenses.isc; + maintainers = [ maintainers.Julow ]; + }; +} diff --git a/pkgs/development/ocaml-modules/parany/default.nix b/pkgs/development/ocaml-modules/parany/default.nix index f5af1616795..38247307658 100644 --- a/pkgs/development/ocaml-modules/parany/default.nix +++ b/pkgs/development/ocaml-modules/parany/default.nix @@ -1,35 +1,22 @@ -{ lib, buildDunePackage, fetchFromGitHub, ocaml, cpu, domainslib }: - -let params = - if lib.versionAtLeast ocaml.version "5.00" then { - version = "13.0.1"; - hash = "sha256-OYa0uLsDyzjmXZgWcYUxLhqco4Kp/icfDamNe3En5JQ="; - propagatedBuildInputs = [ domainslib ]; - } else { - version = "12.2.2"; - hash = "sha256-woZ4XJqqoRr/7mDurXYvTbSUUcLBEylzVYBQp1BAOqc="; - propagatedBuildInputs = [ cpu ]; - } -; in +{ lib, buildDunePackage, fetchFromGitHub, cpu }: buildDunePackage rec { pname = "parany"; - inherit (params) version; + version = "14.0.1"; - duneVersion = "3"; minimalOCamlVersion = "4.08"; src = fetchFromGitHub { owner = "UnixJunkie"; repo = pname; rev = "v${version}"; - inherit (params) hash; + hash = "sha256-QR3Rq30iKhft+9tVCgJLOq9bwJe7bcay/kMTXjjCLjE="; }; - inherit (params) propagatedBuildInputs; + propagatedBuildInputs = [ cpu ]; meta = with lib; { - inherit (src.meta) homepage; + homepage = "https://github.com/UnixJunkie/parany"; description = "Generalized map/reduce for multicore computing"; maintainers = [ maintainers.bcdarwin ]; license = licenses.lgpl2; diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index b52c73d0534..fb5f0192c45 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex, easy-format, xmlm, base64 }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "piqi is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { version = "0.6.16"; pname = "piqi"; diff --git a/pkgs/development/ocaml-modules/pp/default.nix b/pkgs/development/ocaml-modules/pp/default.nix index bd668800166..5412f8955d7 100644 --- a/pkgs/development/ocaml-modules/pp/default.nix +++ b/pkgs/development/ocaml-modules/pp/default.nix @@ -1,16 +1,13 @@ -{ buildDunePackage -, fetchurl -, ppx_expect -, lib -}: +{ buildDunePackage, fetchurl, ppx_expect, lib }: buildDunePackage rec { pname = "pp"; - version = "1.1.2"; + version = "1.2.0"; src = fetchurl { - url = "https://github.com/ocaml-dune/pp/releases/download/${version}/pp-${version}.tbz"; - hash = "sha256-5KTpjZaxu3aVD81tpOk4yG2YnfTX5I8C96RFlfWvHVY="; + url = + "https://github.com/ocaml-dune/pp/releases/download/${version}/pp-${version}.tbz"; + hash = "sha256-pegiVzxVr7Qtsp7FbqzR8qzY9lzy3yh44pHeN0zmkJw="; }; duneVersion = "3"; @@ -20,7 +17,8 @@ buildDunePackage rec { doCheck = true; meta = with lib; { - description = "A an alternative pretty printing library to the Format module of the OCaml standard library"; + description = + "A an alternative pretty printing library to the Format module of the OCaml standard library"; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ ]; diff --git a/pkgs/development/ocaml-modules/pprint/default.nix b/pkgs/development/ocaml-modules/pprint/default.nix index e0c5c269767..3a103ad41ae 100644 --- a/pkgs/development/ocaml-modules/pprint/default.nix +++ b/pkgs/development/ocaml-modules/pprint/default.nix @@ -2,15 +2,15 @@ buildDunePackage rec { pname = "pprint"; - version = "20220103"; + version = "20230830"; - useDune2 = true; + minimalOCamlVersion = "4.03"; src = fetchFromGitHub { owner = "fpottier"; repo = pname; rev = version; - sha256 = "sha256:09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"; + sha256 = "sha256-avf71vAgCL1MU8O7Q3FNN3wEdCDtbNZP0ipETnn8AqA="; }; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/pyml/default.nix b/pkgs/development/ocaml-modules/pyml/default.nix index 8358be50032..ed7f2ef559e 100644 --- a/pkgs/development/ocaml-modules/pyml/default.nix +++ b/pkgs/development/ocaml-modules/pyml/default.nix @@ -9,31 +9,15 @@ buildDunePackage rec { pname = "pyml"; - version = "20220905"; + version = "20231101"; src = fetchFromGitHub { owner = "thierry-martinez"; repo = "pyml"; rev = version; - sha256 = "PL4tFIKQLRutSn9Sf84/ImJv0DqkstNnJaNBqWDTKDQ="; + sha256 = "sha256-0Yy5T/S3Npwt0XJmEsdXGg5AXYi9vV9UG9nMSzz/CEc="; }; - patches = [ - # Fixes test crash. - # https://github.com/thierry-martinez/pyml/issues/85 - (fetchpatch { - url = "https://github.com/thierry-martinez/pyml/commit/a0bc5aca8632bea273f869d622cad2f55e754a7c.patch"; - sha256 = "bOqAokm5DE5rlvkBMQZtwMppRmoK9cvjJeGeP6BusnE="; - excludes = [ - "CHANGES.md" - ]; - }) - (fetchpatch { - url = "https://github.com/thierry-martinez/pyml/commit/97407473800b3f6215190643c1e6b9bd25d5caeb.patch"; - hash = "sha256-7CrVuV4JT7fyi/ktWz4nNOG/BbqsQVCoJwCAhE2y4YU="; - }) - ]; - buildInputs = [ utop ]; @@ -44,7 +28,8 @@ buildDunePackage rec { ]; nativeCheckInputs = [ - python3.pkgs.numpy python3.pkgs.ipython + python3.pkgs.numpy + python3.pkgs.ipython ]; strictDeps = true; diff --git a/pkgs/development/ocaml-modules/qcheck/core.nix b/pkgs/development/ocaml-modules/qcheck/core.nix index cc24d0711b2..a688e9e595e 100644 --- a/pkgs/development/ocaml-modules/qcheck/core.nix +++ b/pkgs/development/ocaml-modules/qcheck/core.nix @@ -2,16 +2,15 @@ buildDunePackage rec { pname = "qcheck-core"; - version = "0.20"; + version = "0.21.2"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; src = fetchFromGitHub { owner = "c-cube"; repo = "qcheck"; rev = "v${version}"; - sha256 = "sha256-d3gleiaPEDJTbHtieL4oAq1NlA/0NtzdW9SA1sItFeQ="; + hash = "sha256-a+sjpvpQZbXjQgyx69hhVAmRCfDMMhFlg965dK5UN6Q="; }; patches = [ ./bytes.patch ]; diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index 5244aaf9edd..2f5d2cd603b 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -3,8 +3,8 @@ let version_sha = if lib.versionAtLeast ocaml.version "4.08" then { - version = "1.10.4"; - sha256 = "sha256-g+s+QwCqmx3HggdJAQ9DYuqDUkdCEwUk14wgzpnKdHw="; + version = "1.11.0"; + sha256 = "sha256-AfwkR4DA9r5yrnlrH7dQ82feGGJP110H7nl4LtbfjU8="; } else { diff --git a/pkgs/development/ocaml-modules/repr/default.nix b/pkgs/development/ocaml-modules/repr/default.nix index 47c19154689..d3d23a5d9fc 100644 --- a/pkgs/development/ocaml-modules/repr/default.nix +++ b/pkgs/development/ocaml-modules/repr/default.nix @@ -2,18 +2,16 @@ buildDunePackage rec { pname = "repr"; - version = "0.6.0"; + version = "0.7.0"; src = fetchFromGitHub { owner = "mirage"; repo = "repr"; rev = version; - hash = "sha256-jF8KmaG07CT26O/1ANc6s1yHFJqhXDtd0jgTA04tIgw="; + hash = "sha256-SM55m5NIaQ2UKAtznNFSt3LN4QA7As0DyTxVeQjOTjI="; }; minimalOCamlVersion = "4.08"; - duneVersion = "3"; - strictDeps = true; propagatedBuildInputs = [ base64 diff --git a/pkgs/development/ocaml-modules/repr/ppx.nix b/pkgs/development/ocaml-modules/repr/ppx.nix index b1091114ce2..cd3bf78eadd 100644 --- a/pkgs/development/ocaml-modules/repr/ppx.nix +++ b/pkgs/development/ocaml-modules/repr/ppx.nix @@ -3,8 +3,7 @@ buildDunePackage { pname = "ppx_repr"; - inherit (repr) src version strictDeps; - duneVersion = "3"; + inherit (repr) src version; propagatedBuildInputs = [ ppx_deriving @@ -12,7 +11,7 @@ buildDunePackage { repr ]; - doCheck = false; # tests fail with ppxlib >= 0.23.0 + doCheck = true; checkInputs = [ alcotest hex diff --git a/pkgs/development/ocaml-modules/riot/default.nix b/pkgs/development/ocaml-modules/riot/default.nix new file mode 100644 index 00000000000..e03ac2c209e --- /dev/null +++ b/pkgs/development/ocaml-modules/riot/default.nix @@ -0,0 +1,37 @@ +{ lib +, bigstringaf +, buildDunePackage +, fetchurl +, iomux +, ptime +, uri +}: + +buildDunePackage rec { + pname = "riot"; + version = "0.0.2"; + + minimalOCamlVersion = "5.1"; + + src = fetchurl { + url = "https://github.com/leostera/riot/releases/download/${version}/riot-${version}.tbz"; + hash = "sha256-ck/tr5o0nKF4WNgjPODHg1/tlaKv1JtuYgqYfIIZ78Q="; + }; + + propagatedBuildInputs = [ + bigstringaf + iomux + ptime + uri + ]; + + doCheck = true; + + meta = { + description = "An actor-model multi-core scheduler for OCaml 5"; + homepage = "https://github.com/leostera/riot"; + changelog = "https://github.com/leostera/riot/blob/${version}/CHANGES.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ marsam ]; + }; +} diff --git a/pkgs/development/ocaml-modules/sail/default.nix b/pkgs/development/ocaml-modules/sail/default.nix index f66abd2bdcf..0e2dbda80d4 100644 --- a/pkgs/development/ocaml-modules/sail/default.nix +++ b/pkgs/development/ocaml-modules/sail/default.nix @@ -13,20 +13,20 @@ , z3 , linksem , num +, yojson }: buildDunePackage rec { pname = "sail"; - version = "0.15"; + version = "0.16"; src = fetchFromGitHub { owner = "rems-project"; repo = "sail"; rev = version; - hash = "sha256-eNdFOSzkniNvSCZeORRJ/IYAu+9P4HSouwmhd4BQLPk="; + hash = "sha256-HY/rgWi0S7ZiAWZF0fVIRK6fpoJ7Xp5EQcxoPRCPJ5Y="; }; - duneVersion = "3"; minimalOCamlVersion = "4.08"; nativeBuildInputs = [ @@ -43,6 +43,7 @@ buildDunePackage rec { linenoise pprint linksem + yojson ]; preBuild = '' diff --git a/pkgs/development/ocaml-modules/semver/default.nix b/pkgs/development/ocaml-modules/semver/default.nix index 15bd02f1868..5f4880c0cf2 100644 --- a/pkgs/development/ocaml-modules/semver/default.nix +++ b/pkgs/development/ocaml-modules/semver/default.nix @@ -1,29 +1,19 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: +{ lib, fetchurl, buildDunePackage, ocaml, alcotest }: -lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") - "semver is not available on OCaml older than 4.02" - -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-semver"; - version = "0.1.0"; - src = fetchzip { - url = "https://github.com/rgrinberg/ocaml-semver/archive/v${version}.tar.gz"; - sha256 = "sha256-0BzeuVTpuRIQjadGg08hTvMzZtKCl2utW2YK269oETk="; +buildDunePackage rec { + pname = "semver"; + version = "0.2.1"; + src = fetchurl { + url = "https://github.com/rgrinberg/ocaml-semver/releases/download/${version}/semver-${version}.tbz"; + hash = "sha256-CjzDUtoe5Hvt6zImb+EqVIulRUUUQd9MmuJ4BH/2mLg="; }; - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; - - strictDeps = true; - createFindlibDestdir = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; + checkInputs = [ alcotest ]; meta = { homepage = "https://github.com/rgrinberg/ocaml-semver"; description = "Semantic versioning module"; - platforms = ocaml.meta.platforms; license = lib.licenses.bsd3; maintainers = [ lib.maintainers.ulrikstrid ]; }; diff --git a/pkgs/development/ocaml-modules/sodium/default.nix b/pkgs/development/ocaml-modules/sodium/default.nix index 74983fef3e7..87fb82adcbe 100644 --- a/pkgs/development/ocaml-modules/sodium/default.nix +++ b/pkgs/development/ocaml-modules/sodium/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "sodium is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-sodium"; version = "0.6.0"; diff --git a/pkgs/development/ocaml-modules/uring/default.nix b/pkgs/development/ocaml-modules/uring/default.nix index c44bcf6ec89..4940f38f1b4 100644 --- a/pkgs/development/ocaml-modules/uring/default.nix +++ b/pkgs/development/ocaml-modules/uring/default.nix @@ -10,13 +10,13 @@ buildDunePackage rec { pname = "uring"; - version = "0.7"; + version = "0.8"; minimalOCamlVersion = "4.12"; src = fetchurl { url = "https://github.com/ocaml-multicore/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - sha256 = "khxV8aZYvdqYGjb1a27JQ+K8yg7OJN4ziJT2hzNIFQM="; + hash = "sha256-4OGst19vqEzuNVxO5xxtzS+mEilEBFoEc7lC3j3sTk4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/wayland/default.nix b/pkgs/development/ocaml-modules/wayland/default.nix index 9dea4a64a50..6c60458f966 100644 --- a/pkgs/development/ocaml-modules/wayland/default.nix +++ b/pkgs/development/ocaml-modules/wayland/default.nix @@ -2,28 +2,28 @@ , buildDunePackage , fetchurl , xmlm -, lwt +, eio , logs , fmt , cstruct , cmdliner -, alcotest-lwt +, alcotest +, eio_main }: buildDunePackage rec { pname = "wayland"; - version = "1.1"; + version = "2.0"; - minimalOCamlVersion = "4.08"; - duneVersion = "3"; + minimalOCamlVersion = "5.0"; src = fetchurl { url = "https://github.com/talex5/ocaml-wayland/releases/download/v${version}/wayland-${version}.tbz"; - sha256 = "0b7czgh08i6xcx3fsz6vd19sfyngwi0i27jdzg8cnjgrgwnagv6d"; + hash = "sha256-iCG1zk1tA7gdGGt78c3sQi0NN9Fh3HsCP4cy7Y3pg0s="; }; propagatedBuildInputs = [ - lwt + eio logs fmt cstruct @@ -35,7 +35,8 @@ buildDunePackage rec { ]; checkInputs = [ - alcotest-lwt + alcotest + eio_main ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/yaml/default.nix b/pkgs/development/ocaml-modules/yaml/default.nix index 416438dafbd..99b6fb245a2 100644 --- a/pkgs/development/ocaml-modules/yaml/default.nix +++ b/pkgs/development/ocaml-modules/yaml/default.nix @@ -6,15 +6,14 @@ buildDunePackage rec { pname = "yaml"; - version = "3.1.0"; + version = "3.2.0"; src = fetchurl { url = "https://github.com/avsm/ocaml-yaml/releases/download/v${version}/yaml-${version}.tbz"; - hash = "sha256-0KngriGEpp5tcgK/43B9EEOdMacSQYYCNLGfAgRS7Mc="; + hash = "sha256-xQ0qyii5+WZ5K3HhYDNR5dJO2k39PkRT+9UDZqOggic="; }; minimalOCamlVersion = "4.13"; - duneVersion = "3"; buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ bos ctypes ]; diff --git a/pkgs/development/ocaml-modules/yaml/yaml-sexp.nix b/pkgs/development/ocaml-modules/yaml/yaml-sexp.nix index aa8566ea608..e0cc9fac177 100644 --- a/pkgs/development/ocaml-modules/yaml/yaml-sexp.nix +++ b/pkgs/development/ocaml-modules/yaml/yaml-sexp.nix @@ -1,14 +1,17 @@ -{ lib, fetchurl, buildDunePackage, yaml, dune-configurator, ppx_sexp_conv, sexplib }: +{ lib, fetchurl, buildDunePackage, yaml, dune-configurator, ppx_sexp_conv, sexplib +, junit_alcotest +}: buildDunePackage rec { pname = "yaml-sexp"; inherit (yaml) version src; - duneVersion = "3"; - propagatedBuildInputs = [ yaml ppx_sexp_conv sexplib ]; + doCheck = true; + checkInputs = [ junit_alcotest ]; + meta = yaml.meta // { description = "ocaml-yaml with sexp support"; }; diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix index ca7b893ebc8..38a920ae865 100644 --- a/pkgs/development/ocaml-modules/yojson/default.nix +++ b/pkgs/development/ocaml-modules/yojson/default.nix @@ -2,11 +2,11 @@ buildDunePackage rec { pname = "yojson"; - version = "2.1.0"; + version = "2.1.1"; src = fetchurl { url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; - sha256 = "sha256-n8sf8ttYqyWfkih5awraR5Tq6XF3sYMzcTgMTk+QsV0="; + hash = "sha256-1YGDIHsZjcBlhmI5Bm4HTDT54TnA2cQXWjiAl5DogXM="; }; nativeBuildInputs = [ cppo ]; diff --git a/pkgs/development/ocaml-modules/yuujinchou/default.nix b/pkgs/development/ocaml-modules/yuujinchou/default.nix index 5f0c0965b27..48c1fb471fa 100644 --- a/pkgs/development/ocaml-modules/yuujinchou/default.nix +++ b/pkgs/development/ocaml-modules/yuujinchou/default.nix @@ -4,8 +4,8 @@ }: let params = if lib.versionAtLeast ocaml.version "5.0" then { - version = "4.0.0"; - hash = "sha256-yNLN5bBe4aft9Rl5VHmlOYTlnCdR2NgDWsc3uJHaZy4="; + version = "5.1.0"; + hash = "sha256-J3qkytgJkk2gT83KJ47nNM4cXqVHbx4iTPK+fLwR7Wk="; propagatedBuildInputs = [ algaeff bwd ]; } else { version = "2.0.0"; @@ -18,7 +18,6 @@ buildDunePackage rec { inherit (params) version; minimalOCamlVersion = "4.12"; - duneVersion = "3"; src = fetchFromGitHub { owner = "RedPRL"; diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index 70f0be8c7af..b260d946ce1 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -9,12 +9,12 @@ else stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-zarith"; - version = "1.12"; + version = "1.13"; src = fetchFromGitHub { owner = "ocaml"; repo = "Zarith"; rev = "release-${version}"; - sha256 = "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"; + sha256 = "sha256-CNVKoJeO3fsmWaV/dwnUA8lgI4ZlxR/LKCXpCXUrpSg="; }; nativeBuildInputs = [ pkg-config ocaml findlib ]; @@ -30,7 +30,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Fast, arbitrary precision OCaml integers"; - homepage = "http://forge.ocamlcore.org/projects/zarith"; + homepage = "https://github.com/ocaml/Zarith"; + changelog = "https://github.com/ocaml/Zarith/raw/${src.rev}/Changes"; license = licenses.lgpl2; inherit (ocaml.meta) platforms; maintainers = with maintainers; [ thoughtpolice vbgl ]; diff --git a/pkgs/development/ocaml-modules/zelus-gtk/default.nix b/pkgs/development/ocaml-modules/zelus-gtk/default.nix new file mode 100644 index 00000000000..759a625d26a --- /dev/null +++ b/pkgs/development/ocaml-modules/zelus-gtk/default.nix @@ -0,0 +1,24 @@ +{ buildDunePackage +, zelus +, lablgtk +}: + +buildDunePackage { + pname = "zelus-gtk"; + inherit (zelus) version src postPatch; + + minimalOCamlVersion = "4.10"; + + nativeBuildInputs = [ + zelus + ]; + + buildInputs = [ + lablgtk + ]; + + meta = { + description = "Zelus GTK library"; + inherit (zelus.meta) homepage license maintainers; + }; +} diff --git a/pkgs/development/ocaml-modules/zelus/default.nix b/pkgs/development/ocaml-modules/zelus/default.nix new file mode 100644 index 00000000000..d326e234c0d --- /dev/null +++ b/pkgs/development/ocaml-modules/zelus/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, buildDunePackage +, fetchFromGitHub +, menhir +, menhirLib +}: + +buildDunePackage rec { + pname = "zelus"; + version = "2.2"; + + minimalOCamlVersion = "4.08.1"; + + src = fetchFromGitHub { + owner = "INRIA"; + repo = "zelus"; + rev = version; + hash = "sha256-NcGX343LProADtzJwlq1kmihLaya1giY6xv9ScvdgTA="; + }; + + # ./configure: cannot execute: required file not found + postPatch = lib.optionalString stdenv.isLinux '' + patchShebangs configure + ''; + + nativeBuildInputs = [ + menhir + ]; + + buildInputs = [ + menhirLib + ]; + + meta = with lib; { + description = "A synchronous language with ODEs"; + homepage = "https://zelus.di.ens.fr"; + license = licenses.inria-zelus; + mainProgram = "zeluc"; + maintainers = with maintainers; [ wegank ]; + }; +} diff --git a/pkgs/development/ocaml-modules/zmq/default.nix b/pkgs/development/ocaml-modules/zmq/default.nix index 267566d7ba0..b92d8e6cb86 100644 --- a/pkgs/development/ocaml-modules/zmq/default.nix +++ b/pkgs/development/ocaml-modules/zmq/default.nix @@ -2,19 +2,15 @@ buildDunePackage rec { pname = "zmq"; - version = "5.1.5"; - - duneVersion = "3"; + version = "5.2.1"; src = fetchurl { - url = "https://github.com/issuu/ocaml-zmq/releases/download/${version}/zmq-lwt-${version}.tbz"; - sha256 = "sha256-mUfRPatLPFeSzWDwCIoFaVl85VkvDch4i6pOn3Kme1Y="; + url = "https://github.com/issuu/ocaml-zmq/releases/download/${version}/zmq-${version}.tbz"; + hash = "sha256-hVKfaTrUFqEBsv5hFB7JwsR630M0DKnqhB0QHpxcHKc="; }; buildInputs = [ czmq dune-configurator ]; - propagatedBuildInputs = [ stdint ]; - meta = { description = "ZeroMQ bindings for OCaml"; license = lib.licenses.mit; diff --git a/pkgs/development/ocaml-modules/zmq/lwt.nix b/pkgs/development/ocaml-modules/zmq/lwt.nix index f6408933452..1bbc1b7ad63 100644 --- a/pkgs/development/ocaml-modules/zmq/lwt.nix +++ b/pkgs/development/ocaml-modules/zmq/lwt.nix @@ -1,9 +1,8 @@ -{ buildDunePackage, zmq, ocaml_lwt }: +{ buildDunePackage, zmq, lwt }: buildDunePackage { pname = "zmq-lwt"; inherit (zmq) version src meta; - duneVersion = "3"; - propagatedBuildInputs = [ zmq ocaml_lwt ]; + propagatedBuildInputs = [ zmq lwt ]; } |