]> gitweb.ps.run Git - flakes/commitdiff
add overlay directly to outputs
authorpatrick-scho <patrick.schoenberger@posteo.de>
Thu, 3 Jul 2025 09:11:26 +0000 (11:11 +0200)
committerpatrick-scho <patrick.schoenberger@posteo.de>
Thu, 3 Jul 2025 09:11:26 +0000 (11:11 +0200)
flake.nix

index 40898d32a875b46062e08b8aa4be8ff1fd248219..5f7f6785a8442912aaa9672f26f5e60d5a8fca15 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -4,49 +4,49 @@
   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:
-      let
-        pkgs = import nixpkgs { inherit system; };
-      in {
-        overlays = {
-          cgit = final: prev: {
-            cgit = prev.cgit.overrideAttrs (oldAttrs: {
-              postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"'';
-            });
-          };
+  outputs = { self, nixpkgs, flake-utils }: {
+    overlays = {
+      cgit = final: prev: {
+        cgit = prev.cgit.overrideAttrs (oldAttrs: {
+          postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"'';
+        });
+      };
+    };
+  } ++
+  flake-utils.lib.eachDefaultSystem (system:
+    let
+      pkgs = import nixpkgs { inherit system; };
+    in {
+      packages.resetmsmice = pkgs.stdenv.mkDerivation {
+        pname = "resetmsmice";
+        version = "0.0.0";
+        src = pkgs.fetchFromGitHub {
+          owner = "paulrichards321";
+          repo = "resetmsmice";
+          rev = "2623a46bcfdaab199b1fc080060d4e3f1c94ce86";
+          hash = "sha256-xRteJe7lAoyMrz13UIXCkg5dxhziT6e9Bn7+zYzt2j8=";
         };
 
-        packages.resetmsmice = pkgs.stdenv.mkDerivation {
-          pname = "resetmsmice";
-          version = "0.0.0";
-          src = pkgs.fetchFromGitHub {
-            owner = "paulrichards321";
-            repo = "resetmsmice";
-            rev = "2623a46bcfdaab199b1fc080060d4e3f1c94ce86";
-            hash = "sha256-xRteJe7lAoyMrz13UIXCkg5dxhziT6e9Bn7+zYzt2j8=";
-          };
-
-          buildInputs = with pkgs; [
-            autoconf automake pkg-config libusb1 shadow
-          ];
-
-          buildPhase = ''
-            autoreconf -i .
-            ./configure --disable-gui --prefix=$out
-            make
-          '';
-
-          installPhase = ''
-            mkdir -p $out/bin
-            cp resetmsmice $out/bin/
-          '';
-        };
-
-        apps.resetmsmice = {
-          type = "app";
-          program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice";
-        };
-      });
+        buildInputs = with pkgs; [
+          autoconf automake pkg-config libusb1 shadow
+        ];
+
+        buildPhase = ''
+          autoreconf -i .
+          ./configure --disable-gui --prefix=$out
+          make
+        '';
+
+        installPhase = ''
+          mkdir -p $out/bin
+          cp resetmsmice $out/bin/
+        '';
+      };
+
+      apps.resetmsmice = {
+        type = "app";
+        program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice";
+      };
+    });
 }