|
3 | 3 |
|
4 | 4 | inputs = { |
5 | 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; |
| 6 | + # Separate, fresh nixpkgs pin used only to build reviewfixer, which |
| 7 | + # requires Go >= 1.26.2 (newer than the main pin currently provides). |
| 8 | + nixpkgs-go.url = "github:NixOS/nixpkgs/nixos-unstable"; |
6 | 9 | flake-utils.url = "github:numtide/flake-utils"; |
7 | 10 | treefmt-nix.url = "github:numtide/treefmt-nix"; |
8 | 11 | }; |
9 | 12 |
|
10 | | - outputs = { self, nixpkgs, flake-utils, treefmt-nix, ... }: |
| 13 | + outputs = { self, nixpkgs, nixpkgs-go, flake-utils, treefmt-nix, ... }: |
11 | 14 | flake-utils.lib.eachDefaultSystem (system: |
12 | 15 | let |
13 | 16 | pkgs = import nixpkgs { |
|
18 | 21 | ]; |
19 | 22 | }; |
20 | 23 |
|
| 24 | + pkgsGo = import nixpkgs-go { inherit system; }; |
| 25 | + |
| 26 | + reviewfixer = pkgsGo.buildGoModule rec { |
| 27 | + pname = "reviewfixer"; |
| 28 | + version = "0.1.0-beta.0"; |
| 29 | + |
| 30 | + src = pkgsGo.fetchFromGitHub { |
| 31 | + owner = "ThomasK33"; |
| 32 | + repo = "reviewfixer"; |
| 33 | + rev = "v${version}"; |
| 34 | + hash = "sha256-hrnSm7ttpyUAtkre9micI2n9smKgzX5AmUcj3bJQjbU="; |
| 35 | + }; |
| 36 | + |
| 37 | + vendorHash = "sha256-yIWbmHFxmOeXBm5TMRsupy33DC6VAUYvZNSz5wa1yxA="; |
| 38 | + |
| 39 | + # Upstream tests shell out to `git`, which isn't available in the |
| 40 | + # Nix build sandbox. Skip the test phase here. |
| 41 | + doCheck = false; |
| 42 | + |
| 43 | + meta = with pkgsGo.lib; { |
| 44 | + description = "Local harness for working through review feedback on Graphite-managed stacked PRs"; |
| 45 | + homepage = "https://github.com/ThomasK33/reviewfixer"; |
| 46 | + license = licenses.mit; |
| 47 | + mainProgram = "reviewfixer"; |
| 48 | + }; |
| 49 | + }; |
| 50 | + |
21 | 51 | treefmt = treefmt-nix.lib.evalModule pkgs { |
22 | 52 | projectRootFile = "flake.nix"; |
23 | 53 | programs = { |
|
56 | 86 | websocat |
57 | 87 | jq |
58 | 88 | fzf |
| 89 | + reviewfixer |
59 | 90 | # claude-code |
60 | 91 | ]; |
61 | 92 | in |
|
0 commit comments