]> gitweb.ps.run Git - flakes/blobdiff - flake.nix
add gitweb overlay
[flakes] / flake.nix
index 33324e4748cf782ee2a6fe61486d80b1ce2e43cc..53cc18d642a49f1186bae566380b74798fc39bcd 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -4,19 +4,22 @@
   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
   inputs.flake-utils.url = "github:numtide/flake-utils";
 
-  outputs = { self, nixpkgs, flake-utils }:
-    flake-utils.lib.eachDefaultSystem (system:
+  outputs = { self, nixpkgs, flake-utils }: {
+    overlays = {
+      cgit = final: prev: {
+        cgit = prev.cgit.overrideAttrs (oldAttrs: {
+          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
         pkgs = import nixpkgs { inherit system; };
       in {
-        overlays = {
-          cgit = final: prev: {
-            cgit = prev.cgit.overrideAttrs (oldAttrs: {
-              postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"'';
-            });
-          };
-        }
-
         packages.resetmsmice = pkgs.stdenv.mkDerivation {
           pname = "resetmsmice";
           version = "0.0.0";
@@ -47,6 +50,8 @@
           type = "app";
           program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice";
         };
-      });
+      })
+    ) packages apps;
+  };
 }