From 56449e59d7aabd1c06fb67a51a1e129b55cb9270 Mon Sep 17 00:00:00 2001 From: yuuko Date: Thu, 29 Aug 2024 21:51:04 -0700 Subject: break out of system config --- srcds-pkgs/fetchdepotcache.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 srcds-pkgs/fetchdepotcache.nix (limited to 'srcds-pkgs/fetchdepotcache.nix') 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 +'' -- cgit v1.2.3