uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,61 @@
|
|||
{ config, stdenv
|
||||
, callPackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, unzip
|
||||
, licenseAccepted ? config.sc2-headless.accept_license or false
|
||||
}:
|
||||
|
||||
if !licenseAccepted then throw ''
|
||||
You must accept the Blizzard® Starcraft® II AI and Machine Learning License at
|
||||
https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html
|
||||
by setting nixpkgs config option 'sc2-headless.accept_license = true;'
|
||||
''
|
||||
else assert licenseAccepted;
|
||||
let maps = callPackage ./maps.nix {};
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "4.7.1";
|
||||
pname = "sc2-headless";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://blzdistsc2-a.akamaihd.net/Linux/SC2.${version}.zip";
|
||||
sha256 = "0q1ry9bd3dm8y4hvh57yfq7s05hl2k2sxi2wsl6h0r3w690v1kdd";
|
||||
};
|
||||
|
||||
unpackCmd = ''
|
||||
unzip -P 'iagreetotheeula' $curSrc
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r . "$out"
|
||||
rm -r $out/Libs
|
||||
|
||||
cp -ur "${maps.minigames}"/* "${maps.melee}"/* "${maps.ladder2017season1}"/* "${maps.ladder2017season2}"/* "${maps.ladder2017season3}"/* \
|
||||
"${maps.ladder2017season4}"/* "${maps.ladder2018season1}"/* "${maps.ladder2018season2}"/* \
|
||||
"${maps.ladder2018season3}"/* "${maps.ladder2018season4}"/* "${maps.ladder2019season1}"/* "$out"/Maps/
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
find $out -type f -print0 | while IFS=''' read -d ''' -r file; do
|
||||
isELF "$file" || continue
|
||||
patchelf \
|
||||
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath ${lib.makeLibraryPath [stdenv.cc.cc stdenv.cc.libc]} \
|
||||
"$file"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.linux;
|
||||
description = "Starcraft II headless linux client for machine learning research";
|
||||
license = {
|
||||
fullName = "BLIZZARD® STARCRAFT® II AI AND MACHINE LEARNING LICENSE";
|
||||
url = "https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html";
|
||||
free = false;
|
||||
};
|
||||
maintainers = with lib.maintainers; [ danharaj ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
{ fetchzip
|
||||
}:
|
||||
let
|
||||
fetchzip' = args: (fetchzip args).overrideAttrs (old: { UNZIP = "-j -P iagreetotheeula"; });
|
||||
in
|
||||
{
|
||||
minigames = fetchzip {
|
||||
url = "https://github.com/deepmind/pysc2/releases/download/v1.2/mini_games.zip";
|
||||
sha256 = "19f873ilcdsf50g2v0s2zzmxil1bqncsk8nq99bzy87h0i7khkla";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
melee = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip";
|
||||
sha256 = "0z44pgy10jklsvgpr0kcn4c2mz3hw7nlcmvsy6a6lzpi3dvzf33i";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2017season1 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip";
|
||||
sha256 = "0ngg4g74s2ryhylny93fm8yq9rlrhphwnjg2s6f3qr85a2b3zdpd";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2017season2 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip";
|
||||
sha256 = "01kycnvqagql9pkjkcgngfcnry2pc4kcygdkk511m0qr34909za5";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2017season3 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3_Updated.zip";
|
||||
sha256 = "0wix3lwmbyxfgh8ldg0n66i21p0dbavk2dxjngz79rx708m8qvld";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2017season4 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season4.zip";
|
||||
sha256 = "1sidnmk2rc9j5fd3a4623pvaika1mm1rwhznb2qklsqsq1x2qckp";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2018season1 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2018Season1.zip";
|
||||
sha256 = "0mp0ilcq0gmd7ahahc5i8c7bdr3ivk6skx0b2cgb1z89l5d76irq";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2018season2 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2018Season2_Updated.zip";
|
||||
sha256 = "176rs848cx5src7qbr6dnn81bv1i86i381fidk3v81q9bxlmc2rv";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2018season3 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2018Season3.zip";
|
||||
sha256 = "1r3wv4w53g9zq6073ajgv74prbdsd1x3zfpyhv1kpxbffyr0x0zp";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2018season4 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2018Season4.zip";
|
||||
sha256 = "0k47rr6pzxbanlqnhliwywkvf0w04c8hxmbanksbz6aj5wpkcn1s";
|
||||
stripRoot = false;
|
||||
};
|
||||
ladder2019season1 = fetchzip' {
|
||||
url = "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2019Season1.zip";
|
||||
sha256 = "1dlk9zza8h70lbjvg2ykc5wr9vsvvdk02szwrkgdw26mkssl2rg9";
|
||||
stripRoot = false;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue