From 2b6bde5a5316cf48a46d4c249ff726de4aae7dff Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 24 Feb 2026 12:44:51 +0100 Subject: [PATCH] cgit: 1.2.3 -> 1.3 https://lists.zx2c4.com/pipermail/cgit/2026-February/004968.html The NixOS modules for cgit now also serve the new cgit.js file. Note that the modules will always serve it even if the user disables js, but that's probably fine. --- nixos/modules/services/networking/cgit.nix | 2 +- .../services/web-servers/lighttpd/cgit.nix | 2 ++ .../version-management/cgit/default.nix | 20 +++++++------------ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/cgit.nix b/nixos/modules/services/networking/cgit.nix index 49cbbfe2c9c8..47ddbc2f9772 100644 --- a/nixos/modules/services/networking/cgit.nix +++ b/nixos/modules/services/networking/cgit.nix @@ -300,7 +300,7 @@ in lib.mapAttrsToList (name: cfg: { ${cfg.nginx.virtualHost} = { locations = - (genAttrs' [ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ] ( + (genAttrs' [ "cgit.css" "cgit.js" "cgit.png" "favicon.ico" "robots.txt" ] ( fileName: lib.nameValuePair "= ${stripLocation cfg}/${fileName}" { alias = lib.mkDefault "${cfg.package}/cgit/${fileName}"; diff --git a/nixos/modules/services/web-servers/lighttpd/cgit.nix b/nixos/modules/services/web-servers/lighttpd/cgit.nix index ebd4c219222f..d8db6cf54968 100644 --- a/nixos/modules/services/web-servers/lighttpd/cgit.nix +++ b/nixos/modules/services/web-servers/lighttpd/cgit.nix @@ -13,6 +13,7 @@ let configFile = pkgs.writeText "cgitrc" '' # default paths to static assets css=${pathPrefix}/cgit.css + js=${pathPrefix}/cgit.js logo=${pathPrefix}/cgit.png favicon=${pathPrefix}/favicon.ico @@ -82,6 +83,7 @@ in ) alias.url = ( "${pathPrefix}/cgit.css" => "${pkgs.cgit}/cgit/cgit.css", + "${pathPrefix}/cgit.js" => "${pkgs.cgit}/cgit/cgit.js", "${pathPrefix}/cgit.png" => "${pkgs.cgit}/cgit/cgit.png", "${pathPrefix}" => "${pkgs.cgit}/cgit/cgit.cgi" ) diff --git a/pkgs/applications/version-management/cgit/default.nix b/pkgs/applications/version-management/cgit/default.nix index 4ff7ca269e82..f2c1c3a12266 100644 --- a/pkgs/applications/version-management/cgit/default.nix +++ b/pkgs/applications/version-management/cgit/default.nix @@ -25,19 +25,19 @@ stdenv.mkDerivation { pname = "cgit"; - version = "1.2.3"; + version = "1.3"; src = fetchurl { - url = "https://git.zx2c4.com/cgit/snapshot/cgit-1.2.3.tar.xz"; - sha256 = "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"; + url = "https://git.zx2c4.com/cgit/snapshot/cgit-1.3.tar.xz"; + sha256 = "836b6edbc7f99e11037a8b928d609ce346ed77a55545e17fff8cea59b5b7aa42"; }; # cgit is tightly coupled with git and needs a git source tree to build. # IMPORTANT: Remember to check which git version cgit needs on every version # bump (look for "GIT_VER" in the top-level Makefile). gitSrc = fetchurl { - url = "mirror://kernel/software/scm/git/git-2.25.1.tar.xz"; - sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2"; + url = "mirror://kernel/software/scm/git/git-2.53.0.tar.xz"; + hash = "sha256-WBi9fYCwYbu9/sikM9YJ3IgYoFmR9zH/xKVh4soYxlM="; }; separateDebugInfo = true; @@ -92,15 +92,9 @@ stdenv.mkDerivation { "AR=${stdenv.cc.targetPrefix}ar" ]; - # Install manpage. postInstall = '' - # xmllint fails: - #make install-man - - # bypassing xmllint works: - a2x --no-xmllint -f manpage cgitrc.5.txt - mkdir -p "$out/share/man/man5" - cp cgitrc.5 "$out/share/man/man5" + # Install manpage. + make install-man $makeFlags wrapPythonProgramsIn "$out/lib/cgit/filters" "$out ''${pythonPath[*]}"