nixpkgs/pkgs/by-name/in/instead/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 b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

94 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
SDL2,
SDL2_ttf,
SDL2_image,
SDL2_mixer,
pkg-config,
lua,
zlib,
unzip,
}:
let
# I took several games at random from https://instead.syscall.ru/games/
games = [
(fetchurl {
url = "http://instead-games.googlecode.com/files/instead-apple-day-1.2.zip";
sha256 = "0d4m554hiqmgl4xl0jp0b3bqjl35879768hqznh9y57y04sygd2a";
})
(fetchurl {
url = "http://instead-games.googlecode.com/files/instead-cat_en-1.2.zip";
sha256 = "0jlm3ssqlka16dm0rg6qfjh6xdh3pv7lj2s4ib4mqwj2vfy0v6sg";
})
(fetchurl {
url = "http://instead-games.googlecode.com/files/instead-vinny-0.1.zip";
sha256 = "15qdbg82zp3a8vz4qxminr0xbzbdpnsciliy2wm3raz4hnadawg1";
})
(fetchurl {
url = "http://instead-games.googlecode.com/files/instead-toilet3in1-1.2.zip";
sha256 = "0wz4bljbg67m84qwpaqpzs934a5pcbhpgh39fvbbbfvnnlm4lirl";
})
(fetchurl {
url = "http://instead-games.googlecode.com/files/instead-kayleth-0.4.1.zip";
sha256 = "0xmn9inys0kbcdd02qaqp8gazqs67xq3fq7hvcy2qb9jbq85j8b2";
})
];
in
stdenv.mkDerivation rec {
pname = "instead";
version = "3.3.2";
src = fetchurl {
url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz";
sha256 = "u5j2kDKRvMQPsG8iA6uOBScuyE/e1BJIK2+qVL6jqQs=";
};
NIX_LDFLAGS = "-llua -lgcc_s";
nativeBuildInputs = [
pkg-config
unzip
];
buildInputs = [
SDL2
SDL2_ttf
SDL2_image
SDL2_mixer
lua
zlib
];
postPatch = ''
substituteInPlace configure.sh \
--replace "/tmp/sdl-test" $(mktemp)
'';
configurePhase = ''
{ echo 2; echo $out; } | ./configure.sh
'';
inherit games;
postInstall = ''
pushd $out/share/instead/games
for a in $games; do
unzip $a
done
popd
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Simple text adventure interpreter for Unix and Windows";
homepage = "https://instead.syscall.ru/";
license = lib.licenses.mit;
platforms = with lib.platforms; linux;
maintainers = with maintainers; [ pSub ];
};
}