aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs')
-rw-r--r--srcds-pkgs/fetchdepotcache.nix29
-rw-r--r--srcds-pkgs/mkdepot.nix6
2 files changed, 26 insertions, 9 deletions
diff --git a/srcds-pkgs/fetchdepotcache.nix b/srcds-pkgs/fetchdepotcache.nix
index 6546126..ab3b486 100644
--- a/srcds-pkgs/fetchdepotcache.nix
+++ b/srcds-pkgs/fetchdepotcache.nix
@@ -11,17 +11,30 @@ runCommand "depotcache-${manifest}" {
outputHashMode = "recursive";
outputHashAlgo = null;
outputHash = hash;
- passthru = { inherit app depot manifest; };
+ passthru = {
+ inherit app depot manifest;
+ depotdownloader = { inherit (depotdownloader) version; };
+ };
} ''
mkdir -p $out
export HOME=$out
cd $out
- DepotDownloader \
- -app ${app'} \
- -depot ${depot'} \
- -manifest ${manifest} \
- -filelist /dev/null \
- -dir .
-
+
+ ${if lib.versionAtLeast depotdownloader.version "3.1.0" then ''
+ DepotDownloader \
+ -app ${app'} \
+ -depot ${depot'} \
+ -manifest ${manifest} \
+ -manifest-only \
+ -dir .
+ '' else ''
+ DepotDownloader \
+ -app ${app'} \
+ -depot ${depot'} \
+ -manifest ${manifest} \
+ -filelist /dev/null \
+ -dir .
+ ''}
+
rm -rf .local
''
diff --git a/srcds-pkgs/mkdepot.nix b/srcds-pkgs/mkdepot.nix
index 26d364b..f9b0f54 100644
--- a/srcds-pkgs/mkdepot.nix
+++ b/srcds-pkgs/mkdepot.nix
@@ -13,7 +13,11 @@ let
ln -s '${drv}' $out/'${FileName}'
'';
emitManifest = cache: with cache.passthru; let
- json = "${cache}/.DepotDownloader/${toString depot}_${manifest}.json";
+ sillyPathComponent = if lib.versionAtLeast depotdownloader.version "3.1.0" then
+ "manifest_"
+ else
+ ".DepotDownloader/";
+ json = "${cache}/${sillyPathComponent}${toString depot}_${manifest}.json";
mkStep = file: emitStep (file // { inherit cache; });
in concatMapStrings mkStep (importJSON json).Files;
in runCommand name {} ''