From e960e6e1dc689e2b5fe9e3ee824fc12860d9f27c Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 2 Aug 2025 20:39:44 +0200 Subject: [PATCH] inspircd: 4.7.0 -> 4.8.0 https://docs.inspircd.org/4/change-log/#inspircd-480 - The build system now allows using the system provided versions of utf8cpp and http-parser which is great for us. - Pass --disable-ownership which means we will no longer have to know the user to which will run inspircd at build time (we didn't know that before, so we had to pass --uid 0 and --gid 0 (which always exist), but having .service files which hardcode User=root isn't great even though the user could configure inspircd to use setuid(2)). --- pkgs/by-name/in/inspircd/package.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/in/inspircd/package.nix b/pkgs/by-name/in/inspircd/package.nix index add41960449f..38c995ee32a4 100644 --- a/pkgs/by-name/in/inspircd/package.nix +++ b/pkgs/by-name/in/inspircd/package.nix @@ -70,6 +70,8 @@ in nixosTests, perl, pkg-config, + http-parser, + utf8cpp, libargon2, openldap, libpq, @@ -148,13 +150,13 @@ in stdenv.mkDerivation rec { pname = "inspircd"; - version = "4.7.0"; + version = "4.8.0"; src = fetchFromGitHub { owner = "inspircd"; repo = "inspircd"; rev = "v${version}"; - sha256 = "sha256-/LiniV5moKGX7K6Hfzq1mxEBZ+sqnScQxT0AApiBPaA="; + sha256 = "sha256-fMfsNbkp9M8KiuhwOEFmPjowZ4JLP4IpX6LRO9aLHzY="; }; outputs = [ @@ -172,7 +174,18 @@ stdenv.mkDerivation rec { ++ lib.optionals (lib.elem "pgsql" extraModules) [ libpq.pg_config ]; - buildInputs = extraInputs; + + # Disable use of the vendored versions of these libraries + env = { + SYSTEM_HTTP_PARSER = "1"; + SYSTEM_UTFCPP = "1"; + }; + + buildInputs = [ + http-parser + utf8cpp + ] + ++ extraInputs; configurePhase = '' runHook preConfigure @@ -189,8 +202,7 @@ stdenv.mkDerivation rec { ./configure \ --disable-auto-extras \ --distribution-label nixpkgs${version} \ - --uid 0 \ - --gid 0 \ + --disable-ownership \ --binary-dir ${placeholder "bin"}/bin \ --config-dir /etc/inspircd \ --data-dir ${placeholder "lib"}/lib/inspircd \