diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2016-10-31 18:36:53 +0100 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2016-10-31 18:37:57 +0100 |
commit | f6c61ebe3d2750e84deb589e18d26561b5d82012 (patch) | |
tree | 3fecccd791b76065fa509c156145622a2426f183 /pkgs/games/blobby | |
parent | ea92304a6af9ca5cb2990d1ec9775c3d96113d2e (diff) |
blobby: wrap to create the configs in $HOME without user actions
Diffstat (limited to 'pkgs/games/blobby')
-rw-r--r-- | pkgs/games/blobby/blobby.sh | 10 | ||||
-rw-r--r-- | pkgs/games/blobby/default.nix | 14 |
2 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/games/blobby/blobby.sh b/pkgs/games/blobby/blobby.sh new file mode 100644 index 000000000000..4c4b32b12433 --- /dev/null +++ b/pkgs/games/blobby/blobby.sh @@ -0,0 +1,10 @@ +#! @shell@ + +test -d ~/.blobby || { + mkdir ~/.blobby + cp -r "@out@/share/blobby"/* ~/.blobby + chmod u+w -R ~/.blobby + ( cd ~/.blobby; for i in *.zip; do @unzip@/bin/unzip "$i"; done ) +} + +@out@/bin/blobby.bin diff --git a/pkgs/games/blobby/default.nix b/pkgs/games/blobby/default.nix index c577d65a559c..03cd2e7ca263 100644 --- a/pkgs/games/blobby/default.nix +++ b/pkgs/games/blobby/default.nix @@ -1,5 +1,5 @@ {stdenv, fetchurl, SDL2, SDL2_image, mesa, cmake, physfs, boost, zip, zlib -, pkgconfig}: +, pkgconfig, unzip}: stdenv.mkDerivation rec { version = "1.0"; name = "blobby-volley-${version}"; @@ -9,12 +9,22 @@ stdenv.mkDerivation rec { sha256 = "1qpmbdlyhfbrdsq4vkb6cb3b8mh27fpizb71q4a21ala56g08yms"; }; - buildInputs = [SDL2 SDL2_image mesa cmake physfs boost zip zlib pkgconfig]; + buildInputs = [SDL2 SDL2_image mesa cmake physfs boost zip zlib pkgconfig + unzip]; preConfigure='' sed -e '1i#include <iostream>' -i src/NetworkMessage.cpp ''; + inherit unzip; + + postInstall = '' + cp ../data/Icon.bmp "$out/share/blobby/" + mv "$out/bin"/blobby{,.bin} + substituteAll "${./blobby.sh}" "$out/bin/blobby" + chmod a+x "$out/bin/blobby" + ''; + meta = { description = ''A blobby volleyball game''; license = stdenv.lib.licenses.bsd3; |