diff options
author | yuuko <yuuko@partyvan.io> | 2024-08-29 21:51:04 -0700 |
---|---|---|
committer | yuuko <yuuko@partyvan.io> | 2024-08-29 21:51:04 -0700 |
commit | 56449e59d7aabd1c06fb67a51a1e129b55cb9270 (patch) | |
tree | 19f3faf805e9b6461a5940d1a050d13e5271ef55 /srcds-pkgs/fetchdepotcache.nix |
break out of system config
Diffstat (limited to 'srcds-pkgs/fetchdepotcache.nix')
-rw-r--r-- | srcds-pkgs/fetchdepotcache.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/srcds-pkgs/fetchdepotcache.nix b/srcds-pkgs/fetchdepotcache.nix new file mode 100644 index 0000000..6546126 --- /dev/null +++ b/srcds-pkgs/fetchdepotcache.nix @@ -0,0 +1,27 @@ +{ lib, runCommand +, depotdownloader, cacert +}: +{ app, depot, manifest, hash }: +let + app' = builtins.toString app; + depot' = builtins.toString depot; +in +runCommand "depotcache-${manifest}" { + nativeBuildInputs = [ depotdownloader cacert ]; + outputHashMode = "recursive"; + outputHashAlgo = null; + outputHash = hash; + passthru = { inherit app depot manifest; }; +} '' + mkdir -p $out + export HOME=$out + cd $out + DepotDownloader \ + -app ${app'} \ + -depot ${depot'} \ + -manifest ${manifest} \ + -filelist /dev/null \ + -dir . + + rm -rf .local +'' |