mirror of
https://codeberg.org/spire/nix.git
synced 2026-08-02 12:25:00 +02:00
make srcds derivation configurable
This commit is contained in:
parent
d460addced
commit
b848ca3bc9
2 changed files with 17 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue