From 1a770910a67f92fe46212202e835f2c6de01ca89 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 7 Sep 2024 17:35:09 +0200 Subject: [PATCH] fix(ubus): rendez vous URL for the unix socket Signed-off-by: Raito Bezarius --- pkgs/ubus/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/ubus/default.nix b/pkgs/ubus/default.nix index c5c78a1..88ea647 100644 --- a/pkgs/ubus/default.nix +++ b/pkgs/ubus/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, libubox, json_c, lua5_1 }: +{ stdenv, fetchFromGitHub, cmake, libubox, json_c, lua5_1, defaultSocketLocation ? "/run/ubus/ubus.sock" }: stdenv.mkDerivation { pname = "ubus"; version = "unstable-04-09-2024"; @@ -10,6 +10,12 @@ stdenv.mkDerivation { hash = "sha256-n82Ub0IiuvWbnlDCoN+0hjo/1PbplEbc56kuOYMrHxQ="; }; + # We don't use /var/run/ in Liminix by default. + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail "/var/run/ubus/ubus.sock" "${defaultSocketLocation}" + ''; + nativeBuildInputs = [ cmake ];