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

Add Spacechem as an humblebundle game #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
SpaceChem: soem fixups
layus committed Sep 30, 2019
commit dcea987124f3c11c5283e79c755f02291660d70e
19 changes: 11 additions & 8 deletions pkgs/games/humblebundle/spacechem.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ stdenv, lib, fetchHumbleBundle, buildGame
, SDL, SDL_mixer, SDL_image, SDL_net, SDL_gfx, SDL_ttf, smpeg
, mono4, sqlite, coreutils, makeWrapper}:
{ buildGame, fetchHumbleBundle, lib

, SDL, SDL_gfx, SDL_image, SDL_mixer, SDL_net, SDL_ttf
, coreutils, makeWrapper, mono4, smpeg, sqlite, xclip
}:

with lib;

@@ -10,16 +12,15 @@ buildGame rec {
src = fetchHumbleBundle {
name = "SpaceChem_Linux_v1013_FIXED.zip";
machineName = "spacechem_android_pc_soundtrack_linux";
downloadName = "download";
downloadName = "Download";
md5 = "c290e8631ae3380b7e70362501a5adb6";
};

sandbox.paths.required = [
"$XDG_DATA_HOME/Zachtronics Industries/SpaceChem"
"$XDG_CONFIG_HOME/pulse"
];

buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];

postPatch = let
dllmap = {
@@ -64,10 +65,12 @@ buildGame rec {
'';

# coreutils because Tao.OpenGL relies on uname for platform detection
# xclip because SpaceChem relies on it for import/export of challenges
postInstall = ''
makeWrapper ${mono4}/bin/mono $out/bin/spacechem \
--prefix PATH : ${coreutils}/bin \
--run "cd $out/lib/SpaceChem" \
--prefix PATH : ${coreutils}/bin \
--prefix PATH : ${xclip}/bin \
--run "cd $out/lib/SpaceChem" \
--add-flags $out/lib/SpaceChem/SpaceChem.exe
'';
}