From 7091da1c89c559554b3896b7c87bf382c0087246 Mon Sep 17 00:00:00 2001 From: patrick-scho Date: Thu, 27 Nov 2025 20:36:39 +0100 Subject: remove gitweb patch --- flake.nix | 7 +-- patches/gitweb.patch | 138 --------------------------------------------------- 2 files changed, 1 insertion(+), 144 deletions(-) delete mode 100644 patches/gitweb.patch diff --git a/flake.nix b/flake.nix index ac4fea0..825ae50 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "resetmsmice"; + description = "my flakes"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; @@ -11,11 +11,6 @@ postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"''; }); }; - gitweb = final: prev: { - gitweb = prev.gitweb.overrideAttrs (oldAttrs: { - patches = [ ./patches/gitweb.patch ]; - }); - }; }; inherit (flake-utils.lib.eachDefaultSystem (system: let diff --git a/patches/gitweb.patch b/patches/gitweb.patch deleted file mode 100644 index 0422081..0000000 --- a/patches/gitweb.patch +++ /dev/null @@ -1,138 +0,0 @@ -# https://stackoverflow.com/questions/8321649/gitweb-how-to-display-markdown-file-in-html-format-automatically-like-github ---- gitweb.cgi.orig 2020-10-06 10:13:45.621810025 +0100 -+++ gitweb.cgi 2020-10-06 10:08:21.651823286 +0100 -@@ -18,9 +18,10 @@ - use Encode; - use Fcntl ':mode'; - use File::Find qw(); --use File::Basename qw(basename); -+use File::Basename qw(basename dirname); - use Time::HiRes qw(gettimeofday tv_interval); - use Digest::MD5 qw(md5_hex); -+use File::Spec; # hack - - binmode STDOUT, ':utf8'; - -@@ -6644,6 +6645,20 @@ - print "\n\n"; # class="readme" - } - -+ # hack -+ if (!$prevent_xss) { -+ $file_name = "README.md"; -+ my $proj_head_hash = git_get_head_hash($project); -+ my $readme_blob_hash = git_get_hash_by_path($proj_head_hash, "README.md", "blob"); -+ -+ if ($readme_blob_hash) { # if README.md exists -+ print "