X-Git-Url: https://gitweb.ps.run/flakes/blobdiff_plain/bb30494380a9fb306459b75137ddb0973c56c4db..1998b16ee96c2f01e072f375e2d4e5ae528302ed:/flake.nix diff --git a/flake.nix b/flake.nix index 5f7f678..9b31d83 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,42 +11,53 @@ postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"''; }); }; + gitweb = final: prev: { + gitweb = prev.gitweb.overrideAttrs (oldAttrs: { + postPatch = (oldAttrs.postPatch or "") + '' + ls -l gitweb/gitweb.perl + ls -l . ./* + cp ${./patches/gitweb.perl} gitweb/gitweb.perl + exit 1 + ''; + }); + }; }; - } ++ - 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="; - }; + inherit (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="; + }; - buildInputs = with pkgs; [ - autoconf automake pkg-config libusb1 shadow - ]; + buildInputs = with pkgs; [ + autoconf automake pkg-config libusb1 shadow + ]; - buildPhase = '' - autoreconf -i . - ./configure --disable-gui --prefix=$out - make - ''; + buildPhase = '' + autoreconf -i . + ./configure --disable-gui --prefix=$out + make + ''; - installPhase = '' - mkdir -p $out/bin - cp resetmsmice $out/bin/ - ''; - }; + installPhase = '' + mkdir -p $out/bin + cp resetmsmice $out/bin/ + ''; + }; - apps.resetmsmice = { - type = "app"; - program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice"; - }; - }); + apps.resetmsmice = { + type = "app"; + program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice"; + }; + }) + ) packages apps; + }; }