nixpkgs/pkgs/by-name/_4/_4d-minesweeper/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

91 lines
1.7 KiB
Nix

{
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";
hash = "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 = "4D Minesweeper game written in Godot";
license = licenses.mpl20;
platforms = platforms.linux;
maintainers = [ ];
mainProgram = "4d-minesweeper";
};
}