{ description = "Twitter follower counts in Prometheus."; inputs.utils.url = "github:numtide/flake-utils"; inputs.devshell = { url = "github:numtide/devshell"; inputs.utils.follows = "utils"; }; outputs = { self, nixpkgs, utils, devshell, }: utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [devshell.overlay]; }; in rec { packages.default = pkgs.buildGoModule { name = "twitter-prometheus"; src = self; vendorSha256 = "PNOP2y6MYKYyD8QcvulenSj/iUb8/otoByfmtSBNc8E="; # Inject the git version if you want #ldflags = '' # -X main.version=${if self ? rev then self.rev else "dirty"} #''; }; apps.default = utils.lib.mkApp {drv = packages.default;}; devShells.default = pkgs.devshell.mkShell {packages = with pkgs; [go gopls];}; formatter = pkgs.alejandra; }); }