{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; systems.url = "github:nix-systems/default"; }; outputs = { self, nixpkgs, systems, }: let eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f (import nixpkgs {inherit system;})); in { packages = eachSystem (pkgs: rec { default = pve-exporter; pve-exporter = pkgs.buildGoModule { pname = "pve-exporter"; version = self.shortRev or self.dirtyShortRev or "dev"; src = ./.; vendorHash = "sha256-VC80sdNcahVbxUffNNntlXWOg+ZDalck61d6tL9aWsM="; env.CGO_ENABLED = 0; ldflags = ["-s" "-w"]; doCheck = true; meta = { description = "Prometheus exporter for Proxmox VE"; mainProgram = "pve-exporter"; }; }; }); devShells = eachSystem (pkgs: { default = pkgs.mkShell { packages = with pkgs; [ go_latest gopls gotools ]; }; }); }; }