]> gitweb.ps.run Git - flakes/blob - flake.nix
remove gitweb overlay
[flakes] / flake.nix
1 {
2   description = "my flakes";
3
4   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5   inputs.flake-utils.url = "github:numtide/flake-utils";
6
7   outputs = { self, nixpkgs, flake-utils }: {
8     overlays = {
9       cgit = final: prev: {
10         cgit = prev.cgit.overrideAttrs (oldAttrs: {
11           postPatch = ''substituteInPlace ui-repolist.c --replace "master" "main"'';
12         });
13       };
14     };
15     inherit (flake-utils.lib.eachDefaultSystem (system:
16       let
17         pkgs = import nixpkgs { inherit system; };
18       in {
19         packages.resetmsmice = pkgs.stdenv.mkDerivation {
20           pname = "resetmsmice";
21           version = "0.0.0";
22           src = pkgs.fetchFromGitHub {
23             owner = "paulrichards321";
24             repo = "resetmsmice";
25             rev = "2623a46bcfdaab199b1fc080060d4e3f1c94ce86";
26             hash = "sha256-xRteJe7lAoyMrz13UIXCkg5dxhziT6e9Bn7+zYzt2j8=";
27           };
28
29           buildInputs = with pkgs; [
30             autoconf automake pkg-config libusb1 shadow
31           ];
32
33           buildPhase = ''
34             autoreconf -i .
35             ./configure --disable-gui --prefix=$out
36             make
37           '';
38
39           installPhase = ''
40             mkdir -p $out/bin
41             cp resetmsmice $out/bin/
42           '';
43         };
44
45         apps.resetmsmice = {
46           type = "app";
47           program = "${self.packages.${system}.resetmsmice}/bin/resetmsmice";
48         };
49       })
50     ) packages apps;
51   };
52 }
53