mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
Merge pull request #303710 from merspieler/4d-minesweeper
4d-minesweeper: Init at 2.0
This commit is contained in:
commit
e55f20ad0f
89
pkgs/by-name/4d/4d-minesweeper/package.nix
Normal file
89
pkgs/by-name/4d/4d-minesweeper/package.nix
Normal file
@ -0,0 +1,89 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, unzip
|
||||
, alsa-lib
|
||||
, gcc-unwrapped
|
||||
, git
|
||||
, godot3-export-templates
|
||||
, godot3-headless
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXcursor
|
||||
, libXext
|
||||
, libXfixes
|
||||
, libXi
|
||||
, libXinerama
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libglvnd
|
||||
, libpulseaudio
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "4d-minesweeper";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gapophustu";
|
||||
repo = "4D-Minesweeper";
|
||||
rev = "db176d8aa5981a597bbae6a1a74aeebf0f376df4";
|
||||
sha256 = "sha256-A5QKqCo9TTdzmK13WRSAfkrkeUqHc4yQCzy4ZZ9uX2M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
godot3-headless
|
||||
unzip
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
gcc-unwrapped.lib
|
||||
git
|
||||
libGLU
|
||||
libX11
|
||||
libXcursor
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
libglvnd
|
||||
libpulseaudio
|
||||
zlib
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Cannot create file '/homeless-shelter/.config/godot/projects/...'
|
||||
export HOME=$TMPDIR
|
||||
|
||||
# Link the export-templates to the expected location. The --export commands
|
||||
# expects the template-file at .../templates/3.2.3.stable/linux_x11_64_release
|
||||
# with 3.2.3 being the version of godot.
|
||||
mkdir -p $HOME/.local/share/godot
|
||||
ln -s ${godot3-export-templates}/share/godot/templates $HOME/.local/share/godot
|
||||
|
||||
mkdir -p $out/bin/
|
||||
cd source/
|
||||
godot3-headless --export "Linux/X11" $out/bin/4d-minesweeper
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
dontInstall = true;
|
||||
dontFixup = true;
|
||||
dontStrip = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/gapophustu/4D-Minesweeper";
|
||||
description = "A 4D Minesweeper game written in Godot";
|
||||
license = licenses.mpl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ nayala ];
|
||||
mainProgram = "4d-minesweeper";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user