From 683c8abee8d75d7c36bc67aa0e1000ca68fb8ad6 Mon Sep 17 00:00:00 2001 From: ThwyIgo Date: Thu, 8 Jan 2026 10:20:35 -0300 Subject: [PATCH 1/2] ulfius: fix dependencies propagation Some dependencies need to be visible to some build tools when this package is installed (e.g.: CMake). --- pkgs/by-name/ul/ulfius/package.nix | 37 +++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ul/ulfius/package.nix b/pkgs/by-name/ul/ulfius/package.nix index 7b44f35fcdbe..21542df0d6ad 100644 --- a/pkgs/by-name/ul/ulfius/package.nix +++ b/pkgs/by-name/ul/ulfius/package.nix @@ -2,7 +2,18 @@ lib, stdenv, fetchFromGitHub, + + withJson ? true, + withHttps ? true, + withWebsockets ? true, + withCurl ? true, + withLogger ? true, + withUwsc ? withWebsockets, # uwsc depends on websockets + + # nativeBuildInputs cmake, + + # Optional dependencies curl, gnutls, jansson, @@ -29,14 +40,24 @@ stdenv.mkDerivation (finalAttrs: { cmake ]; - buildInputs = [ - curl - gnutls - jansson + propagatedBuildInputs = [ libmicrohttpd orcania - yder - zlib + ] + ++ lib.optionals withJson [ jansson ] + ++ lib.optionals withCurl [ curl ] + ++ lib.optionals (withHttps || withWebsockets) [ gnutls ] + ++ lib.optionals withLogger [ yder ] + ++ lib.optionals withWebsockets [ zlib ]; + + cmakeFlags = [ + (lib.cmakeBool "WITH_CURL" withCurl) + (lib.cmakeBool "WITH_JANSSON" withJson) + (lib.cmakeBool "WITH_GNUTLS" (withHttps || withWebsockets)) + (lib.cmakeBool "WITH_YDER" withLogger) + (lib.cmakeBool "BUILD_UWSC" (withUwsc && withWebsockets)) + (lib.cmakeBool "WITH_WEBSOCKET" withWebsockets) + (lib.cmakeBool "WITH_WEBSOCKET_MESSAGE_LIST" withWebsockets) ]; meta = { @@ -45,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { changelog = "https://github.com/babelouest/ulfius/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.lgpl21Only; maintainers = with lib.maintainers; [ drupol ]; - mainProgram = "uwsc"; platforms = lib.platforms.all; - }; + } + // lib.optionalAttrs (withUwsc && withWebsockets) { mainProgram = "uwsc"; }; }) From 514beababba9bb98e552905aec9f1eb61a4773ad Mon Sep 17 00:00:00 2001 From: ThwyIgo Date: Wed, 28 Jan 2026 10:13:40 -0300 Subject: [PATCH 2/2] meshtasticd: Remove unnecessary dependencies Dependencies propagated by ulfius removed. --- pkgs/by-name/me/meshtasticd/package.nix | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkgs/by-name/me/meshtasticd/package.nix b/pkgs/by-name/me/meshtasticd/package.nix index 7a9ec6d4a12a..8c7a1efa6c16 100644 --- a/pkgs/by-name/me/meshtasticd/package.nix +++ b/pkgs/by-name/me/meshtasticd/package.nix @@ -16,13 +16,6 @@ libuv, libxkbcommon, ulfius, - openssl, - gnutls, - jansson, - zlib, - libmicrohttpd, - orcania, - yder, yaml-cpp, udevCheckHook, versionCheckHook, @@ -73,22 +66,15 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ bluez - gnutls i2c-tools - jansson libX11 libgpiod_1 libinput - libmicrohttpd libusb1 libuv libxkbcommon - openssl - orcania ulfius yaml-cpp - yder - zlib ]; preConfigure = ''