mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
blobby: wrap to create the configs in $HOME without user actions
This commit is contained in:
parent
ea92304a6a
commit
f6c61ebe3d
10
pkgs/games/blobby/blobby.sh
Normal file
10
pkgs/games/blobby/blobby.sh
Normal file
@ -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
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user