diff --git a/nix/srcds/default.nix b/nix/srcds/default.nix index a437a98..56d5508 100644 --- a/nix/srcds/default.nix +++ b/nix/srcds/default.nix @@ -12,9 +12,9 @@ system, callPackage, srcds-tf2, - sourcemod, + depots, }: let - inherit (lib) importJSON map toString elem last replaceStrings naturalSort; + inherit (lib) importJSON map toString elem last replaceStrings naturalSort filter any; depotInputs = importJSON ./depots.json; fetchSupported = elem system depotdownloader.meta.platforms; fetcher = input: @@ -47,7 +47,9 @@ exit 1 ''; }; - allDepots = map fetcher depotInputs; + manifestUsed = manifest: any (depot: manifest.app_id == depot.app_id && manifest.depot_id == depot.depot_id) depots; + usedManifests = filter manifestUsed depotInputs; + allDepots = map fetcher usedManifests; src = symlinkJoin { name = "srcds-tf2-src"; paths = allDepots; diff --git a/nix/srcds/overlay.nix b/nix/srcds/overlay.nix index 700a41d..fd2a10b 100644 --- a/nix/srcds/overlay.nix +++ b/nix/srcds/overlay.nix @@ -2,7 +2,18 @@ final: prev: let inherit (prev.lib) toString importJSON listToAttrs map; depotInputs = importJSON ./depots.json; in { - srcds-tf2 = final.callPackage ./default.nix {}; + srcds-tf2 = final.callPackage ./default.nix { + depots = [ + { + app_id = 232250; + depot_id = 232256; + } + { + app_id = 232250; + depot_id = 232250; + } + ]; + }; steam-depots = listToAttrs (map (depot: { name = "steam-depot-${toString depot.app_id}-${toString depot.depot_id}"; value = final.callPackage ./depot.nix {