From d950622eb9e78df43b263f0376a3a1b5ef38a195 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 16 Feb 2025 06:25:57 +0000 Subject: [PATCH 01/14] stevenblack-blocklist: 3.15.15 -> 3.15.17 --- pkgs/by-name/st/stevenblack-blocklist/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stevenblack-blocklist/package.nix b/pkgs/by-name/st/stevenblack-blocklist/package.nix index 97e0ed4404c9..3572942e5dfc 100644 --- a/pkgs/by-name/st/stevenblack-blocklist/package.nix +++ b/pkgs/by-name/st/stevenblack-blocklist/package.nix @@ -6,13 +6,13 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "stevenblack-blocklist"; - version = "3.15.15"; + version = "3.15.17"; src = fetchFromGitHub { owner = "StevenBlack"; repo = "hosts"; tag = finalAttrs.version; - hash = "sha256-wycPhloUQY24wUDFWd/URRlFUiW2hi/wcohrWQ5R8E4="; + hash = "sha256-NjGiPINGJb6EHnRH3ubiorT4069eYWYj1WooOyE2vDM="; }; outputs = [ From e6bfdde6bdf3c7bffd9cd549e6189d8349201af9 Mon Sep 17 00:00:00 2001 From: L-Trump Date: Tue, 18 Feb 2025 19:08:22 +0800 Subject: [PATCH 02/14] easytier: 2.1.2 -> 2.2.2 --- pkgs/by-name/ea/easytier/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ea/easytier/package.nix b/pkgs/by-name/ea/easytier/package.nix index 4a3410ecde67..ba56c33b08f8 100644 --- a/pkgs/by-name/ea/easytier/package.nix +++ b/pkgs/by-name/ea/easytier/package.nix @@ -11,18 +11,18 @@ rustPlatform.buildRustPackage rec { pname = "easytier"; - version = "2.1.2"; + version = "2.2.2"; src = fetchFromGitHub { owner = "EasyTier"; repo = "EasyTier"; tag = "v${version}"; - hash = "sha256-iY4HluL5TlYuKDBrz0fvLwJg/aX9lKiCyFs4V5WhQZs="; + hash = "sha256-Heb2ax2yUuGmqzIjrqjHUL3QZoofp7ATrIEN27ZA/Zs="; }; useFetchCargoVendor = true; - cargoHash = "sha256-KV7CdSEbmR7HIfKsS1sKsPqMz9Ku/rfbV8WmFkMC9oI="; + cargoHash = "sha256-U2ZK9GlfTjXsA7Fjd288YDlqSZNl3vHryLG1FE/GH5c="; nativeBuildInputs = [ protobuf ]; From 964b5727cb21746ab91e70a4bfc6cf16e423b51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Bla=C5=A1kovi=C4=87?= Date: Mon, 17 Feb 2025 10:40:59 +0000 Subject: [PATCH 03/14] python310/python311: fix failing tests with openssl >= 3.4 --- .../3.10/raise-OSError-for-ERR_LIB_SYS.patch | 28 +++++++++++++++++++ .../interpreters/python/cpython/default.nix | 9 ++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch diff --git a/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch b/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch new file mode 100644 index 000000000000..dd1fe891bf25 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch @@ -0,0 +1,28 @@ +diff --git a/Modules/_ssl.c b/Modules/_ssl.c +index e637830..80728d2 100644 +--- a/Modules/_ssl.c ++++ b/Modules/_ssl.c +@@ -656,6 +656,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) + errstr = "Some I/O error occurred"; + } + } else { ++ if (ERR_GET_LIB(e) == ERR_LIB_SYS) { ++ // A system error is being reported; reason is set to errno ++ errno = ERR_GET_REASON(e); ++ return PyErr_SetFromErrno(PyExc_OSError); ++ } + p = PY_SSL_ERROR_SYSCALL; + } + break; +@@ -681,6 +686,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) + errstr = "EOF occurred in violation of protocol"; + } + #endif ++ if (ERR_GET_LIB(e) == ERR_LIB_SYS) { ++ // A system error is being reported; reason is set to errno ++ errno = ERR_GET_REASON(e); ++ return PyErr_SetFromErrno(PyExc_OSError); ++ } + break; + } + default: diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index d0fab0f83a66..8a052a55b7da 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -299,6 +299,15 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { ] ++ optionals (pythonOlder "3.12") [ # https://github.com/python/cpython/issues/90656 ./loongarch-support.patch + # fix failing tests with openssl >= 3.4 + # https://github.com/python/cpython/pull/127361 + ] ++ optionals (pythonAtLeast "3.10" && pythonOlder "3.11") [ + ./3.10/raise-OSError-for-ERR_LIB_SYS.patch + ] ++ optionals (pythonAtLeast "3.11" && pythonOlder "3.12") [ + (fetchpatch { + url = "https://github.com/python/cpython/commit/f4b31edf2d9d72878dab1f66a36913b5bcc848ec.patch"; + sha256 = "sha256-w7zZMp0yqyi4h5oG8sK4z9BwNEkqg4Ar+en3nlWcxh0="; + }) ] ++ optionals (pythonAtLeast "3.11" && pythonOlder "3.13") [ # backport fix for https://github.com/python/cpython/issues/95855 ./platform-triplet-detection.patch From 0cf76e6962ca4124794a7471b5f9cd770461799c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 18 Feb 2025 23:03:17 +0000 Subject: [PATCH 04/14] supabase-cli: 2.10.2 -> 2.15.0 --- pkgs/by-name/su/supabase-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/su/supabase-cli/package.nix b/pkgs/by-name/su/supabase-cli/package.nix index 4e10f68be199..fde07867f389 100644 --- a/pkgs/by-name/su/supabase-cli/package.nix +++ b/pkgs/by-name/su/supabase-cli/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "supabase-cli"; - version = "2.10.2"; + version = "2.15.0"; src = fetchFromGitHub { owner = "supabase"; repo = "cli"; rev = "v${version}"; - hash = "sha256-OuX2fD+b5B5d3ir638ZuNQpt/HuEUhc1chrPyq03qSE="; + hash = "sha256-SMjP+9YRmU7FVBeM7n+iZri2LBZDtZw52EjXmlBIbyQ="; }; - vendorHash = "sha256-8CMmwMBqrfeiXp2XgpXruOkBhdUUf7W4okvn2Z3+MYA="; + vendorHash = "sha256-WFTnaZ+qOYkKE9vy3GWBbPK/TppUKCIwdU25KU318Lc="; ldflags = [ "-s" From 74222f6e4661652e72597e0edd14b4bace8f3584 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 19 Feb 2025 00:02:06 +0000 Subject: [PATCH 05/14] slackdump: 3.0.5 -> 3.0.7 --- pkgs/by-name/sl/slackdump/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sl/slackdump/package.nix b/pkgs/by-name/sl/slackdump/package.nix index 7e41a183b7d7..667d9ff7a7b1 100644 --- a/pkgs/by-name/sl/slackdump/package.nix +++ b/pkgs/by-name/sl/slackdump/package.nix @@ -9,13 +9,13 @@ buildGoModule rec { pname = "slackdump"; - version = "3.0.5"; + version = "3.0.7"; src = fetchFromGitHub { owner = "rusq"; repo = "slackdump"; tag = "v${version}"; - hash = "sha256-iNXCqiDTD5z1dNIsQiTNAmVqx2HpTNDCdhY5X2FoC8k="; + hash = "sha256-IlWnlWCtcp/vT9hUaWyQXyaieOnhI1eW8PluJu4buHk="; }; nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.IOKitTools; @@ -32,7 +32,7 @@ buildGoModule rec { "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; - vendorHash = "sha256-c3Z4p/u7+fMV9kydh7fqRxSEERJI3cw1XoIPcMp0mL4="; + vendorHash = "sha256-g38rP8h3+eo92S/0gqP8F/BY5HoxK1uCdHTKGCFv2dE="; __darwinAllowLocalNetworking = true; From 5ee30e862c071f95e4a9067553ff3f5608dd4224 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Wed, 19 Feb 2025 01:25:00 +0100 Subject: [PATCH 06/14] home-assistant-custom-components.localtuya: init at 2025.2.1 --- .../custom-components/localtuya/package.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/localtuya/package.nix b/pkgs/servers/home-assistant/custom-components/localtuya/package.nix index 2b0e06cf1b4b..75be76ebd3c5 100644 --- a/pkgs/servers/home-assistant/custom-components/localtuya/package.nix +++ b/pkgs/servers/home-assistant/custom-components/localtuya/package.nix @@ -5,21 +5,21 @@ }: buildHomeAssistantComponent rec { - owner = "rospogrigio"; + owner = "xZetsubou"; domain = "localtuya"; - version = "5.2.2"; + version = "2025.2.1"; src = fetchFromGitHub { - owner = "rospogrigio"; - repo = "localtuya"; - rev = "v${version}"; - hash = "sha256-GexGUu4hevRDGF7gv7Jklr5YZJV+QH3kZN7p+eK9HlM="; + owner = "xZetsubou"; + repo = "hass-localtuya"; + rev = version; + hash = "sha256-on/KuZSJOCBGNRnGtxgGB5bquznjeJ+xMYNVnW67m0s="; }; meta = with lib; { - changelog = "https://github.com/rospogrigio/localtuya/releases/tag/${version}"; - description = "Home Assistant custom Integration for local handling of Tuya-based devices"; - homepage = "https://github.com/rospogrigio/localtuya"; + changelog = "https://github.com/xZetsubou/hass-localtuya/releases/tag/${version}"; + description = "Home Assistant custom Integration for local handling of Tuya-based devices, fork from local-tuya"; + homepage = "https://github.com/xZetsubou/hass-localtuya"; maintainers = with maintainers; [ rhoriguchi ]; license = licenses.gpl3Only; }; From 786885dcc2cd8c48554dfad0550a23b54ddb4255 Mon Sep 17 00:00:00 2001 From: L-Trump Date: Tue, 18 Feb 2025 19:08:49 +0800 Subject: [PATCH 07/14] easytier: fix build --- pkgs/by-name/ea/easytier/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ea/easytier/package.nix b/pkgs/by-name/ea/easytier/package.nix index ba56c33b08f8..954b1f4d2aaf 100644 --- a/pkgs/by-name/ea/easytier/package.nix +++ b/pkgs/by-name/ea/easytier/package.nix @@ -24,7 +24,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-U2ZK9GlfTjXsA7Fjd288YDlqSZNl3vHryLG1FE/GH5c="; - nativeBuildInputs = [ protobuf ]; + nativeBuildInputs = [ + protobuf + rustPlatform.bindgenHook + ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security From f41e5341645367e0e75bd7114052543e082d5a72 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 19 Feb 2025 01:07:34 +0000 Subject: [PATCH 08/14] enumer: 1.5.9 -> 1.5.11 --- pkgs/by-name/en/enumer/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/en/enumer/package.nix b/pkgs/by-name/en/enumer/package.nix index d4eae263e383..5905e63146c8 100644 --- a/pkgs/by-name/en/enumer/package.nix +++ b/pkgs/by-name/en/enumer/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "enumer"; - version = "1.5.9"; + version = "1.5.11"; src = fetchFromGitHub { owner = "dmarkham"; repo = "enumer"; tag = "v${version}"; - hash = "sha256-NYL36GBogFM48IgIWhFa1OLZNUeEi0ppS6KXybnPQks="; + hash = "sha256-zFx4Djar2nC/kanoEkmHTumon2MwKMsoZU6/heUPW2I="; }; - vendorHash = "sha256-CJCay24FlzDmLjfZ1VBxih0f+bgBNu+Xn57QgWT13TA="; + vendorHash = "sha256-w9T9PWMJjBJP2MmhGC7e78zbszgCwtVrfO5AQlu/ugQ="; meta = with lib; { description = "Go tool to auto generate methods for enums"; From 96479fa93f02b1dceaaed6c5d04dcd07cbd6bef2 Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Sun, 16 Feb 2025 12:40:03 -0500 Subject: [PATCH 09/14] tracelinks: init at 1.0.1 Co-authored-by: nayeko <196556004+nayeko@users.noreply.github.com> --- pkgs/by-name/tr/tracelinks/package.nix | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/by-name/tr/tracelinks/package.nix diff --git a/pkgs/by-name/tr/tracelinks/package.nix b/pkgs/by-name/tr/tracelinks/package.nix new file mode 100644 index 000000000000..f3e413b87f0c --- /dev/null +++ b/pkgs/by-name/tr/tracelinks/package.nix @@ -0,0 +1,36 @@ +{ + fetchFromGitHub, + help2man, + lib, + nix-update-script, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "tracelinks"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "flox"; + repo = "tracelinks"; + tag = "v${finalAttrs.version}"; + hash = "sha256-GftF2s2eRrkfzw2NpzTZ6Uhehcg2tMSOcsjHJssQJzU="; + }; + + makeFlags = [ + "PREFIX=$(out)" + "VERSION=${finalAttrs.version}" + ]; + nativeBuildInputs = [ help2man ]; + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Report on symbolic links encountered in path traversals"; + homepage = "https://github.com/flox/tracelinks"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ limeytexan ]; + platforms = lib.platforms.unix; + }; +}) From 213da5a54729c8d323b4ee92681ca5ce6128ca46 Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Sun, 16 Feb 2025 11:48:38 -0500 Subject: [PATCH 10/14] t3: init at 1.0.8 Co-authored-by: nayeko <196556004+nayeko@users.noreply.github.com> Co-authored-by: Moraxyc --- pkgs/by-name/t3/t3/package.nix | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/by-name/t3/t3/package.nix diff --git a/pkgs/by-name/t3/t3/package.nix b/pkgs/by-name/t3/t3/package.nix new file mode 100644 index 000000000000..c1b05db9d3ce --- /dev/null +++ b/pkgs/by-name/t3/t3/package.nix @@ -0,0 +1,38 @@ +{ + fetchFromGitHub, + help2man, + lib, + nix-update-script, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "t3"; + version = "1.0.8"; + + src = fetchFromGitHub { + owner = "flox"; + repo = "t3"; + tag = "v${finalAttrs.version}"; + hash = "sha256-SaSBFqMh6zOty0mnYL4RJxAxbB1LJusKLdMn7Atv+As="; + }; + + makeFlags = [ + "PREFIX=$(out)" + "VERSION=${finalAttrs.version}" + ]; + nativeBuildInputs = [ help2man ]; + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Next generation tee with colorized output streams and precise time stamping"; + homepage = "https://github.com/flox/t3"; + changelog = "https://github.com/flox/t3/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ limeytexan ]; + platforms = lib.platforms.unix; + mainProgram = "t3"; + }; +}) From 3f9d8a1fea87660f8d0d5ad78f5a10737cd498cf Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 19 Feb 2025 09:03:18 +0700 Subject: [PATCH 11/14] lib/pathWith: keep old typename, to avoid breakage in downstream projects --- lib/types.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index 07d8a28d1394..069d7b170327 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -579,7 +579,7 @@ rec { absolute ? null, }: throwIf (inStore != null && absolute != null && inStore && !absolute) "In pathWith, inStore means the path must be absolute" mkOptionType { - name = "pathWith"; + name = "path"; description = ( (if absolute == null then "" else (if absolute then "absolute " else "relative ")) + "path" + @@ -588,7 +588,7 @@ rec { descriptionClass = "noun"; merge = mergeEqualOption; - functor = defaultFunctor "pathWith" // { + functor = defaultFunctor "path" // { type = pathWith; payload = {inherit inStore absolute; }; binOp = lhs: rhs: if lhs == rhs then lhs else null; From dab601686d67d0c8fda19308012166c7394bb1b0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 12 Feb 2025 03:55:54 +0100 Subject: [PATCH 12/14] ocamlPackages.dream-pure: init at 1.0.0-alpha8 --- pkgs/development/ocaml-modules/dream/pure.nix | 38 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/dream/pure.nix diff --git a/pkgs/development/ocaml-modules/dream/pure.nix b/pkgs/development/ocaml-modules/dream/pure.nix new file mode 100644 index 000000000000..884715f67cf3 --- /dev/null +++ b/pkgs/development/ocaml-modules/dream/pure.nix @@ -0,0 +1,38 @@ +{ + lib, + buildDunePackage, + fetchurl, + lwt_ppx, + base64, + hmap, + lwt, + ptime, + uri, +}: + +buildDunePackage rec { + pname = "dream-pure"; + version = "1.0.0-alpha8"; + + src = fetchurl { + url = "https://github.com/aantron/dream/releases/download/${version}/dream-${version}.tar.gz"; + hash = "sha256-I+2BKJDAP+XJl0pJYano5iEmvte8fX0UQLhGUslc8pY="; + }; + + buildInputs = [ lwt_ppx ]; + + propagatedBuildInputs = [ + base64 + hmap + lwt + ptime + uri + ]; + + meta = { + description = "Shared HTTP types for Dream (server) and Hyper (client)"; + homepage = "https://aantron.github.io/dream/"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 73a1ce489819..89ff519e88a9 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -383,6 +383,8 @@ let dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; + dream-pure = callPackage ../development/ocaml-modules/dream/pure.nix { }; + dscheck = callPackage ../development/ocaml-modules/dscheck { }; dssi = callPackage ../development/ocaml-modules/dssi { }; From cd5ff2ed4f3d38e90437ee18f10b44daab43dbce Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 12 Feb 2025 03:55:59 +0100 Subject: [PATCH 13/14] ocamlPackages.dream-httpaf: init at 1.0.0-alpha8 --- .../ocaml-modules/dream/httpaf.nix | 23 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/ocaml-modules/dream/httpaf.nix diff --git a/pkgs/development/ocaml-modules/dream/httpaf.nix b/pkgs/development/ocaml-modules/dream/httpaf.nix new file mode 100644 index 000000000000..6ba186bceb7a --- /dev/null +++ b/pkgs/development/ocaml-modules/dream/httpaf.nix @@ -0,0 +1,23 @@ +{ + lib, + buildDunePackage, + dream-pure, + lwt_ppx, + httpun-ws, +}: + +buildDunePackage { + pname = "dream-httpaf"; + + inherit (dream-pure) version src; + + buildInputs = [ lwt_ppx ]; + propagatedBuildInputs = [ + dream-pure + httpun-ws + ]; + + meta = dream-pure.meta // { + description = "Shared http/af stack for Dream (server) and Hyper (client)"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 89ff519e88a9..4418bb88d782 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -383,6 +383,8 @@ let dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; + dream-httpaf = callPackage ../development/ocaml-modules/dream/httpaf.nix { }; + dream-pure = callPackage ../development/ocaml-modules/dream/pure.nix { }; dscheck = callPackage ../development/ocaml-modules/dscheck { }; From 2ce8716c081c29a63720c13e3b32159aed43a15a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 12 Feb 2025 03:56:02 +0100 Subject: [PATCH 14/14] ocamlPackages.dream: init at 1.0.0-alpha8 --- .../ocaml-modules/dream/default.nix | 67 +++++++++++++++++++ .../ocaml-modules/dream/httpun.patch | 20 ++++++ pkgs/top-level/ocaml-packages.nix | 2 + 3 files changed, 89 insertions(+) create mode 100644 pkgs/development/ocaml-modules/dream/default.nix create mode 100644 pkgs/development/ocaml-modules/dream/httpun.patch diff --git a/pkgs/development/ocaml-modules/dream/default.nix b/pkgs/development/ocaml-modules/dream/default.nix new file mode 100644 index 000000000000..d35993507938 --- /dev/null +++ b/pkgs/development/ocaml-modules/dream/default.nix @@ -0,0 +1,67 @@ +{ + lib, + buildDunePackage, + dream-pure, + lwt_ppx, + camlp-streams, + caqti-lwt, + cstruct, + digestif, + dream-httpaf, + graphql-lwt, + h2-lwt-unix, + httpun-lwt-unix, + httpun-ws, + lambdasoup, + lwt_ssl, + magic-mime, + markup, + mirage-clock, + mirage-crypto-rng, + mirage-crypto-rng-lwt, + multipart_form-lwt, + ssl, + unstrctrd, + uri, + yojson, +}: + +buildDunePackage { + pname = "dream"; + + inherit (dream-pure) version src; + + # Compatibility with httpun 0.2.0 and h2 0.13 + patches = [ ./httpun.patch ]; + + buildInputs = [ lwt_ppx ]; + + propagatedBuildInputs = [ + camlp-streams + caqti-lwt + cstruct + digestif + dream-httpaf + dream-pure + graphql-lwt + h2-lwt-unix + httpun-lwt-unix + httpun-ws + lambdasoup + lwt_ssl + magic-mime + markup + mirage-clock + mirage-crypto-rng + mirage-crypto-rng-lwt + multipart_form-lwt + ssl + unstrctrd + uri + yojson + ]; + + meta = dream-pure.meta // { + description = "Tidy, feature-complete Web framework"; + }; +} diff --git a/pkgs/development/ocaml-modules/dream/httpun.patch b/pkgs/development/ocaml-modules/dream/httpun.patch new file mode 100644 index 000000000000..fe47b4e6ba45 --- /dev/null +++ b/pkgs/development/ocaml-modules/dream/httpun.patch @@ -0,0 +1,20 @@ +diff --git a/src/http/adapt.ml b/src/http/adapt.ml +index c6bd416..5b01e17 100644 +--- a/src/http/adapt.ml ++++ b/src/http/adapt.ml +@@ -74,7 +74,7 @@ let forward_body + response + (Httpun.Body.Writer.write_string body) + (Httpun.Body.Writer.write_bigstring body) +- (Httpun.Body.Writer.flush body) ++ (fun f -> Httpun.Body.Writer.flush body (fun _ -> f ())) + (fun _code -> Httpun.Body.Writer.close body) + + let forward_body_h2 +@@ -85,5 +85,5 @@ let forward_body_h2 + response + (H2.Body.Writer.write_string body) + (H2.Body.Writer.write_bigstring body) +- (H2.Body.Writer.flush body) ++ (fun f -> H2.Body.Writer.flush body (fun _ -> f ())) + (fun _code -> H2.Body.Writer.close body) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4418bb88d782..fcd91264cbb5 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -383,6 +383,8 @@ let dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; + dream = callPackage ../development/ocaml-modules/dream { }; + dream-httpaf = callPackage ../development/ocaml-modules/dream/httpaf.nix { }; dream-pure = callPackage ../development/ocaml-modules/dream/pure.nix { };