{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; }; outputs = { self, nixpkgs }: let # The set of systems to provide outputs for allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; # A function that provides a system-specific Nixpkgs for the desired systems forAllSystems = f: nixpkgs.lib.genAttrs allSystems ( system: f { pkgs = import nixpkgs { inherit system; }; } ); in { packages = forAllSystems ( { pkgs }: { default = pkgs.buildGoModule (finalAttrs: { doCheck = false; pname = "jellyfin-exporter"; version = "1.3.8"; src = pkgs.fetchFromGitHub { owner = "rebelcore"; repo = "jellyfin_exporter"; tag = "v${finalAttrs.version}"; hash = "sha256-7fIrjcy6y/Ayj43WeuPNCx3uVJyl5Wf6bWs5ta2PpWc="; }; # Let Nix fetch Go modules and hash them automatically vendorHash = "sha256-JSOKDbefQyDLNy2y1oW7HUplQw8uhhOGZ+ueWyUYYQ0="; meta = { description = "Jellyfin exporter for Prometheus"; homepage = "https://github.com/rebelcore/jellyfin_exporter"; license = pkgs.lib.licenses.asl20; }; }); } ); }; }