Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sc2-headless: init at 3.17 #30481

Merged
merged 1 commit into from Oct 16, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Oct 16, 2017

This packages up the Starcraft II headless Linux client provided by
Blizzard for machine learning research.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

else assert licenseAccepted;
stdenv.mkDerivation rec {
version = "3.17";
name = "SC2.${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like name = "sc2-headless-${version}"; better.

unzip -P 'iagreetotheeula' $curSrc
'';

buildInputs = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make that a one liner

];

installPhase = ''
shopt -s dotglob
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about cp -r . "$out"?


preFixup = ''
find $out -type f -print0 | while IFS=''' read -d ''' -r file; do
isELF "$file" || continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

unzip -P 'iagreetotheeula' $curSrc
'';

buildInputs = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be nativeBuildInputs

This packages up the Starcraft II headless Linux client provided by
Blizzard for machine learning research.
@Ericson2314 Ericson2314 merged commit 155b163 into NixOS:master Oct 16, 2017
@Ericson2314 Ericson2314 deleted the sc2-headless branch October 16, 2017 20:55
, licenseAccepted ? false
}:

if !licenseAccepted then throw ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant