sc2-headless: add pysc2 minigame map pack

This commit is contained in:
Dan Haraj 2017-11-14 14:34:06 -05:00
parent ced67b114a
commit bdce7d3a04
2 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,5 @@
{ stdenv { stdenv
, callPackage
, lib , lib
, fetchurl , fetchurl
, unzip , unzip
@ -11,7 +12,8 @@ if !licenseAccepted then throw ''
by setting nixpkgs config option 'sc2-headless.accept_license = true;' by setting nixpkgs config option 'sc2-headless.accept_license = true;'
'' ''
else assert licenseAccepted; else assert licenseAccepted;
stdenv.mkDerivation rec { let maps = callPackage ./maps.nix {};
in stdenv.mkDerivation rec {
version = "3.17"; version = "3.17";
name = "sc2-headless-${version}"; name = "sc2-headless-${version}";
@ -30,6 +32,8 @@ stdenv.mkDerivation rec {
mkdir -p $out mkdir -p $out
cp -r . "$out" cp -r . "$out"
rm -r $out/Libs rm -r $out/Libs
cp -r "${maps.minigames}"/* "$out"/Maps/
''; '';
preFixup = '' preFixup = ''
@ -50,5 +54,6 @@ stdenv.mkDerivation rec {
url = "https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html"; url = "https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html";
free = false; free = false;
}; };
maintainers = with lib.maintainers; [ danharaj ];
}; };
} }

View File

@ -0,0 +1,11 @@
{ fetchzip
}:
{
minigames = fetchzip {
url = "https://github.com/deepmind/pysc2/releases/download/v1.2/mini_games.zip";
sha256 = "19f873ilcdsf50g2v0s2zzmxil1bqncsk8nq99bzy87h0i7khkla";
stripRoot = false;
};
}