{ inputs = { nixpkgs.url = "nixpkgs/nixos-26.05"; flakelight = { url = "github:nix-community/flakelight"; inputs.nixpkgs.follows = "nixpkgs"; }; steam-fetcher = { url = "github:nix-community/steam-fetcher"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { flakelight, steam-fetcher, ... }: let inherit (builtins) listToAttrs map; inheritPkgs = names: listToAttrs (map (name: { inherit name; value = {pkgs, ...}: pkgs.${name}; }) names); in flakelight ./. { nixpkgs.config = {allowUnfree = true;}; systems = ["x86_64-linux" "i686-linux"]; withOverlays = [ steam-fetcher.overlay (import ./nix/overlay.nix) ]; formatters = pkgs: with pkgs; { "*.nix" = pkgs.lib.getExe alejandra; }; perSystem = pkgs: { sourcemods = pkgs.lib.mapAttrs (name: sdk: pkgs.sourcemod.override {sdks = {${name} = sdk;};}) pkgs.hl2sdk; metamods = pkgs.lib.mapAttrs (name: sdk: pkgs.metamod-source.override {sdks = {${name} = sdk;};}) pkgs.hl2sdk; }; packages = inheritPkgs ["ambuild" "sourcepawn" "sourcemod-includes" "sourcemod-include-library" "srcds-tf2"]; checks = { buildTestScript = {pkgs, ...}: pkgs.buildSourcePawnScript { name = "test"; src = pkgs.fetchurl { url = "https://codeberg.org/spire/nocheats/raw/commit/5e0e21c241fdf8907d83d9bcf3cce37711b83d14/plugin/nocheats.sp"; sha256 = "sha256-Z3RJhuc9c8YQTo9gnLTBrqL4JpADZgDttrJVyE/MWdM="; }; }; }; }; }