uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

26
pkgs/games/0ad/data.nix Normal file
View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl, zeroad-unwrapped }:
stdenv.mkDerivation rec {
pname = "0ad-data";
inherit (zeroad-unwrapped) version;
src = fetchurl {
url = "http://releases.wildfiregames.com/0ad-${version}-alpha-unix-data.tar.xz";
sha256 = "1c9zrddmjxvvacismld6fbwbw9vrdbq6g6d3424p8w5p6xg5wlwy";
};
installPhase = ''
rm binaries/data/tools/fontbuilder/fonts/*.txt
mkdir -p $out/share/0ad
cp -r binaries/data $out/share/0ad/
'';
meta = with lib; {
description = "A free, open-source game of ancient warfare -- data files";
homepage = "https://play0ad.com/";
license = licenses.cc-by-sa-30;
maintainers = with maintainers; [ chvp ];
platforms = platforms.linux;
hydraPlatforms = [];
};
}

View file

@ -0,0 +1,14 @@
{ wxGTK, stdenv, newScope }:
let
callPackage = newScope self;
self = {
zeroad-unwrapped = callPackage ./game.nix { inherit wxGTK stdenv; };
zeroad-data = callPackage ./data.nix { inherit stdenv; };
zeroad = callPackage ./wrapper.nix { };
};
in
self

107
pkgs/games/0ad/game.nix Normal file
View file

@ -0,0 +1,107 @@
{ stdenv, lib, perl, fetchurl, python3, fmt, libidn
, pkg-config, spidermonkey_78, boost, icu, libxml2, libpng, libsodium
, libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc
, openal, libGLU, libGL, xorgproto, libX11, libXcursor, nspr, SDL2
, gloox, nvidia-texture-tools
, withEditor ? true, wxGTK
}:
# You can find more instructions on how to build 0ad here:
# https://trac.wildfiregames.com/wiki/BuildInstructions
let
# the game requires a special version 78.6.0 of spidermonkey, otherwise
# we get compilation errors. We override the src attribute of spidermonkey_78
# in order to reuse that declartion, while giving it a different source input.
spidermonkey_78_6 = spidermonkey_78.overrideAttrs(old: rec {
version = "78.6.0";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
sha256 = "0lyg65v380j8i2lrylwz8a5ya80822l8vcnlx3dfqpd3s6zzjsay";
};
patches = (old.patches or []) ++ [
./spidermonkey-cargo-toml.patch
];
});
in
stdenv.mkDerivation rec {
pname = "0ad";
version = "0.0.25b";
src = fetchurl {
url = "http://releases.wildfiregames.com/0ad-${version}-alpha-unix-build.tar.xz";
sha256 = "1p9fa8f7sjb9c5wl3mawzyfqvgr614kdkhrj2k4db9vkyisws3fp";
};
nativeBuildInputs = [ python3 perl pkg-config ];
buildInputs = [
spidermonkey_78_6 boost icu libxml2 libpng libjpeg
zlib curl libogg libvorbis enet miniupnpc openal libidn
libGLU libGL xorgproto libX11 libXcursor nspr SDL2 gloox
nvidia-texture-tools libsodium fmt
] ++ lib.optional withEditor wxGTK;
NIX_CFLAGS_COMPILE = toString [
"-I${xorgproto}/include/X11"
"-I${libX11.dev}/include/X11"
"-I${libXcursor.dev}/include/X11"
"-I${SDL2}/include/SDL2"
"-I${fmt.dev}/include"
];
patches = [ ./rootdir_env.patch ];
configurePhase = ''
# Delete shipped libraries which we don't need.
rm -rf libraries/source/{enet,miniupnpc,nvtt,spidermonkey}
# Update Makefiles
pushd build/workspaces
./update-workspaces.sh \
--with-system-nvtt \
--with-system-mozjs \
${lib.optionalString withEditor "--enable-atlas"} \
--bindir="$out"/bin \
--libdir="$out"/lib/0ad \
--without-tests \
-j $NIX_BUILD_CORES
popd
# Move to the build directory.
pushd build/workspaces/gcc
'';
enableParallelBuilding = true;
installPhase = ''
popd
# Copy executables.
install -Dm755 binaries/system/pyrogenesis "$out"/bin/0ad
${lib.optionalString withEditor ''
install -Dm755 binaries/system/ActorEditor "$out"/bin/ActorEditor
''}
# Copy l10n data.
install -Dm755 -t $out/share/0ad/data/l10n binaries/data/l10n/*
# Copy libraries.
install -Dm644 -t $out/lib/0ad binaries/system/*.so
# Copy icon.
install -D build/resources/0ad.png $out/share/icons/hicolor/128x128/0ad.png
install -D build/resources/0ad.desktop $out/share/applications/0ad.desktop
'';
meta = with lib; {
description = "A free, open-source game of ancient warfare";
homepage = "https://play0ad.com/";
license = with licenses; [
gpl2 lgpl21 mit cc-by-sa-30
licenses.zlib # otherwise masked by pkgs.zlib
];
maintainers = with maintainers; [ chvp ];
platforms = subtractLists platforms.i686 platforms.linux;
};
}

View file

@ -0,0 +1,39 @@
diff --git a/source/ps/GameSetup/Paths.cpp b/source/ps/GameSetup/Paths.cpp
index 474364e..bf084b4 100644
--- a/source/ps/GameSetup/Paths.cpp
+++ b/source/ps/GameSetup/Paths.cpp
@@ -155,32 +155,8 @@ Paths::Paths(const CmdLineArgs& args)
/*static*/ OsPath Paths::Root(const OsPath& argv0)
{
-#if OS_ANDROID
- return OsPath("/sdcard/0ad"); // TODO: this is kind of bogus
-#else
-
- // get full path to executable
- OsPath pathname = sys_ExecutablePathname(); // safe, but requires OS-specific implementation
- if(pathname.empty()) // failed, use argv[0] instead
- {
- errno = 0;
- pathname = wrealpath(argv0);
- if(pathname.empty())
- WARN_IF_ERR(StatusFromErrno());
- }
-
- // make sure it's valid
- if(!FileExists(pathname))
- {
- LOGERROR("Cannot find executable (expected at '%s')", pathname.string8());
- WARN_IF_ERR(StatusFromErrno());
- }
-
- for(size_t i = 0; i < 2; i++) // remove "system/name.exe"
- pathname = pathname.Parent();
- return pathname;
-
-#endif
+ UNUSED2(argv0);
+ return OsPath(getenv("ZEROAD_ROOTDIR"));
}
/*static*/ OsPath Paths::RootData(const OsPath& argv0)

View file

@ -0,0 +1,15 @@
diff --git a/Cargo.toml b/Cargo.toml
index 6f6199ab26..c3f92db9d8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -68,8 +68,8 @@ panic = "abort"
libudev-sys = { path = "dom/webauthn/libudev-sys" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="3541e3818fdc7c2a24f87e3459151a4ce955a67a" }
rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="d510da5999a744c563b0acd18056069d1698273f" }
-nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" }
-spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3", rev = "20191ad2f370afd6d247edcb9ff9da32d3bedb9c" }
+nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1" }
+spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3" }
# failure's backtrace feature might break our builds, see bug 1608157.
failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }
failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }

View file

@ -0,0 +1,24 @@
{ buildEnv, makeWrapper, zeroad-unwrapped, zeroad-data }:
assert zeroad-unwrapped.version == zeroad-data.version;
buildEnv {
name = "zeroad-${zeroad-unwrapped.version}";
nativeBuildInputs = [ makeWrapper ];
paths = [ zeroad-unwrapped zeroad-data ];
pathsToLink = [ "/" "/bin" ];
postBuild = ''
for i in $out/bin/*; do
wrapProgram "$i" \
--set ZEROAD_ROOTDIR "$out/share/0ad"
done
'';
meta = zeroad-unwrapped.meta // {
hydraPlatforms = [];
};
}

View file

@ -0,0 +1,42 @@
{ lib
, gccStdenv
, fetchFromGitHub
, autoreconfHook
, xorgproto
, libX11
, libXpm
}:
gccStdenv.mkDerivation rec {
pname = "0verkill";
version = "unstable-2011-01-13";
src = fetchFromGitHub {
owner = "hackndev";
repo = pname;
rev = "522f11a3e40670bbf85e0fada285141448167968";
sha256 = "WO7PN192HhcDl6iHIbVbH7MVMi1Tl2KyQbDa9DWRO6M=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ libX11 xorgproto libXpm ];
configureFlags = [ "--with-x" ];
preAutoreconf = ''
autoupdate
'';
# The code needs an update for gcc-10:
# https://github.com/hackndev/0verkill/issues/7
NIX_CFLAGS_COMPILE = "-fcommon";
hardeningDisable = [ "all" ]; # Someday the upstream will update the code...
meta = with lib; {
homepage = "https://github.com/hackndev/0verkill";
description = "ASCII-ART bloody 2D action deathmatch-like game";
license = with licenses; gpl2Only;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitLab, autoreconfHook, libsamplerate, SDL2, SDL2_mixer, readline }:
stdenv.mkDerivation rec {
pname = "1oom";
version = "1.0";
src = fetchFromGitLab {
owner = "KilgoreTroutMaskReplicant";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+HwSykSyAGHtITVOu4nIG87kWwVxGyFXb/NRSjhWlvs=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ libsamplerate SDL2 SDL2_mixer readline ];
outputs = [ "out" "doc" ];
postInstall = ''
install -d $doc/share/doc/${pname}
install -t $doc/share/doc/${pname} \
HACKING NEWS PHILOSOPHY README doc/*.txt
'';
meta = with lib; {
homepage = "https://kilgoretroutmaskreplicant.gitlab.io/plain-html/";
description = "Master of Orion (1993) game engine recreation";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.AndersonTorres ];
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }:
stdenv.mkDerivation rec {
pname = "2048-in-terminal";
version = "unstable-2021-09-12";
src = fetchFromGitHub {
sha256 = "1jgacyimn59kxqhrk8jp13qayc2mncxhx393spqcxbz0sj6lxq9p";
rev = "466abe827638598e40cb627d2b017fe8f76b3a14";
repo = "2048-in-terminal";
owner = "alewmoose";
};
# Fix pending upstream inclusion for ncurses-6.3 support:
# https://github.com/alewmoose/2048-in-terminal/pull/6
patches = [
(fetchpatch {
name = "ncurses-6.3.patch";
url = "https://github.com/alewmoose/2048-in-terminal/commit/b1c78dc4b3cca3a193b1afea1ab85a75966823cf.patch";
sha256 = "05ibpgr83r7zxsak2l0gaf33858bp0sp0mjfdpmcmw745z3jw7q1";
})
];
buildInputs = [ ncurses ];
nativeBuildInputs = [ pkg-config ];
enableParallelBuilding = true;
preInstall = ''
mkdir -p $out/bin
'';
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
inherit (src.meta) homepage;
description = "Animated console version of the 2048 game";
license = licenses.mit;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,46 @@
{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "20kly";
version = "1.5.0";
format = "other";
src = fetchFromGitHub {
owner = "20kly";
repo = "20kly";
rev = "v${version}";
sha256 = "1zxsxg49a02k7zidx3kgk2maa0vv0n1f9wrl5vch07sq3ghvpphx";
};
patchPhase = ''
substituteInPlace lightyears \
--replace \
"LIGHTYEARS_DIR = \".\"" \
"LIGHTYEARS_DIR = \"$out/share\""
'';
propagatedBuildInputs = with python3Packages; [
pygame
];
buildPhase = ''
python -O -m compileall .
'';
installPhase = ''
mkdir -p "$out/share"
cp -r data lib20k lightyears "$out/share"
install -Dm755 lightyears "$out/bin/lightyears"
'';
meta = with lib; {
description = "A steampunk-themed strategy game where you have to manage a steam supply network";
homepage = "http://jwhitham.org.uk/20kly/";
license = licenses.gpl2Only;
maintainers = with maintainers; [ fgaz ];
};
}

View file

@ -0,0 +1,76 @@
{ lib
, stdenv
, gccStdenv
, autoreconfHook
, pkg-config
, fetchurl
, fetchFromGitHub
, openal
, libtool
, enet
, SDL2
, curl
, gettext
, libiconv
}:
let
pname = "7kaa";
version = "2.15.4p1";
music = stdenv.mkDerivation {
pname = "7kaa-music";
version = lib.versions.majorMinor version;
src = fetchurl {
url = "https://www.7kfans.com/downloads/7kaa-music-${lib.versions.majorMinor version}.tar.bz2";
sha256 = "sha256-sNdntuJXGaFPXzSpN0SoAi17wkr2YnW+5U38eIaVwcM=";
};
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
meta.license = lib.licenses.unfree;
};
in
gccStdenv.mkDerivation rec {
inherit pname version;
src = fetchFromGitHub {
owner = "the3dfxdude";
repo = pname;
rev = "9db2a43e1baee25a44b7aa7e9cedde9a107ed34b";
sha256 = "sha256-OAKaRuPP0/n8pO3wIUvGKs6n+U+EmZXUTywXYDAan1o=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ openal enet SDL2 curl gettext libiconv ];
preAutoreconf = ''
autoupdate
'';
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
postInstall = ''
mkdir $out/share/7kaa/MUSIC
cp -R ${music}/MUSIC $out/share/7kaa/
cp ${music}/COPYING-Music.txt $out/share/7kaa/MUSIC
cp ${music}/COPYING-Music.txt $out/share/doc/7kaa
'';
# Multiplayer is auto-disabled for non-x86 system
meta = with lib; {
homepage = "https://www.7kfans.com";
description = "GPL release of the Seven Kingdoms with multiplayer (available only on x86 platforms)";
license = licenses.gpl2Only;
platforms = platforms.x86_64 ++ platforms.aarch64;
maintainers = with maintainers; [ _1000101 ];
};
}

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchurl, love, lua, makeWrapper, makeDesktopItem }:
let
pname = "90secondportraits";
version = "1.01b";
icon = fetchurl {
url = "http://tangramgames.dk/img/thumb/90secondportraits.png";
sha256 = "13k6cq8s7jw77j81xfa5ri41445m778q6iqbfplhwdpja03c6faw";
};
desktopItem = makeDesktopItem {
name = "90secondportraits";
exec = pname;
icon = icon;
comment = "A silly speed painting game";
desktopName = "90 Second Portraits";
genericName = "90secondportraits";
categories = [ "Game" ];
};
in
stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/SimonLarsen/90-Second-Portraits/releases/download/${version}/${pname}-${version}.love";
sha256 = "0jj3k953r6vb02212gqcgqpb4ima87gnqgls43jmylxq2mcm33h5";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ lua love ];
dontUnpack = true;
installPhase =
''
mkdir -p $out/bin
mkdir -p $out/share/games/lovegames
cp -v $src $out/share/games/lovegames/${pname}.love
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
chmod +x $out/bin/${pname}
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
'';
meta = with lib; {
description = "A silly speed painting game";
maintainers = with maintainers; [ leenaars ];
platforms = platforms.linux;
license = licenses.free;
downloadPage = "http://tangramgames.dk/games/90secondportraits";
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchFromGitHub, SDL2, SDL2_image, SDL2_mixer }:
stdenv.mkDerivation rec {
pname = "abbaye-des-morts";
version = "2.0.1";
src = fetchFromGitHub {
owner = "nevat";
repo = "abbayedesmorts-gpl";
rev = "v${version}";
sha256 = "1pwqf7r9bqb2p3xrw9i7y8pgr1401fy3mnnqpb1qkhmdl3gqi9hb";
};
buildInputs = [ SDL2 SDL2_image SDL2_mixer ];
makeFlags = [ "PREFIX=$(out)" "DESTDIR=" ];
preBuild = lib.optionalString stdenv.cc.isClang
''
substituteInPlace Makefile \
--replace -fpredictive-commoning ""
'';
preInstall = ''
mkdir -p $out/bin
mkdir -p $out/share/applications
'';
meta = with lib; {
homepage = "https://locomalito.com/abbaye_des_morts.php";
description = "A retro arcade video game";
license = licenses.gpl3;
maintainers = [ maintainers.marius851000 ];
};
}

18
pkgs/games/abuse/abuse.sh Normal file
View file

@ -0,0 +1,18 @@
#! @shell@
if grep datadir ~/.abuse/abuserc &>/dev/null; then
if [ ! -d "$(grep datadir ~/.abuse/abuserc | cut -d= -f2)" ]; then
echo "Warning: ~/.abuse/abuserc references a datadir which is not existent." >&2
echo "Try removing ~/.abuse/abuserc, else abuse will most likely not run." >&2
echo >&2
# This can happen if the build hash of abuse changes and the older version
# is garbage-collected. The correct path of the datadir is compiled into
# the binary, but unfortunately abuse writes out the path into abuserc on
# first start. This entry may later become stale.
fi
fi
# The timidity bundled into SDL_mixer looks in . and in several global places
# like /etc for its configuration file.
cd @out@/etc
exec @out@/bin/.abuse-bin "$@"

View file

@ -0,0 +1,54 @@
{ lib, stdenv, fetchurl, makeDesktopItem, copyDesktopItems, SDL, SDL_mixer, freepats }:
stdenv.mkDerivation rec {
pname = "abuse";
version = "0.8";
src = fetchurl {
url = "http://abuse.zoy.org/raw-attachment/wiki/download/${pname}-${version}.tar.gz";
sha256 = "0104db5fd2695c9518583783f7aaa7e5c0355e27c5a803840a05aef97f9d3488";
};
configureFlags = [
"--with-x"
"--with-assetdir=$(out)/orig"
# The "--enable-debug" is to work around a segfault on start, see https://bugs.archlinux.org/task/52915.
"--enable-debug"
];
desktopItems = [ (makeDesktopItem {
name = "abuse";
exec = "abuse";
icon = "abuse";
desktopName = "Abuse";
comment = "Side-scroller action game that pits you against ruthless alien killers";
categories = [ "Game" "ActionGame" ];
}) ];
postInstall = ''
mkdir $out/etc
echo -e "dir ${freepats}\nsource ${freepats}/freepats.cfg" > $out/etc/timidity.cfg
mv $out/bin/abuse $out/bin/.abuse-bin
substituteAll "${./abuse.sh}" $out/bin/abuse
chmod +x $out/bin/abuse
install -Dm644 doc/abuse.png $out/share/pixmaps/abuse.png
'';
nativeBuildInputs = [ copyDesktopItems ];
buildInputs = [ SDL SDL_mixer freepats ];
meta = with lib; {
description = "Side-scroller action game that pits you against ruthless alien killers";
homepage = "http://abuse.zoy.org/";
license = with licenses; [ unfree ];
# Most of abuse is free (public domain, GPL2+, WTFPL), however the creator
# of its sfx and music only gave Debian permission to redistribute the
# files. Our friends from Debian thought about it some more:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648272
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,78 @@
{ lib
, stdenv
, fetchurl
, copyDesktopItems
, libX11
, libXpm
, libpng
, makeDesktopItem
, zlib
}:
stdenv.mkDerivation rec {
pname = "ace-of-penguins";
version = "1.4";
src = fetchurl {
url = "http://www.delorie.com/store/ace/ace-${version}.tar.gz";
hash = "sha256-H+47BTOSGkKHPAYj8z2HOgZ7HuxY8scMAUSRRueaTM4=";
};
patches = [
# Fixes a bunch of miscompilations in modern environments
./fixup-miscompilations.patch
];
nativeBuildInputs = [
copyDesktopItems
];
buildInputs = [
libX11
libXpm
libpng
zlib
];
desktopItems = let
generateItem = gameName: {
name = "${pname}-${gameName}";
exec = "${placeholder "out"}/bin/${gameName}";
comment = "Ace of Penguins ${gameName} Card Game";
desktopName = gameName;
genericName = gameName;
};
in
map (x: makeDesktopItem (generateItem x)) [
"canfield"
"freecell"
"golf"
"mastermind"
"merlin"
"minesweeper"
"pegged"
"penguins"
"solitaire"
"spider"
"taipedit"
"taipei"
"thornq"
];
meta = with lib; {
homepage = "http://www.delorie.com/store/ace/";
description = "Solitaire games in X11";
longDescription = ''
The Ace of Penguins is a set of Unix/X solitaire games based on the ones
available for Windows(tm) but with a number of enhancements that my wife
says make my versions better :-)
The latest version includes clones of freecell, golf, mastermind, merlin,
minesweeper, pegged, solitaire, taipei (with editor!), and thornq (by
Martin Thornquist).
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,80 @@
--- ace-1.4/lib/xwin.c
+++ ace-1.4/lib/xwin.c
@@ -89,10 +89,10 @@
/* Motif window hints */
typedef struct
{
- unsigned flags;
- unsigned functions;
- unsigned decorations;
- int inputMode;
+ unsigned long flags;
+ unsigned long functions;
+ unsigned long decorations;
+ long inputMode;
} PropMotifWmHints;
typedef PropMotifWmHints PropMwmHints;
@@ -841,13 +841,13 @@
png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0);
info_ptr = png_create_info_struct (png_ptr);
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf (png_ptr))) {
fprintf(stderr, "Invalid PNG image!\n");
return;
}
file_bytes = src->file_data;
- png_set_read_fn (png_ptr, (voidp)&file_bytes, (png_rw_ptr)png_reader);
+ png_set_read_fn (png_ptr, (void *)&file_bytes, (png_rw_ptr)png_reader);
png_read_info (png_ptr, info_ptr);
--- ace-1.4/lib/make-imglib.c
+++ ace-1.4/lib/make-imglib.c
@@ -86,7 +86,7 @@
png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0);
info_ptr = png_create_info_struct (png_ptr);
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf (png_ptr))) {
fclose (f);
continue;
}
--- ace-1.4/lib/Makefile.am
+++ ace-1.4/lib/Makefile.am
@@ -6,7 +6,7 @@
CLEANFILES = images.c images.d
INCLUDES = $(X_CFLAGS) @PDA@
-AM_LDFLAGS = $(X_LIBS)
+AM_LDFLAGS = $(X_LIBS) -lpng -lz -lm
BUILD_CC = @BUILD_CC@
AR = @AR@
--- ace-1.4/lib/xwin.c 2020-10-07 02:07:59.000000000 +0300
+++ ace-1.4/lib/xwin.c 2020-10-07 02:15:05.941784967 +0300
@@ -55,7 +55,6 @@
{ "-visual", OPTION_INTEGER, &visual_id },
{ 0, 0, 0 }
};
-OptionDesc *xwin_options = xwin_options_list;
Display *display=0;
int screen=0;
--- ace-1.4/config.guess 2012-03-24 19:00:49.000000000 +0100
+++ ace-1.4/config.guess 2021-07-05 11:02:16.685843793 +0200
@@ -882,6 +882,9 @@
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
+ aarch64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchurl, patchelf, zlib, libmad, libpng12, libcaca, libGLU, libGL, alsa-lib, libpulseaudio
, xorg }:
let
inherit (xorg) libXext libX11;
lpath = "${stdenv.cc.cc.lib}/lib64:" + lib.makeLibraryPath [
zlib libmad libpng12 libcaca libXext libX11 libGLU libGL alsa-lib libpulseaudio];
in
stdenv.mkDerivation rec {
name = "adom-${version}-noteye";
version = "1.2.0_pre23";
src = fetchurl {
url = "http://ancardia.uk.to/download/adom_noteye_linux_ubuntu_64_${version}.tar.gz";
sha256 = "0sbn0csaqb9cqi0z5fdwvnymkf84g64csg0s9mm6fzh0sm2mi0hz";
};
buildCommand = ''
. $stdenv/setup
unpackPhase
mkdir -pv $out
cp -r -t $out adom/*
chmod u+w $out/lib
for l in $out/lib/*so* ; do
chmod u+w $l
${patchelf}/bin/patchelf \
--set-rpath "$out/lib:${lpath}" \
$l
done
${patchelf}/bin/patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/lib:${lpath}" \
$out/adom
mkdir $out/bin
cat >$out/bin/adom <<EOF
#! ${stdenv.shell}
(cd $out; exec $out/adom ; )
EOF
chmod +x $out/bin/adom
'';
meta = with lib; {
description = "A rogue-like game with nice graphical interface";
homepage = "http://adom.de/";
license = licenses.unfreeRedistributable;
maintainers = [maintainers.smironov];
# Please, notify me (smironov) if you need the x86 version
platforms = ["x86_64-linux"];
};
}

View file

@ -0,0 +1,85 @@
{ lib
, rustPlatform
, fetchFromGitLab
, fetchpatch
, openssl
, libGL
, vulkan-loader
, wayland
, wayland-protocols
, libxkbcommon
, libX11
, libXrandr
, libXi
, libXcursor
, pkg-config
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "airshipper";
version = "0.7.0";
src = fetchFromGitLab {
owner = "Veloren";
repo = "airshipper";
rev = "v${version}";
sha256 = "sha256-nOE9ZNHxLEAnMkuBSpxmeq3DxkRIlcoase6AxU+eFug=";
};
patches = [
# this *should* be merged in time for the release following 0.7.0
(fetchpatch {
url = "https://github.com/veloren/Airshipper/commit/97fc986ab4cbf59f2c764f647710f19db86031b4.patch";
hash = "sha256-Sg5et+yP6Z44wV/t9zqKLpg1C0cq6rV+3WrzAH4Za3U=";
})
];
cargoSha256 = "sha256-s3seKVEhXyOVlt3a8cubzRWoB4SVQpdCmq12y0FpDUw=";
buildInputs = [
openssl
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXi
libXcursor
];
nativeBuildInputs = [ pkg-config makeWrapper ];
postInstall = ''
install -Dm444 -t "$out/share/applications" "client/assets/net.veloren.airshipper.desktop"
install -Dm444 "client/assets/logo.ico" "$out/share/icons/net.veloren.airshipper.ico"
'';
postFixup =
let
libPath = lib.makeLibraryPath [
libGL
vulkan-loader
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXi
libXcursor
];
in
''
patchelf --set-rpath "${libPath}" "$out/bin/airshipper"
'';
doCheck = false;
cargoBuildFlags = [ "--package" "airshipper" ];
cargoTestFlags = [ "--package" "airshipper" ];
meta = with lib; {
description = "Provides automatic updates for the voxel RPG Veloren.";
homepage = "https://www.veloren.net";
license = licenses.gpl3;
maintainers = with maintainers; [ yusdacra ];
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl, makeWrapper, SDL, SDL_image }:
stdenv.mkDerivation rec {
pname = "airstrike-pre";
version = "6a";
src = fetchurl {
url = "https://icculus.org/airstrike/airstrike-pre${version}-src.tar.gz";
sha256 = "1h6rv2zcp84ycmd0kv1pbpqjgwx57dw42x7878d2c2vnpi5jn8qi";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ SDL SDL_image ];
NIX_LDFLAGS = "-lm";
installPhase = ''
ls -l
mkdir -p $out/bin
cp airstrike $out/bin
mkdir -p $out/share
cp -r data airstrikerc $out/share
wrapProgram $out/bin/airstrike \
--chdir "$out/share"
'';
meta = with lib; {
description = "A 2d dogfighting game";
homepage = "https://icculus.org/airstrike/";
license = licenses.gpl2;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,100 @@
{ lib, stdenv, fetchurl, boost, curl, ffmpeg_4, icoutils, libGLU, libmad, libogg
, libpng, libsndfile, libvorbis, lua, pkg-config, SDL2, SDL2_image, SDL2_net
, SDL2_ttf, smpeg, speex, zziplib, zlib, makeWrapper, makeDesktopItem, unzip
, alephone }:
let
self = stdenv.mkDerivation rec {
outputs = [ "out" "icons" ];
pname = "alephone";
version = "1.4";
src = fetchurl {
url = let date = "20210408";
in "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${date}/AlephOne-${date}.tar.bz2";
sha256 = "sha256-tMwATUhUpo8W2oSWxGSZcAHVkj1PWEvUR/rpMZwWCWA=";
};
nativeBuildInputs = [ pkg-config icoutils ];
buildInputs = [
boost
curl
ffmpeg_4
libGLU
libmad
libsndfile
libogg
libpng
libvorbis
lua
SDL2
SDL2_image
SDL2_net
SDL2_ttf
smpeg
speex
zziplib
zlib
];
configureFlags = [ "--with-boost=${boost}" ];
enableParallelBuilding = true;
postInstall = ''
mkdir $icons
icotool -x -i 5 -o $icons Resources/Windows/*.ico
pushd $icons
for x in *_5_48x48x32.png; do
mv $x ''${x%_5_48x48x32.png}.png
done
popd
'';
meta = with lib; {
description =
"Aleph One is the open source continuation of Bungies Marathon 2 game engine";
homepage = "https://alephone.lhowon.org/";
license = with licenses; [ gpl3 ];
maintainers = with maintainers; [ ehmry ];
platforms = platforms.linux;
};
};
in self // {
makeWrapper = { pname, desktopName, version, zip, meta
, icon ? alephone.icons + "/alephone.png", ... }@extraArgs:
stdenv.mkDerivation ({
inherit pname version;
desktopItem = makeDesktopItem {
name = desktopName;
exec = pname;
genericName = pname;
categories = [ "Game" ];
comment = meta.description;
inherit desktopName icon;
};
src = zip;
nativeBuildInputs = [ makeWrapper unzip ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin $out/data/$pname $out/share/applications
cp -a * $out/data/$pname
cp $desktopItem/share/applications/* $out/share/applications
makeWrapper ${alephone}/bin/alephone $out/bin/$pname \
--add-flags $out/data/$pname
'';
} // extraArgs // {
meta = alephone.meta // {
license = lib.licenses.free;
hydraPlatforms = [ ];
} // meta;
});
}

View file

@ -0,0 +1,25 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "durandal";
desktopName = "Marathon-Durandal";
version = "20150620";
icon = alephone.icons + "/marathon2.png";
zip = fetchurl {
url =
"https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/Marathon2-${version}-Data.zip";
sha256 = "1gpg0dk3z8irvdkm4nj71v14lqx77109chqr2ly594jqf6j9wwqv";
};
meta = {
description = "Second chapter of the Marathon trilogy";
longDescription = ''
Fresh from your triumph on the starship Marathon, you are seized by the rogue computer Durandal to do his bidding in a distant part of the galaxy. Within the ruins of an ancient civilization, you must seek the remnants of a lost clan and uncover their long-buried secrets. Battle opponents ancient and terrible, with sophisticated weapons and devious strategies, all the while struggling to escape the alien nightmare
This release of Marathon 2: Durandal includes the classic graphics, and revamped high-definition textures and monsters from the Xbox Live Arcade edition.
'';
homepage = "https://alephone.lhowon.org/games/marathon2.html";
};
}

View file

@ -0,0 +1,21 @@
{ alephone, fetchurl, unrar }:
alephone.makeWrapper rec {
pname = "marathon-eternal";
version = "1.2.0";
desktopName = "Marathon-Eternal";
zip = fetchurl {
url = "http://eternal.bungie.org/files/_releases/EternalXv120.zip";
sha256 = "1qrvx0sp9xc8zbpp5yz8jdz458ajzmyv2si7hrppiyawc8dpcwck";
};
sourceRoot = "Eternal 1.2.0";
meta = {
description =
"Picking up from the end of the Marathon trilogy, you find yourself suddenly ninety-four years in the future, in the year 2905";
homepage = "http://eternal.bungie.org/";
};
}

View file

@ -0,0 +1,18 @@
{ alephone, fetchurl, unrar }:
alephone.makeWrapper rec {
pname = "marathon-evil";
version = "0";
desktopName = "Marathon-Evil";
zip = fetchurl {
url = "http://files3.bungie.org/trilogy/MarathonEvil.zip";
sha256 = "08nizbjp2rx10bpqrbhb76as0j2zynmy2c0qa5b482lz1szf9b95";
};
meta = {
description = "The first conversion for Marathon Infinity";
homepage = "https://alephone.lhowon.org/scenarios.html";
};
}

View file

@ -0,0 +1,25 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "marathon-infinity";
desktopName = "Marathon-Infinity";
version = "20220115";
icon = alephone.icons + "/marathon-infinity.png";
zip = fetchurl {
url =
"https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/MarathonInfinity-${version}-Data.zip";
sha256 = "sha256-00Wp+y+b82uZZ8fNeU3N5UAKlk0Sd1SfAEGL6RpyVf8=";
};
meta = {
description = "Third chapter of the Marathon trilogy";
longDescription = ''
Marathon Infinity takes the closed universe of the Marathon series and blows it wide open. The solo/co-op campaign, Blood Tides of Lhowon, is a 20-level scenario sporting new textures, weapons, and aliens. More than that, the scenario sheds a surprising new light on the storys characters and the meaning of events. Having defeated the Pfhor and reawakened the ancient remnants of the Spht, the player now faces a world where friends become enemies and all is not what it seems
Marathon Infinity is the most popular Marathon game in online play, and is compatible with hundreds of community-made maps. This release includes the classic graphics, and revamped high-definition textures and weapons.
'';
homepage = "https://alephone.lhowon.org/games/infinity.html";
};
}

View file

@ -0,0 +1,24 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "marathon";
desktopName = "Marathon";
version = "20210408";
icon = alephone.icons + "/marathon.png";
zip = fetchurl {
url = "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${version}/Marathon-${version}-Data.zip";
sha256 = "sha256-WM5c0X/BGeDu8d7hME3LiZavkgJll6rc3Beat/2bsdg=";
};
meta = {
description = "First chapter of the Marathon trilogy";
longDescription = ''
Alien forces have boarded the interstellar colony ship Marathon. The situation is dire. As a security officer onboard, it is your duty to defend the ship and its crew.
Experience the start of Bungies iconic trilogy with Marathon. This release uses the original Marathon data files for the most authentic experience outside of a classic Mac or emulator.
'';
homepage = "https://alephone.lhowon.org/games/marathon.html";
};
}

View file

@ -0,0 +1,19 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "pathways-into-darkness";
desktopName = "Pathways-Into-Darkness";
version = "1.1.1";
zip = fetchurl {
url = "http://simplici7y.com/version/file/1185/AOPID_v1.1.1.zip";
sha256 = "0x83xjcw5n5s7sw8z6rb6zzhihjkjgk7x7ynnqq917dcklr7bz4g";
};
meta = {
description = ''
Port of the 1993 mac game "Pathways Into Darkness" by Bungie to the Aleph One engine'';
homepage = "http://simplici7y.com/items/aleph-one-pathways-into-darkness";
};
}

View file

@ -0,0 +1,18 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "marathon-pheonix";
desktopName = "Marathon-Pheonix";
version = "1.3";
zip = fetchurl {
url = "http://simplici7y.com/version/file/998/Marathon_Phoenix_1.3.zip";
sha256 = "1r06k0z8km7l9d3njinsrci4jhk8hrnjdcmjd8n5z2qxkqvhn9qj";
};
meta = {
description = "A 35-level single player major Marathon conversion";
homepage = "http://www.simplici7y.com/items/marathon-phoenix-2";
};
}

View file

@ -0,0 +1,18 @@
{ alephone, fetchurl, unrar }:
alephone.makeWrapper rec {
pname = "marathon-red";
version = "0";
desktopName = "Marathon-Red";
zip = fetchurl {
url = "http://files3.bungie.org/trilogy/MarathonRED.zip";
sha256 = "1p13snlrvn39znvfkxql67crhysn71db2bwsfrkhjkq58wzs6qgw";
};
meta = {
description = "Survival horror-esque Marathon conversion";
homepage = "https://alephone.lhowon.org/scenarios.html";
};
}

View file

@ -0,0 +1,23 @@
{ alephone, fetchurl }:
alephone.makeWrapper rec {
pname = "rubicon-x";
version = "20150620";
desktopName = "Marathon-Rubicon-X";
zip = fetchurl {
url = "http://files5.bungie.org/marathon/marathonRubiconX.zip";
sha256 = "095si89wap76pvkvk90zqw7djhrhwb1anjm2s8i503jbcn5n4ipm";
};
sourceRoot = "Rubicon X ƒ";
meta = {
description = "Unofficial forth chapter of the Marathon series";
longDescription = ''
Rubicon X is a free, cross platform, first person shooter that continues the story of Bungies Marathon trilogy. First released as Marathon:Rubicon in 2001, Rubicon X is a complete overhaul of the original. It features all new high-resolution artwork, new and updated maps, and enough surprises to feel like a whole new game.
'';
homepage = "http://www.marathonrubicon.com/";
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchsvn, pkg-config, libjpeg, libX11, libXxf86vm, curl, libogg
, libvorbis, freetype, openal, libGL }:
stdenv.mkDerivation rec {
pname = "alienarena";
version = "7.71.2";
src = fetchsvn {
url = "svn://svn.icculus.org/alienarena/trunk";
rev = "5673";
sha256 = "1qfrgrp7nznk5n1jqvjba6l1w8y2ixzyx9swkpvd02rdwlwrp9kw";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libjpeg libX11 curl libogg libvorbis
freetype openal libGL libXxf86vm ];
patchPhase = ''
substituteInPlace ./configure \
--replace libopenal.so.1 ${openal}/lib/libopenal.so.1 \
--replace libGL.so.1 ${libGL}/lib/libGL.so.1
'';
meta = with lib; {
description = "A free, stand-alone first-person shooter computer game";
longDescription = ''
Do you like old school deathmatch with modern features? How
about rich, colorful, arcade-like atmospheres? How about retro
Sci-Fi? Then you're going to love what Alien Arena has in store
for you! This game combines some of the very best aspects of
such games as Quake III and Unreal Tournament and wraps them up
with a retro alien theme, while adding tons of original ideas to
make the game quite unique.
'';
homepage = "http://red.planetarena.org";
# Engine is under GPLv2, everything else is under
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ astsmtl ];
platforms = platforms.linux;
hydraPlatforms = [];
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "amoeba-data";
version = "1.1";
src = fetchurl {
url = "http://http.debian.net/debian/pool/non-free/a/amoeba-data/amoeba-data_${version}.orig.tar.gz";
sha256 = "1bgclr1v63n14bj9nwzm5zxg48nm0cla9bq1rbd5ylxra18k0jbg";
};
installPhase = ''
mkdir -p $out/share/amoeba
cp demo.dat $out/share/amoeba/
'';
meta = with lib; {
description = "Fast-paced, polished OpenGL demonstration by Excess (data files)";
homepage = "https://packages.qa.debian.org/a/amoeba-data.html";
license = licenses.unfree;
maintainers = [ maintainers.dezgeg ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,45 @@
{ lib, stdenv, fetchurl, amoeba-data, alsa-lib, expat, freetype, gtk2, libvorbis, libGLU, xorg, pkg-config }:
stdenv.mkDerivation rec {
pname = "amoeba";
version = "1.1";
debver = "29.1";
srcs = [
(fetchurl {
url = "http://http.debian.net/debian/pool/contrib/a/amoeba/amoeba_${version}.orig.tar.gz";
sha256 = "1hyycw4r36ryka2gab9vzkgs8gq4gqhk08vn29cwak95w0rahgim";
})
(fetchurl {
url = "http://http.debian.net/debian/pool/contrib/a/amoeba/amoeba_${version}-${debver}.debian.tar.xz";
sha256 = "1xgi2sqzq97w6hd3dcyq6cka8xmp6nr25qymzhk52cwqh7qb75p3";
})
];
sourceRoot = "amoeba-1.1.orig";
prePatch = ''
patches="${./include-string-h.patch} $(echo ../debian/patches/*.diff)"
'';
postPatch = ''
sed -i packer/pakfile.cpp -e 's|/usr/share/amoeba|${amoeba-data}/share/amoeba|'
sed -i main/linux-config/linux-config.cpp -e 's|libgdk-x11-2.0.so.0|${gtk2}/lib/&|'
sed -i main/linux-config/linux-config.cpp -e 's|libgtk-x11-2.0.so.0|${gtk2}/lib/&|'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib expat freetype gtk2 libvorbis libGLU xorg.libXxf86vm ];
installPhase = ''
mkdir -p $out/bin $out/share/man/man1/
cp amoeba $out/bin/
cp ../debian/amoeba.1 $out/share/man/man1/
'';
meta = with lib; {
description = "Fast-paced, polished OpenGL demonstration by Excess";
homepage = "https://packages.qa.debian.org/a/amoeba.html";
license = licenses.gpl2; # Engine is GPLv2, data files in amoeba-data nonfree
maintainers = [ maintainers.dezgeg ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
diff --git a/image/png_image.cpp b/image/png_image.cpp
index 37875fc..1531d6f 100644
--- a/image/png_image.cpp
+++ b/image/png_image.cpp
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <png.h>
#include "png_image.h"

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromSourcehut, port ? "1234" }:
stdenv.mkDerivation {
pname = "among-sus-unstable";
version = "2021-05-19";
src = fetchFromSourcehut {
owner = "~martijnbraam";
repo = "among-sus";
rev = "554e60bf52e3fa931661b9414189a92bb8f69d78";
sha256 = "0j1158nczhvy5i1ykvzvhlv4ndhibgng0dq1lw2bmi8q6k1q1s0w";
};
patchPhase = ''
sed -i 's/port = 1234/port = ${port}/g' main.c
'';
installPhase = ''
mkdir -p $out/bin
install -Dm755 among-sus $out/bin
'';
meta = with lib; {
homepage = "https://git.sr.ht/~martijnbraam/among-sus";
description = "Among us, but it's a text adventure";
license = licenses.agpl3Plus;
maintainers = [ maintainers.eyjhb ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,73 @@
{ lib, stdenv, fetchurl, libvorbis, libogg, libtheora, SDL, libXft, SDL_image, zlib, libX11, libpng, openal, runtimeShell, requireFile, commercialVersion ? false }:
stdenv.mkDerivation rec {
pname = "andyetitmoves";
version = "1.2.2";
src =
if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux"
then
let
postfix = if stdenv.hostPlatform.system == "i686-linux" then "i386" else "x86_64";
commercialName = "${pname}-${version}_${postfix}.tar.gz";
demoUrl = "http://www.andyetitmoves.net/demo/${pname}Demo-${version}_${postfix}.tar.gz";
in
if commercialVersion
then
requireFile
{
message = ''
We cannot download the commercial version automatically, as you require a license.
Once you bought a license, you need to add your downloaded version to the nix store.
You can do this by using "nix-prefetch-url file:///\$PWD/${commercialName}" in the
directory where yousaved it.
'';
name = commercialName;
sha256 =
if stdenv.hostPlatform.system == "i686-linux"
then "15wvzmmidvykwjrbnq70h5jrvnjx1hcrm0357qj85q4aqbzavh01"
else "1v8z16qa9ka8sf7qq45knsxj87s6sipvv3a7xq11pb5xk08fb2ql";
}
else
fetchurl {
url = demoUrl;
sha256 =
if stdenv.hostPlatform.system == "i686-linux"
then "0f14vrrbq05hsbdajrb5y9za65fpng1lc8f0adb4aaz27x7sh525"
else "0mg41ya0b27blq3b5498kwl4rj46dj21rcd7qd0rw1kyvr7sx4v4";
}
else
throw "And Yet It Moves nix package only supports linux and intel cpu's.";
installPhase = ''
mkdir -p $out/{opt/andyetitmoves,bin}
cp -r * $out/opt/andyetitmoves/
fullPath=${stdenv.cc.cc.lib}/lib64
for i in $nativeBuildInputs; do
fullPath=$fullPath''${fullPath:+:}$i/lib
done
binName=${if commercialVersion then "AndYetItMoves" else "AndYetItMovesDemo"}
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
cat > $out/bin/$binName << EOF
#!${runtimeShell}
cd $out/opt/andyetitmoves
exec ./lib/$binName
EOF
chmod +x $out/bin/$binName
'';
buildInputs = [ libvorbis libogg libtheora SDL libXft SDL_image zlib libX11 libpng openal ];
meta = with lib; {
description = "Physics/Gravity Platform game";
longDescription = ''
And Yet It Moves is an award-winning physics-based platform game in which players rotate the game world at will to solve challenging puzzles. Tilting the world turns walls into floors, slides into platforms, and stacks of rocks into dangerous hazards.
'';
homepage = "http://www.andyetitmoves.net/";
license = licenses.unfree;
maintainers = with maintainers; [ bluescreen303 ];
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 }:
stdenv.mkDerivation rec {
pname = "angband";
version = "4.2.4";
src = fetchFromGitHub {
owner = "angband";
repo = "angband";
rev = version;
sha256 = "sha256-Fp3BGCZYYdQCKXOLYsT4zzlibNRlbELZi26ofrbGGPQ=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ncurses5 ];
installFlags = [ "bindir=$(out)/bin" ];
meta = with lib; {
homepage = "https://angband.github.io/angband";
description = "A single-player roguelike dungeon exploration game";
maintainers = [ maintainers.chattered ];
license = licenses.gpl2;
};
}

87
pkgs/games/anki/bin.nix Normal file
View file

@ -0,0 +1,87 @@
{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki, undmg, zstd }:
let
pname = "anki-bin";
# Update hashes for both Linux and Darwin!
version = "2.1.52";
sources = {
linux = fetchurl {
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux-qt6.tar.zst";
sha256 = "sha256-+eRflNMxutoSY9yQfnhIjfLg9b9CNv+7UuYyg4jgfK4=";
};
# For some reason anki distributes completely separate dmg-files for the aarch64 version and the x86_64 version
darwin-x86_64 = fetchurl {
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac-intel-qt6.dmg";
sha256 = "sha256-keQxaf0KOQjCb22dQD/1VytW2fk35OPUJyJ42kaoAr8=";
};
darwin-aarch64 = fetchurl {
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac-apple-qt6.dmg";
sha256 = "sha256-mYPSOjXh18nWpZjXLAjEodoxopr6rxadESMAf/t9SlI=";
};
};
unpacked = stdenv.mkDerivation {
inherit pname version;
nativeBuildInputs = [ zstd ];
src = sources.linux;
installPhase = ''
runHook preInstall
xdg-mime () {
echo Stubbed!
}
export -f xdg-mime
PREFIX=$out bash install.sh
runHook postInstall
'';
};
meta = with lib; {
inherit (anki.meta) license homepage description longDescription;
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
maintainers = with maintainers; [ atemu ];
};
passthru = { inherit sources; };
in
if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // {
name = "anki";
# Dependencies of anki
targetPkgs = pkgs: (with pkgs; [ xorg.libxkbfile krb5 ]);
runScript = writeShellScript "anki-wrapper.sh" ''
exec ${unpacked}/bin/anki
'';
extraInstallCommands = ''
mkdir -p $out/share
cp -R ${unpacked}/share/applications \
${unpacked}/share/man \
${unpacked}/share/pixmaps \
$out/share/
'';
inherit meta passthru;
}) else stdenv.mkDerivation {
inherit pname version passthru;
src = if stdenv.isAarch64 then sources.darwin-aarch64 else sources.darwin-x86_64;
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/Applications/
cp -a Anki.app $out/Applications/
'';
inherit meta;
}

214
pkgs/games/anki/default.nix Normal file
View file

@ -0,0 +1,214 @@
{ stdenv
, buildPythonApplication
, lib
, python
, fetchurl
, fetchFromGitHub
, fetchpatch
, lame
, mpv-unwrapped
, libpulseaudio
, pyqtwebengine
, decorator
, beautifulsoup4
, sqlalchemy
, pyaudio
, requests
, markdown
, matplotlib
, pytest
, glibcLocales
, nose
, jsonschema
, setuptools
, send2trash
, CoreAudio
# This little flag adds a huge number of dependencies, but we assume that
# everyone wants Anki to draw plots with statistics by default.
, plotsSupport ? true
# manual
, asciidoc
}:
let
# when updating, also update rev-manual to a recent version of
# https://github.com/ankitects/anki-docs
# The manual is distributed independently of the software.
version = "2.1.15";
sha256-pkg = "12dvyf3j9df4nrhhnqbzd9b21rpzkh4i6yhhangn2zf7ch0pclss";
rev-manual = "8f6387867ac37ef3fe9d0b986e70f898d1a49139";
sha256-manual = "0pm5slxn78r44ggvbksz7rv9hmlnsvn9z811r6f63dsc8vm6mfml";
manual = stdenv.mkDerivation {
pname = "anki-manual";
inherit version;
src = fetchFromGitHub {
owner = "ankitects";
repo = "anki-docs";
rev = rev-manual;
sha256 = sha256-manual;
};
dontInstall = true;
nativeBuildInputs = [ asciidoc ];
patchPhase = ''
# rsync isnt needed
# WEB is the PREFIX
# We remove any special ankiweb output generation
# and rename every .mako to .html
sed -e 's/rsync -a/cp -a/g' \
-e "s|\$(WEB)/docs|$out/share/doc/anki/html|" \
-e '/echo asciidoc/,/mv $@.tmp $@/c \\tasciidoc -b html5 -o $@ $<' \
-e 's/\.mako/.html/g' \
-i Makefile
# patch absolute links to the other language manuals
sed -e 's|https://apps.ankiweb.net/docs/|link:./|g' \
-i {manual.txt,manual.*.txt}
# theres an artifact in most input files
sed -e '/<%def.*title.*/d' \
-i *.txt
mkdir -p $out/share/doc/anki/html
'';
};
in
buildPythonApplication rec {
pname = "anki";
inherit version;
src = fetchurl {
urls = [
"https://apps.ankiweb.net/downloads/current/${pname}-${version}-source.tgz"
# "https://apps.ankiweb.net/downloads/current/${name}-source.tgz"
# "http://ankisrs.net/download/mirror/${name}.tgz"
# "http://ankisrs.net/download/mirror/archive/${name}.tgz"
];
sha256 = sha256-pkg;
};
outputs = [ "out" "doc" "man" ];
propagatedBuildInputs = [
pyqtwebengine
sqlalchemy
beautifulsoup4
send2trash
pyaudio
requests
decorator
markdown
jsonschema
setuptools
]
++ lib.optional plotsSupport matplotlib
++ lib.optional stdenv.isDarwin [ CoreAudio ]
;
checkInputs = [ pytest glibcLocales nose ];
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
buildInputs = [ lame mpv-unwrapped libpulseaudio ];
patches = [
# Disable updated version check.
./no-version-check.patch
(fetchpatch {
name = "fix-mpv-args.patch";
url = "https://sources.debian.org/data/main/a/anki/2.1.15+dfsg-3/debian/patches/fix-mpv-args.patch";
sha256 = "1dimnnawk64m5bbdbjrxw5k08q95l728n94cgkrrwxwavmmywaj2";
})
(fetchpatch {
name = "anki-2.1.15-unescape.patch";
url = "https://795309.bugs.gentoo.org/attachment.cgi?id=715200";
sha256 = "14rz864kdaba4fd1marwkyz9n1jiqnbjy4al8bvwlhpvp0rm1qk6";
})
];
# Anki does not use setup.py
dontBuild = true;
postPatch = ''
# Remove QT translation files. We'll use the standard QT ones.
rm "locale/"*.qm
# hitting F1 should open the local manual
substituteInPlace anki/consts.py \
--replace 'HELP_SITE="http://ankisrs.net/docs/manual.html"' \
'HELP_SITE="${manual}/share/doc/anki/html/manual.html"'
'';
# UTF-8 locale needed for testing
LC_ALL = "en_US.UTF-8";
# tests fail with to many open files
doCheck = !stdenv.isDarwin;
# - Anki writes some files to $HOME during tests
# - Skip tests using network
checkPhase = ''
HOME=$TMP pytest --ignore tests/test_sync.py
'';
installPhase = ''
pp=$out/lib/${python.libPrefix}/site-packages
mkdir -p $out/bin
mkdir -p $out/share/applications
mkdir -p $doc/share/doc/anki
mkdir -p $man/share/man/man1
mkdir -p $out/share/mime/packages
mkdir -p $out/share/pixmaps
mkdir -p $pp
cat > $out/bin/anki <<EOF
#!${python}/bin/python
import aqt
aqt.run()
EOF
chmod 755 $out/bin/anki
cp -v anki.desktop $out/share/applications/
cp -v README* LICENSE* $doc/share/doc/anki/
cp -v anki.1 $man/share/man/man1/
cp -v anki.xml $out/share/mime/packages/
cp -v anki.{png,xpm} $out/share/pixmaps/
cp -rv locale $out/share/
cp -rv anki aqt web $pp/
# copy the manual into $doc
cp -r ${manual}/share/doc/anki/html $doc/share/doc/anki
'';
# now wrapPythonPrograms from postFixup will add both python and qt env variables
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${qtWrapperArgs[@]}"
--prefix PATH ':' "${lame}/bin:${mpv-unwrapped}/bin"
)
'';
passthru = {
inherit manual;
};
meta = with lib; {
homepage = "https://apps.ankiweb.net/";
description = "Spaced repetition flashcard program";
longDescription = ''
Anki is a program which makes remembering things easy. Because it is a lot
more efficient than traditional study methods, you can either greatly
decrease your time spent studying, or greatly increase the amount you learn.
Anyone who needs to remember things in their daily life can benefit from
Anki. Since it is content-agnostic and supports images, audio, videos and
scientific markup (via LaTeX), the possibilities are endless. For example:
learning a language, studying for medical and law exams, memorizing
people's names and faces, brushing up on geography, mastering long poems,
or even practicing guitar chords!
'';
license = licenses.agpl3Plus;
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ oxij Profpatsch ];
};
}

View file

@ -0,0 +1,13 @@
diff -Nurp anki-2.0.33.orig/aqt/main.py anki-2.0.33/aqt/main.py
--- anki-2.0.33.orig/aqt/main.py 2016-01-05 21:37:53.904533750 +0100
+++ anki-2.0.33/aqt/main.py 2016-01-05 21:39:11.469175976 +0100
@@ -820,6 +820,9 @@ title="%s">%s</button>''' % (
##########################################################################
def setupAutoUpdate(self):
+ # Don't check for latest version since the versions are
+ # managed in Nixpkgs.
+ return
import aqt.update
self.autoUpdate = aqt.update.LatestVersionFinder(self)
self.connect(self.autoUpdate, SIGNAL("newVerAvail"), self.newVerAvail)

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, sfml }:
stdenv.mkDerivation rec {
pname = "antsimulator";
version = "3.1";
src = fetchFromGitHub {
owner = "johnBuffer";
repo = "AntSimulator";
rev = "v${version}";
sha256 = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml ];
postPatch = ''
substituteInPlace src/main.cpp \
--replace "res/" "$out/opt/antsimulator/"
substituteInPlace include/simulation/config.hpp \
--replace "res/" "$out/opt/antsimulator/"
substituteInPlace include/render/colony_renderer.hpp \
--replace "res/" "$out/opt/antsimulator/"
'';
installPhase = ''
install -Dm644 -t $out/opt/antsimulator res/*
install -Dm755 ./AntSimulator $out/bin/antsimulator
'';
meta = with lib; {
homepage = "https://github.com/johnBuffer/AntSimulator";
description = "Simple Ants simulator";
license = licenses.free;
maintainers = with maintainers; [ ivar ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,75 @@
{ lib, stdenv, fetchurl, gtk2-x11, glib, pango, cairo, atk, gdk-pixbuf, libX11 }:
# Arena is free software in the sense of "free beer" but not as in "free
# speech". We can install it as we please, but we cannot re-distribute it in
# any way other than the original release tarball, so we cannot include its NAR
# into the Nixpkgs channel.
let
inherit (lib) makeLibraryPath;
libDir = "lib64";
in
stdenv.mkDerivation rec {
pname = "arena";
version = "3.10-beta";
src = fetchurl {
url = "http://www.playwitharena.de/downloads/arenalinux_64bit_${lib.replaceStrings ["-"] [""] version}.tar.gz";
sha256 = "1pzb9sg4lzbbi4gbldvlb85p8xyl9xnplxwyb9pkk2mwzvvxkf0d";
};
# stdenv.cc.cc.lib is in that list to pick up libstdc++.so. Is there a better way?
buildInputs = [gtk2-x11 glib pango cairo atk gdk-pixbuf libX11 stdenv.cc.cc.lib];
unpackPhase = ''
# This is is a tar bomb, i.e. it extract a dozen files and directories to
# the top-level, so we must create a sub-directory first.
mkdir -p $out/lib/${pname}-${version}
tar -C $out/lib/${pname}-${version} -xf ${src}
# Remove executable bits from data files. This matters for the find command
# we'll use below to find all bundled engines.
chmod -x $out/lib/${pname}-${version}/Engines/*/*.{txt,bin,bmp,zip}
'';
buildPhase = ''
# Arena has (at least) two executables plus a couple of bundled chess
# engines that we need to patch.
exes=( $(find $out -name '*x86_64_linux')
$(find $out/lib/${pname}-${version}/Engines -type f -perm /u+x)
)
for i in "''${exes[@]}"; do
# Arminius is statically linked.
if [[ $i =~ "Arminius_2017-01-01" ]]; then echo yo $i; continue; fi
echo Fixing interpreter and rpath paths in $i ...
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${makeLibraryPath buildInputs}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
$i
done
'';
installPhase = ''
mkdir -p $out/bin
ln -s $out/lib/${pname}-${version}/Arena_x86_64_linux $out/bin/arena
'';
dontStrip = true;
meta = {
description = "Chess GUI for analyzing with and playing against various engines";
longDescription = ''
A free Graphical User Interface (GUI) for chess. Arena assists you in
analyzing and playing games as well as in testing chess engines. It runs
on Linux or Windows. Arena is compatible to Winboard protocol I, II and
UCI protocol I, II. Furthermore, compatible to Chess960, DGT electronic
chess board & DGT clocks and much more.
'';
license = lib.licenses.unfree;
platforms = ["x86_64-linux"];
hydraPlatforms = lib.platforms.none;
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchurl
, pkg-config, SDL, libxml2, SDL_image, libjpeg, libpng, libGLU, libGL, zlib
, dedicatedServer ? false }:
let
versionMajor = "0.2.9";
versionMinor = "1.0";
version = "${versionMajor}.${versionMinor}";
in
stdenv.mkDerivation {
pname = if dedicatedServer then "armagetronad-dedicated" else "armagetronad";
inherit version;
src = fetchurl {
url = "https://launchpad.net/armagetronad/${versionMajor}/${version}/+download/armagetronad-${version}.tbz";
sha256 = "sha256-WbbHwBzj+MylQ34z+XSmN1KVQaEapPUsGlwXSZ4m9qE";
};
enableParallelBuilding = true;
configureFlags = [
"--enable-memmanager"
"--enable-automakedefaults"
"--disable-useradd"
"--disable-initscripts"
"--disable-etc"
"--disable-uninstall"
"--disable-sysinstall"
] ++ lib.optional dedicatedServer "--enable-dedicated";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libxml2 zlib ]
++ lib.optionals (!dedicatedServer) [ SDL SDL_image libxml2 libjpeg libpng libGLU libGL ];
meta = with lib; {
homepage = "http://armagetronad.org";
description = "A multiplayer networked arcade racing game in 3D similar to Tron";
maintainers = with maintainers; [ numinit ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,62 @@
{ lib, stdenv, fetchFromGitHub, cmake, zlib, boost
, openal, glm, freetype, libGLU, SDL2, libepoxy
, dejavu_fonts, inkscape, optipng, imagemagick
, withCrashReporter ? !stdenv.isDarwin
, qtbase ? null
, wrapQtAppsHook ? null
, curl ? null
, gdb ? null
}:
with lib;
stdenv.mkDerivation {
pname = "arx-libertatis";
version = "2020-10-20";
src = fetchFromGitHub {
owner = "arx";
repo = "ArxLibertatis";
rev = "21df2e37664de79e117eff2af164873f05600f4c";
sha256 = "06plyyh0ddqv1j04m1vclz9j72609pgrp61v8wfjdcln8djm376i";
};
nativeBuildInputs = [
cmake inkscape imagemagick optipng
] ++ optionals withCrashReporter [ wrapQtAppsHook ];
buildInputs = [
zlib boost openal glm
freetype libGLU SDL2 libepoxy
] ++ optionals withCrashReporter [ qtbase curl ]
++ optionals stdenv.isLinux [ gdb ];
cmakeFlags = [
"-DDATA_DIR_PREFIXES=$out/share"
"-DImageMagick_convert_EXECUTABLE=${imagemagick.out}/bin/convert"
"-DImageMagick_mogrify_EXECUTABLE=${imagemagick.out}/bin/mogrify"
];
dontWrapQtApps = true;
postInstall = ''
ln -sf \
${dejavu_fonts}/share/fonts/truetype/DejaVuSansMono.ttf \
$out/share/games/arx/misc/dejavusansmono.ttf
'' + optionalString withCrashReporter ''
wrapQtApp "$out/libexec/arxcrashreporter"
'';
meta = {
description = ''
A cross-platform, open source port of Arx Fatalis, a 2002
first-person role-playing game / dungeon crawler
developed by Arkane Studios.
'';
homepage = "https://arx-libertatis.org/";
license = licenses.gpl3;
maintainers = with maintainers; [ rnhmjoj ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,41 @@
{ fetchurl, lib, stdenv, SDL, SDL_image, SDL_mixer, SDL_sound, libsigcxx, physfs
, boost, expat, freetype, libjpeg, wxGTK, lua, perl, pkg-config, zlib, zip, bzip2
, libpng, libtiff, fluidsynth, libmikmod, libvorbis, flac, libogg }:
stdenv.mkDerivation rec {
pname = "asc";
version = "2.6.0.0";
src = fetchurl {
url = "mirror://sourceforge/asc-hq/asc-${version}.tar.bz2";
sha256 = "1fybasb6srqfg6pqbvh0s0vvzjq9r0n6aq0z44hs7n68kmaam775";
};
configureFlags = [ "--disable-paragui" "--disable-paraguitest" ];
NIX_CFLAGS_COMPILE = "-fpermissive -Wno-error=narrowing -std=c++11"; # I'm too lazy to catch all gcc47-related problems
hardeningDisable = [ "format" ];
buildInputs = [
SDL SDL_image SDL_mixer SDL_sound libsigcxx physfs boost expat
freetype libjpeg wxGTK lua perl pkg-config zlib zip bzip2 libpng
libtiff fluidsynth libmikmod flac libvorbis libogg
];
meta = with lib; {
description = "Turn based strategy game";
longDescription = ''
Advanced Strategic Command is a free, turn based strategy game. It is
designed in the tradition of the Battle Isle series from Bluebyte and is
currently available for Windows and Linux.
'';
homepage = "https://www.asc-hq.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,98 @@
{ lib
, stdenv
, fetchFromGitHub
, makeDesktopItem
, copyDesktopItems
, openal
, pkg-config
, libogg
, libvorbis
, SDL2
, SDL2_image
, makeWrapper
, zlib
, file
, client ? true, server ? true
}:
stdenv.mkDerivation rec {
pname = "assaultcube";
version = "1.3.0.2";
src = fetchFromGitHub {
owner = "assaultcube";
repo = "AC";
rev = "v${version}";
sha256 = "0qv339zw9q5q1y7bghca03gw7z4v89sl4lbr6h3b7siy08mcwiz9";
};
nativeBuildInputs = [
makeWrapper
pkg-config
copyDesktopItems
];
buildInputs = [
file
zlib
] ++ lib.optionals client [
openal
SDL2
SDL2_image
libogg
libvorbis
];
targets = (lib.optionalString server "server") + (lib.optionalString client " client");
makeFlags = [ "-C source/src" "CXX=${stdenv.cc.targetPrefix}c++" targets ];
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "AssaultCube";
comment = "A multiplayer, first-person shooter game, based on the CUBE engine. Fast, arcade gameplay.";
genericName = "First-person shooter";
categories = [ "Game" "ActionGame" "Shooter" ];
icon = "assaultcube";
exec = pname;
})
];
gamedatadir = "/share/games/${pname}";
installPhase = ''
runHook preInstall
bindir=$out/bin
mkdir -p $bindir $out/$gamedatadir
cp -r config packages $out/$gamedatadir
if (test -e source/src/ac_client) then
cp source/src/ac_client $bindir
mkdir -p $out/share/applications
install -Dpm644 packages/misc/icon.png $out/share/icons/assaultcube.png
install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
makeWrapper $out/bin/ac_client $out/bin/${pname} \
--chdir "$out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
fi
if (test -e source/src/ac_server) then
cp source/src/ac_server $bindir
makeWrapper $out/bin/ac_server $out/bin/${pname}-server \
--chdir "$out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
fi
runHook postInstall
'';
meta = with lib; {
description = "Fast and fun first-person-shooter based on the Cube fps";
homepage = "https://assault.cubers.net";
platforms = platforms.linux; # should work on darwin with a little effort.
license = licenses.unfree;
maintainers = with maintainers; [ darkonion0 ];
};
}

View file

@ -0,0 +1,40 @@
{ fetchurl, lib, stdenv, cmake, xlibsWrapper, libGLU, libGL, SDL, openal, freealut, libogg, libvorbis, runtimeShell }:
stdenv.mkDerivation rec {
pname = "astromenace";
version = "1.4.1";
src = fetchurl {
url = "mirror://sourceforge/openastromenace/astromenace-src-${version}.tar.bz2";
sha256 = "1rkz6lwjcd5mwv72kf07ghvx6z46kf3xs250mjbmnmjpn7r5sxwv";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ xlibsWrapper libGLU libGL SDL openal freealut libogg libvorbis ];
postBuild = ''
./AstroMenace --pack --rawdata=../RAW_VFS_DATA
'';
installPhase = ''
mkdir -p $out/bin
cp AstroMenace $out
cp gamedata.vfs $out
cat > $out/bin/AstroMenace << EOF
#!${runtimeShell}
$out/AstroMenace --dir=$out
EOF
chmod 755 $out/bin/AstroMenace
'';
meta = with lib; {
description = "Hardcore 3D space shooter with spaceship upgrade possibilities";
homepage = "https://www.viewizard.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "AstroMenace";
};
}

View file

@ -0,0 +1,23 @@
{ lib, stdenv, fetchurl, allegro }:
stdenv.mkDerivation rec {
pname = "atanks";
version = "6.6";
src = fetchurl {
url = "mirror://sourceforge/project/atanks/atanks/${pname}-${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-vGse/J/H52JPrR2DUtcuknvg+6IWC7Jbtri9bGNwv0M=";
};
buildInputs = [ allegro ];
makeFlags = [ "PREFIX=$(out)/" "INSTALL=install" "CXX=g++" ];
meta = with lib; {
description = "Atomic Tanks ballistics game";
homepage = "http://atanks.sourceforge.net/";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
license = licenses.gpl2;
};
}

View file

@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, libpng }:
stdenv.mkDerivation rec {
pname = "augustus";
version = "3.1.0";
src = fetchFromGitHub {
owner = "Keriew";
repo = "augustus";
rev = "v${version}";
sha256 = "1axm4x3ca5r08sv1b4q8y9c15mkwqd3rnc8k09a2fn3plbk2p2j4";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ SDL2 SDL2_mixer libpng ];
meta = with lib; {
description = "An open source re-implementation of Caesar III. Fork of Julius incorporating gameplay changes";
homepage = "https://github.com/Keriew/augustus";
license = licenses.agpl3Only;
platforms = platforms.all;
broken = stdenv.isDarwin;
maintainers = with maintainers; [ Thra11 ];
};
}

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchFromGitHub, SDL, which, installTool ? false }:
stdenv.mkDerivation rec {
pname = "azimuth";
version = "1.0.3";
src = fetchFromGitHub {
owner = "mdsteele";
repo = "azimuth";
rev = "v${version}";
sha256 = "1znfvpmqiixd977jv748glk5zc4cmhw5813zp81waj07r9b0828r";
};
nativeBuildInputs = [ which ];
buildInputs = [ SDL ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
preConfigure = ''
substituteInPlace data/azimuth.desktop \
--replace Exec=azimuth "Exec=$out/bin/azimuth" \
--replace "Version=%AZ_VERSION_NUMBER" "Version=${version}"
'';
makeFlags = [
"BUILDTYPE=release"
"INSTALLDIR=$(out)"
] ++ (if installTool then ["INSTALLTOOL=true"] else ["INSTALLTOOL=false"]);
enableParallelBuilding = true;
meta = {
description = "A metroidvania game using only vectorial graphic";
longDescription = ''
Azimuth is a metroidvania game, and something of an homage to the previous
greats of the genre (Super Metroid in particular). You will need to pilot
your ship, explore the inside of the planet, fight enemies, overcome
obstacles, and uncover the storyline piece by piece. Azimuth features a
huge game world to explore, lots of little puzzles to solve, dozens of
weapons and upgrades to find and use, and a wide variety of enemies and
bosses to tangle with.
'';
license = lib.licenses.gpl3Plus;
homepage = "https://mdsteele.games/azimuth/index.html";
maintainers = with lib.maintainers; [ marius851000 ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,45 @@
{ fetchurl, lib, stdenv, SDL, SDL_image, SDL_mixer, SDL_ttf, guile, gettext }:
stdenv.mkDerivation rec {
pname = "ballandpaddle";
version = "0.8.1";
src = fetchurl {
url = "mirror://gnu/ballandpaddle/ballandpaddle-${version}.tar.gz";
sha256 = "0zgpydad0mj7fbkippw3n9hlda6nac084dq5xfbsks9jn1xd30ny";
};
buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf guile gettext ];
patches = [ ./getenv-decl.patch ];
preConfigure = ''
sed -i "Makefile.in" \
-e "s|desktopdir *=.*$|desktopdir = $out/share/applications|g ;
s|pixmapsdir *=.*$|pixmapsdir = $out/share/pixmaps|g"
'';
meta = {
description = "GNU Ball and Paddle, an old-fashioned ball and paddle game";
longDescription = ''
GNU Ball and Paddle is an old-fashioned ball and paddle game
with a set amount of blocks to destroy on each level, while
moving a paddle left and right at the bottom of the
screen. Various powerups may make different things occur.
It now uses GNU Guile for extension and the levels are written
with Guile. Follow the example level sets and the documentation.
'';
license = lib.licenses.gpl3Plus;
homepage = "https://www.gnu.org/software/ballandpaddle/";
maintainers = [ ];
platforms = lib.platforms.unix;
hydraPlatforms = lib.platforms.linux; # sdl-config times out on darwin
};
}

View file

@ -0,0 +1,13 @@
Make the getenv(3) declaration visible.
--- ballandpaddle-0.8.1/src/settingsmanager.cpp 2009-07-08 02:13:16.000000000 +0200
+++ ballandpaddle-0.8.1/src/settingsmanager.cpp 2009-07-16 23:30:28.000000000 +0200
@@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
+#include <stdlib.h>
#include "settingsmanager.h"
SettingsManager::SettingsManager ()

View file

@ -0,0 +1,55 @@
{ lib, stdenv, fetchurl, cmake, SDL, makeDesktopItem, copyDesktopItems
, imagemagick }:
let
icon = fetchurl {
url = "https://baller.tuxfamily.org/king.png";
sha256 = "1xq2h87s648wjpjl72ds3xnnk2jp8ghbkhjzh2g4hpkq2zdz90hy";
};
in stdenv.mkDerivation rec {
pname = "ballerburg";
version = "1.2.0";
src = fetchurl {
url = "https://download.tuxfamily.org/baller/ballerburg-${version}.tar.gz";
sha256 = "sha256-BiX0shPBGA8sshee8rxs41x+mdsrJzBqhpDDic6sYwA=";
};
nativeBuildInputs = [ cmake copyDesktopItems imagemagick ];
buildInputs = [ SDL ];
desktopItems = [
(makeDesktopItem {
name = "Ballerburg";
desktopName = "Ballerburg SDL";
exec = "_NET_WM_ICON=ballerburg ballerburg";
comment = meta.description;
icon = "ballerburg";
categories = [ "Game" ];
})
];
postInstall = ''
# Generate and install icon files
for size in 16 32 48 64 72 96 128 192 512 1024; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert ${icon} -sample "$size"x"$size" \
-background white -gravity south -extent "$size"x"$size" \
$out/share/icons/hicolor/"$size"x"$size"/apps/ballerburg.png
done
'';
meta = with lib; {
description = "Classic cannon combat game";
longDescription = ''
Two castles, separated by a mountain, try to defeat each other with their cannonballs,
either by killing the opponent's king or by weakening the opponent enough so that the king capitulates.'';
homepage = "https://baller.tuxfamily.org/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.j0hax ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "banner";
version = "1.3.5";
src = fetchFromGitHub {
owner = "pronovic";
repo = "banner";
rev = "BANNER_V${version}";
sha256 = "ISSnGzrFSzSj/+KxgeFtaw4H+4Ea5x5S5C8xjcjKWqQ=";
};
meta = with lib; {
homepage = "https://github.com/pronovic/banner";
description = "Print large banners to ASCII terminals";
license = licenses.gpl2Only;
longDescription = ''
An implementation of the traditional Unix-program used to display
large characters.
'';
platforms = platforms.all;
maintainers = with maintainers; [ pSub ];
};
}

View file

@ -0,0 +1,45 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, boost }:
stdenv.mkDerivation rec {
pname = "bastet";
version = "0.43.2";
buildInputs = [ ncurses boost ];
src = fetchFromGitHub {
owner = "fph";
repo = "bastet";
rev = version;
sha256 = "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn";
};
patches = [
# Compatibility with new Boost
(fetchpatch {
url = "https://github.com/fph/bastet/commit/0e03f8d4d6bc6949cf1c447e632ce0d1b98c4be1.patch";
sha256 = "1475hisbm44jirsrhdlnddppsyn83xmvcx09gfkm9drcix05alzj";
})
# Fix pending upstream inclusion for ncurses-6.3:
# https://github.com/fph/bastet/pull/21
(fetchpatch {
name = "ncurses-6.3.patch";
url = "https://github.com/fph/bastet/commit/54a6d127351ea2c62f50efafe97c5b02e23e86a7.patch";
sha256 = "14v95b0m16m6ycd82i3wpp81kbmj6qz029b1m5483dkk6mwz98iy";
})
];
installPhase = ''
mkdir -p "$out"/bin
cp bastet "$out"/bin/
mkdir -p "$out"/share/man/man6
cp bastet.6 "$out"/share/man/man6
'';
meta = with lib; {
description = "Tetris clone with 'bastard' block-choosing AI";
homepage = "http://fph.altervista.org/prog/bastet.html";
license = licenses.gpl3;
maintainers = [ maintainers.dezgeg ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,48 @@
diff -Naur beret-beret-orig/game.c beret-beret/game.c
--- beret-beret-orig/game.c 2011-12-17 18:51:32.000000000 -0500
+++ beret-beret/game.c 2011-12-21 13:16:37.047511020 -0500
@@ -10,12 +10,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#ifdef __APPLE__
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <pwd.h>
-#endif
#define CAMSCROLL 15
#define SCR_WIDTH 780
@@ -88,12 +86,8 @@
#define DIRSEP "/"
#endif
-#ifdef __APPLE__
-#define SUPPORT_PATH "Library/Application Support/Beret/"
-#define RESOURCE_PATH "Beret.app/Contents/Resources/"
-#else
+#define SUPPORT_PATH ".beret"
#define RESOURCE_PATH ""
-#endif
#define QUITMOD_WIN KMOD_ALT
#define QUITKEY_WIN SDLK_F4
@@ -812,7 +806,6 @@
int init() {
- #ifdef __APPLE__
char filestr[512];
// Get the home directory of the user.
struct passwd *pwd = getpwuid(getuid());
@@ -827,9 +820,6 @@
sprintf(filestr, "%s/saves", support_path);
mkdir(filestr, S_IRWXU);
}
- #else
- sprintf(support_path, "");
- #endif
if (SDL_Init(SDL_INIT_EVERYTHING) == -1) {
printf("Error: couldn't initialize SDL\n");

View file

@ -0,0 +1,30 @@
{
stdenv, lib, fetchurl,
cmake, perl, pkg-config, python3,
rinutils, PathTiny,
}:
stdenv.mkDerivation rec {
pname = "black-hole-solver";
version = "1.12.0";
meta = with lib; {
homepage = "https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/";
description = "A solver for Solitaire variants Golf, Black Hole, and All in a Row.";
license = licenses.mit;
};
src = fetchurl {
url = "https://fc-solve.shlomifish.org/downloads/fc-solve/${pname}-${version}.tar.xz";
sha256 = "sha256-0y8yU291cykliPQbsNha5C1WE3bCGNxKtrrf5JBKN6c=";
};
nativeBuildInputs = [ cmake perl pkg-config python3 ];
buildInputs = [ rinutils PathTiny ];
prePatch = ''
patchShebangs ./scripts
'';
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromSourcehut
, zig, glfw, libGLU, libGL, openal, libsndfile }:
stdenv.mkDerivation rec {
pname = "blackshades";
version = "2.4.9";
src = fetchFromSourcehut {
owner = "~cnx";
repo = pname;
rev = version;
fetchSubmodules = true;
sha256 = "sha256-Hg+VcWI28GzY/CPm1lUftP0RGztOnzizrKJQVTmeJ9I=";
};
nativeBuildInputs = [ zig ];
buildInputs = [ glfw libGLU libGL openal libsndfile ];
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
zig build -Drelease-fast -Dcpu=baseline --prefix $out install
'';
meta = {
homepage = "https://sr.ht/~cnx/blackshades";
description = "A psychic bodyguard FPS";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ McSinyx viric ];
platforms = with lib.platforms; linux;
};
}

View file

@ -0,0 +1,81 @@
{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, alsa-lib, openssl
, withTTS ? false, llvmPackages, speechd }:
rustPlatform.buildRustPackage rec {
pname = "blightmud";
version = "3.5.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-DaICzwBew90YstV42wiY0IbvR1W4Hm8dzo3xY2qlMGQ=";
};
cargoSha256 = "sha256-BamMTPh+GN9GG4puxyTauPhjCC8heCu1wsgFaw98s9U=";
buildFeatures = lib.optional withTTS "tts";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib openssl ] ++ lib.optional withTTS [ speechd ];
# Building the speech-dispatcher-sys crate for TTS support requires setting
# LIBCLANG_PATH.
LIBCLANG_PATH = lib.optionalString withTTS "${llvmPackages.libclang.lib}/lib";
preBuild = lib.optionalString withTTS ''
# When building w/ TTS the speech-dispatcher-sys crate's build.rs uses
# rust-bindgen with libspeechd. This bypasses the normal nixpkgs CC wrapper
# so we have to adapt the BINDGEN_EXTRA_CLANG_ARGS env var to compensate. See
# this blog post[0] for more information.
#
# [0]: https://hoverbear.org/blog/rust-bindgen-in-nix/
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \
$(< ${stdenv.cc}/nix-support/cc-cflags) \
-isystem ${llvmPackages.libclang.lib}/lib/clang/${
lib.getVersion llvmPackages.clang
}/include \
-idirafter ${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/${
lib.getVersion stdenv.cc.cc
}/include \
-idirafter ${speechd}/include"
'';
checkFlags = let
# Most of Blightmud's unit tests pass without trouble in the isolated
# Nixpkgs build env. The following tests need to be skipped.
skipList = [
"test_connect"
"test_gmcp_negotiation"
"test_ttype_negotiation"
"test_reconnect"
"test_mud"
"test_server"
"test_lua_script"
"timer_test"
"validate_assertion_fail"
];
skipFlag = test: "--skip " + test;
in builtins.concatStringsSep " " (builtins.map skipFlag skipList);
meta = with lib; {
description = "A terminal MUD client written in Rust";
longDescription = ''
Blightmud is a terminal client for connecting to Multi User Dungeon (MUD)
games. It is written in Rust and supports TLS, GMCP, MSDP, MCCP2, tab
completion, text searching and a split view for scrolling. Blightmud can
be customized with Lua scripting for aliases, triggers, timers, customized
status bars, and more. Blightmud supports several accessibility features
including an optional built-in text-to-speech engine and a screen reader
friendly mode.
'';
homepage = "https://github.com/Blightmud/Blightmud";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ cpu ];
platforms = platforms.linux;
# See https://github.com/NixOS/nixpkgs/pull/160120
broken = withTTS;
};
}

View 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

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl, SDL2, SDL2_image, libGLU, libGL, cmake, physfs, boost, zip, zlib, pkg-config }:
stdenv.mkDerivation rec {
pname = "blobby-volley";
version = "1.0";
src = fetchurl {
url = "mirror://sourceforge/blobby/Blobby%20Volley%202%20%28Linux%29/1.0/blobby2-linux-1.0.tar.gz";
sha256 = "1qpmbdlyhfbrdsq4vkb6cb3b8mh27fpizb71q4a21ala56g08yms";
};
nativeBuildInputs = [ cmake pkg-config zip ];
buildInputs = [ SDL2 SDL2_image libGLU libGL physfs boost zlib ];
preConfigure=''
sed -e '1i#include <iostream>' -i src/NetworkMessage.cpp
'';
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 = with lib; {
description = "A blobby volleyball game";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ raskin ];
homepage = "http://blobby.sourceforge.net/";
downloadPage = "https://sourceforge.net/projects/blobby/files/Blobby%20Volley%202%20%28Linux%29/";
};
}

View file

@ -0,0 +1,34 @@
{ stdenv, lib, fetchurl, pkg-config, gettext, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf, zlib }:
stdenv.mkDerivation rec {
pname = "blobwars";
version = "2.00";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
};
nativeBuildInputs = [ pkg-config gettext ];
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
makeFlags = [ "PREFIX=$(out)" "RELEASE=1" ];
postInstall = ''
install -Dm755 $out/games/blobwars -t $out/bin
rm -r $out/games
cp -r {data,gfx,sound,music} $out/share/games/blobwars/
# fix world readable bit
find $out/share/games/blobwars/. -type d -exec chmod 755 {} +
find $out/share/games/blobwars/. -type f -exec chmod 644 {} +
'';
meta = with lib; {
description = "Platform action game featuring a blob with lots of weapons";
homepage = "https://www.parallelrealities.co.uk/games/metalBlobSolid/";
license = with licenses; [ gpl2Plus free ];
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,58 @@
{ lib
, stdenv
, fetchFromGitHub
, SDL2
, SDL2_image
, SDL2_mixer
, SDL2_ttf
, boost
, cmake
, gettext
, physfs
, pkg-config
, zip
}:
stdenv.mkDerivation rec {
pname = "blockattack";
version = "2.8.0";
src = fetchFromGitHub {
owner = "blockattack";
repo = "blockattack-game";
rev = "v${version}";
hash = "sha256-2oKesdr2eNZhDlGrFRiH5/8APFkGJfxPCNvzFoIumdQ=";
};
nativeBuildInputs = [
cmake
pkg-config
gettext
zip
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
SDL2_ttf
boost
physfs
];
preConfigure = ''
patchShebangs packdata.sh source/misc/translation/*.sh
chmod +x ./packdata.sh
./packdata.sh
'';
meta = with lib; {
homepage = "https://blockattack.net/";
description = "An open source clone of Panel de Pon (aka Tetris Attack)";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,32 @@
{lib, fetchurl, buildGoPackage}:
buildGoPackage rec {
pname = "boohu";
version = "0.13.0";
goPackagePath = "git.tuxfamily.org/boohu/boohu.git";
src = fetchurl {
url = "https://download.tuxfamily.org/boohu/downloads/${pname}-${version}.tar.gz";
sha256 = "0q89yv4klldjpli6y9xpyr6k8nsn7qa68gp90vb3dgxynn91sh68";
};
goDeps = ./deps.nix;
postInstall = "mv $out/bin/boohu.git $out/bin/boohu";
meta = with lib; {
description = "A new coffee-break roguelike game";
longDescription = ''
Break Out Of Hareka's Underground (Boohu) is a roguelike game mainly
inspired from DCSS and its tavern, with some ideas from Brogue, but
aiming for very short games, almost no character building, and a
simplified inventory.
'';
homepage = "https://download.tuxfamily.org/boohu/index.html";
license = licenses.isc;
platforms = platforms.unix;
maintainers = with maintainers; [];
};
}

20
pkgs/games/boohu/deps.nix generated Normal file
View file

@ -0,0 +1,20 @@
[
{
goPackagePath = "github.com/nsf/termbox-go";
fetch = {
type = "git";
url = "https://github.com/nsf/termbox-go";
rev = "93860e16131719fa9722e7c448dbf8c0e3210a0d";
sha256 = "03hz060cy8qrl4kgr80pbq6xvr38z4c6ghr3y81i8g854rvp6426";
};
}
{
goPackagePath = "github.com/mattn/go-runewidth";
fetch = {
type = "git";
url = "https://github.com/mattn/go-runewidth";
rev = "f93a0d58d5fd95e53f82782d07bb0c79d23e1290";
sha256 = "1sq97q71vgwnbg1fphsmqrzkbfn6mjal6d8a3qgwv4nbgppwaz25";
};
}
]

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchFromGitHub, ncurses }:
stdenv.mkDerivation rec {
pname = "braincurses";
version = "1.1.0";
src = fetchFromGitHub {
owner = "bderrly";
repo = "braincurses";
rev = version;
sha256 = "0gpny9wrb0zj3lr7iarlgn9j4367awj09v3hhxz9r9a6yhk4anf5";
};
buildInputs = [ ncurses ];
# There is no install target in the Makefile
installPhase = ''
install -Dt $out/bin braincurses
'';
meta = with lib; {
homepage = "https://github.com/bderrly/braincurses";
description = "A version of the classic game Mastermind";
license = licenses.gpl2;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchurl, fetchpatch, SDL, ncurses, libtcod, makeDesktopItem }:
stdenv.mkDerivation rec {
pname = "brogue";
version = "1.7.5";
src = fetchurl {
url = "https://sites.google.com/site/broguegame/brogue-${version}-linux-amd64.tbz2";
sha256 = "0i042zb3axjf0cpgpdh8hvfn66dbfizidyvw0iymjk2n760z2kx7";
};
patches = [
# Pull upstream fix for -fno-common toolchains:
# https://github.com/tmewett/BrogueCE/pull/63
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/tmewett/BrogueCE/commit/2c7ed0c48d9efd06bf0a2589ba967c0a22a8fa87.patch";
sha256 = "19lr2fa25dh79klm4f4kqyyqq7w5xmw9z0fvylkcckqvcv7dwhp3";
})
];
prePatch = ''
sed -i Makefile -e 's,LIBTCODDIR=.*,LIBTCODDIR=${libtcod},g' \
-e 's,sdl-config,${lib.getDev SDL}/bin/sdl-config,g'
sed -i src/platform/tcod-platform.c -e "s,fonts/font,$out/share/brogue/fonts/font,g"
make clean
rm -rf src/libtcod*
'';
buildInputs = [ SDL ncurses libtcod ];
desktopItem = makeDesktopItem {
name = "brogue";
desktopName = "Brogue";
genericName = "Roguelike";
comment = "Brave the Dungeons of Doom!";
icon = "brogue";
exec = "brogue";
categories = [ "Game" "AdventureGame" ];
};
installPhase = ''
install -m 555 -D bin/brogue $out/bin/brogue
install -m 444 -D ${desktopItem}/share/applications/brogue.desktop $out/share/applications/brogue.desktop
install -m 444 -D bin/brogue-icon.png $out/share/icons/hicolor/256x256/apps/brogue.png
mkdir -p $out/share/brogue
cp -r bin/fonts $out/share/brogue/
'';
# fix crash; shouldnt be a security risk because its an offline game
hardeningDisable = [ "stackprotector" "fortify" ];
meta = with lib; {
description = "A roguelike game";
homepage = "https://sites.google.com/site/broguegame/";
license = licenses.agpl3;
maintainers = [ maintainers.skeidel ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, fetchFromSourcehut, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "brutalmaze";
version = "1.1.1";
format = "flit";
disabled = python3Packages.pythonOlder "3.7";
src = fetchFromSourcehut {
owner = "~cnx";
repo = pname;
rev = version;
sha256 = "1m105iq378mypj64syw59aldbm6bj4ma4ynhc50gafl656fabg4y";
};
propagatedBuildInputs = with python3Packages; [
loca
palace
pygame
];
doCheck = false; # there's no test
meta = with lib; {
description = "Minimalist thrilling shoot 'em up game";
homepage = "https://brutalmaze.rtfd.io";
license = licenses.agpl3Plus;
maintainers = [ maintainers.McSinyx ];
};
}

View file

@ -0,0 +1,69 @@
{ lib, stdenv, fetchurl, ncurses, openssl, flex, bison, less, miscfiles }:
stdenv.mkDerivation rec {
pname = "bsd-games";
version = "2.17";
src = fetchurl {
url = "mirror://ibiblioPubLinux/games/${pname}-${version}.tar.gz";
hash = "sha256-Bm+SSu9sHF6pRvWI428wMCH138CTlEc48CXY7bxv/2A=";
};
buildInputs = [ ncurses openssl flex bison ];
patches = [
# Remove UTMPX support on Makefrag file
(fetchurl {
url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/dm-noutmpx.patch";
sha256 = "1k3qp3jj0dksjr4dnppv6dvkwslrgk9c7p2n9vipqildpxgqp7w2";
})
];
hardeningDisable = [ "format" ];
makeFlags = [ "STRIP=" ];
preConfigure = ''
cat > config.params << EOF
bsd_games_cfg_man6dir=$out/share/man/man6
bsd_games_cfg_man8dir=$out/share/man/man8
bsd_games_cfg_man5dir=$out/share/man/man5
bsd_games_cfg_wtf_acronymfile=$out/share/misc/acronyms
bsd_games_cfg_fortune_dir=$out/share/games/fortune
bsd_games_cfg_quiz_dir=$out/share/games/quiz
bsd_games_cfg_gamesdir=$out/bin
bsd_games_cfg_sbindir=$out/bin
bsd_games_cfg_usrbindir=$out/bin
bsd_games_cfg_libexecdir=$out/lib/games/dm
bsd_games_cfg_docdir=$out/share/doc/bsd-games
bsd_games_cfg_sharedir=$out/share/games
bsd_games_cfg_varlibdir=.
bsd_games_cfg_non_interactive=y
bsd_games_cfg_no_build_dirs="dab hack phantasia sail"
bsd_games_cfg_dictionary_src=${miscfiles}/share/web2
bsd_games_cfg_pager=${less}
EOF
sed -e s/getline/bsdgames_local_getline/g -i $(grep getline -rl .)
'';
postConfigure = ''
sed -i -e 's,/usr,'$out, \
-e "s,-o root -g root, ," \
-e "s,-o root -g games, ," \
-e "s,.*chown.*,true," \
-e 's/INSTALL_VARDATA.*/INSTALL_VARDATA := true/' \
-e 's/INSTALL_HACKDIR.*/INSTALL_HACKDIR := true/' \
-e 's/INSTALL_DM.*/INSTALL_DM := true/' \
-e 's/INSTALL_SCORE_FILE.*/INSTALL_SCORE_FILE := true/' \
Makeconfig install-man
'';
meta = {
homepage = "http://www.t2-project.org/packages/bsd-games.html";
description = "Ports of all the games from NetBSD-current that are free";
license = lib.licenses.free;
maintainers = with lib.maintainers; [viric];
platforms = with lib.platforms; linux;
};
}

View file

@ -0,0 +1,43 @@
{ lib, stdenv, fetchurl, fetchpatch, sconsPackages, pkg-config, SDL, libGL, zlib, smpeg
, SDL_image, libvorbis, expat, zip, lua }:
stdenv.mkDerivation rec {
pname = "btanks";
version = "0.9.8083";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
sha256 = "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz";
};
nativeBuildInputs = [ sconsPackages.scons_3_0_1 pkg-config ];
buildInputs = [ SDL libGL zlib smpeg SDL_image libvorbis expat zip lua ];
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL";
patches = [
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/lua52.patch?h=btanks";
sha256 = "0ip563kz6lhwiims5djrxq3mvb7jx9yzkpsqxxhbi9n6qzz7y2az";
name = "lua52.patch";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/raw/master/debian/patches/gcc-4.7.patch";
sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/raw/master/debian/patches/pow10f.patch";
sha256 = "1h45790v2dpdbccfn6lwfgl8782q54i14cz9gpipkaghcka4y0g9";
})
];
meta = with lib; {
description = "Fast 2d tank arcade game";
homepage = "https://sourceforge.net/projects/btanks/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,65 @@
{ lib, stdenv, fetchFromGitHub, SDL2, IOKit, Foundation, cmake, makeWrapper }:
stdenv.mkDerivation rec {
pname = "bugdom";
version = "1.3.1";
src = fetchFromGitHub {
owner = "jorio";
repo = pname;
rev = version;
sha256 = "sha256:1371inw11rzfrxmc3v4gv5axp56bxjbcr0mhqm4x839401bfq5mf";
fetchSubmodules = true;
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Expects SDL2.framework in specific location, which we don't have
# Passing this in cmakeFlags doesn't work because the path is hard-coded for Darwin
substituteInPlace cmake/FindSDL2.cmake \
--replace 'set(SDL2_LIBRARIES' 'set(SDL2_LIBRARIES "${SDL2}/lib/libSDL2.dylib") #'
'';
buildInputs = [
SDL2
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
];
nativeBuildInputs = [
cmake
makeWrapper
];
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
# Expects SDL2.framework in specific location, which we don't have
"-DSDL2_INCLUDE_DIRS=${SDL2.dev}/include/SDL2"
];
installPhase = ''
runHook preInstall
'' + (if stdenv.hostPlatform.isDarwin then ''
mkdir -p $out/{bin,Applications}
mv {,$out/Applications/}Bugdom.app
ln -s $out/{Applications/Bugdom.app/Contents/MacOS,bin}/Bugdom
'' else ''
mkdir -p $out/share/bugdom
mv Data $out/share/bugdom
install -Dm755 {.,$out/bin}/Bugdom
wrapProgram $out/bin/Bugdom --run "cd $out/share/bugdom"
'') + ''
runHook postInstall
'';
meta = with lib; {
description = "A port of Bugdom, a 1999 Macintosh game by Pangea Software, for modern operating systems";
homepage = "https://github.com/jorio/Bugdom";
license = with licenses; [ cc-by-sa-40 ];
maintainers = with maintainers; [ lux ];
mainProgram = "Bugdom";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,25 @@
{ stdenv, lib, fetchurl, pkg-config
, curl, SDL2, libGLU, libGL, glew, ncurses, c-ares
, Carbon, CoreServices }:
stdenv.mkDerivation rec {
pname = "bzflag";
version = "2.4.24";
src = fetchurl {
url = "https://download.bzflag.org/${pname}/source/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-X4Exvrf8i6UeMjoG7NfY6rkVN8NCzoehE+XrbqmM48Q=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ curl SDL2 libGLU libGL glew ncurses c-ares ]
++ lib.optionals stdenv.isDarwin [ Carbon CoreServices ];
meta = with lib; {
description = "Multiplayer 3D Tank game";
homepage = "https://bzflag.org/";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
};
}

View file

@ -0,0 +1,49 @@
{ stdenvNoCC, lib, type }:
assert lib.elem type [
"mod"
"soundpack"
"tileset"
];
{ modName, version, src, ... } @ args:
stdenvNoCC.mkDerivation (args // rec {
pname = args.pname or "cataclysm-dda-${type}-${modName}";
modRoot = args.modRoot or ".";
configurePhase = args.configurePhase or ''
runHook preConfigure
runHook postConfigure
'';
buildPhase = args.buildPhase or ''
runHook preBuild
runHook postBuild
'';
checkPhase = args.checkPhase or ''
runHook preCheck
runHook postCheck
'';
installPhase = let
baseDir = {
mod = "mods";
soundpack = "sound";
tileset = "gfx";
}.${type};
in args.installPhase or ''
runHook preInstall
destdir="$out/share/cataclysm-dda/${baseDir}"
mkdir -p "$destdir"
cp -R "${modRoot}" "$destdir/${modName}"
runHook postInstall
'';
passthru = {
forTiles = true;
forCurses = type == "mod";
};
})

View file

@ -0,0 +1,108 @@
{ lib, stdenv, runtimeShell, pkg-config, gettext, ncurses, CoreFoundation
, tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa
, debug
, useXdgDir
}:
let
inherit (lib) optionals optionalString;
cursesDeps = [ gettext ncurses ]
++ optionals stdenv.isDarwin [ CoreFoundation ];
tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ]
++ optionals stdenv.isDarwin [ Cocoa ];
patchDesktopFile = ''
substituteInPlace $out/share/applications/org.cataclysmdda.CataclysmDDA.desktop \
--replace "Exec=cataclysm-tiles" "Exec=$out/bin/cataclysm-tiles"
'';
installMacOSAppLauncher = ''
app=$out/Applications/Cataclysm.app
install -D -m 444 build-data/osx/Info.plist -t $app/Contents
install -D -m 444 build-data/osx/AppIcon.icns -t $app/Contents/Resources
mkdir $app/Contents/MacOS
launcher=$app/Contents/MacOS/Cataclysm.sh
cat << EOF > $launcher
#!${runtimeShell}
$out/bin/cataclysm-tiles
EOF
chmod 555 $launcher
'';
in
stdenv.mkDerivation {
pname = "cataclysm-dda";
nativeBuildInputs = [ pkg-config ];
buildInputs = cursesDeps ++ optionals tiles tilesDeps;
postPatch = ''
patchShebangs .
# Locale patch required for Darwin builds, see:
# https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970
sed -i src/translations.cpp \
-e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@'
'';
makeFlags = [
"PREFIX=$(out)" "LANGUAGES=all" "RUNTESTS=0"
(if useXdgDir then "USE_XDG_DIR=1" else "USE_HOME_DIR=1")
] ++ optionals (!debug) [
"RELEASE=1"
] ++ optionals tiles [
"TILES=1" "SOUND=1"
] ++ optionals stdenv.isDarwin [
"NATIVE=osx"
"CLANG=1"
"OSX_MIN=${stdenv.targetPlatform.darwinMinVersion}"
];
postInstall = optionalString tiles
( if !stdenv.isDarwin
then patchDesktopFile
else installMacOSAppLauncher
);
dontStrip = debug;
enableParallelBuilding = true;
passthru = {
isTiles = tiles;
isCurses = !tiles;
};
meta = with lib; {
description = "A free, post apocalyptic, zombie infested rogue-like";
longDescription = ''
Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
Surviving is difficult: you have been thrown, ill-equipped, into a
landscape now riddled with monstrosities of which flesh eating zombies are
neither the strangest nor the deadliest.
Yet with care and a little luck, many things are possible. You may try to
eke out an existence in the forests silently executing threats and
providing sustenance with your longbow. You can ride into town in a
jerry-rigged vehicle, all guns blazing, to settle matters in a fug of
smoke from your molotovs. You could take a more measured approach and
construct an impregnable fortress, surrounded by traps to protect you from
the horrors without. The longer you survive, the more skilled and adapted
you will get and the better equipped and armed to deal with the threats
you are presented with.
In the course of your ordeal there will be opportunities and temptations
to improve or change your very nature. There are tales of survivors fitted
with extraordinary cybernetics giving great power and stories too of
gravely mutated survivors who, warped by their ingestion of exotic
substances or radiation, now more closely resemble insects, birds or fish
than their original form.
'';
homepage = "https://cataclysmdda.org/";
license = licenses.cc-by-sa-30;
maintainers = with maintainers; [ mnacamura DeeUnderscore ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,43 @@
{ newScope, darwin }:
let
callPackage = newScope self;
stable = rec {
tiles = callPackage ./stable.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa;
};
curses = tiles.override { tiles = false; };
};
git = rec {
tiles = callPackage ./git.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa;
};
curses = tiles.override { tiles = false; };
};
lib = callPackage ./lib.nix {};
pkgs = callPackage ./pkgs {};
self = {
inherit
callPackage
stable
git;
inherit (lib)
buildMod
buildSoundPack
buildTileSet
wrapCDDA
attachPkgs;
inherit pkgs;
};
in
self

View file

@ -0,0 +1,38 @@
{ stdenv, lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA, attachPkgs
, tiles ? true, Cocoa
, debug ? false
, useXdgDir ? false
, version ? "2021-07-03"
, rev ? "9017808252e1e149446c8f8bd7a6582ce0f95285"
, sha256 ? "0qrvkbyg098jb9hv69sg5093b1vj8f4n75p73v01jnmyxlz3ax28"
}:
let
common = callPackage ./common.nix {
inherit CoreFoundation tiles Cocoa debug useXdgDir;
};
self = common.overrideAttrs (common: rec {
pname = common.pname + "-git";
inherit version;
src = fetchFromGitHub {
owner = "CleverRaven";
repo = "Cataclysm-DDA";
inherit rev sha256;
};
makeFlags = common.makeFlags ++ [
"VERSION=git-${version}-${lib.substring 0 8 src.rev}"
];
meta = common.meta // {
maintainers = with lib.maintainers;
common.meta.maintainers ++ [ rardiol ];
# /nix/store/s8xaq3x7mcysvd752in2nihb1nr6svsl-SDL2-2.0.20-dev/include/SDL2/SDL_events.h:645:65: error: use of old-style cast [-Werror,-Wold-style-cast]
broken = (stdenv.isDarwin && stdenv.isx86_64);
};
});
in
attachPkgs pkgs self

View file

@ -0,0 +1,46 @@
{ callPackage }:
rec {
buildMod = callPackage ./builder.nix {
type = "mod";
};
buildSoundPack = callPackage ./builder.nix {
type = "soundpack";
};
buildTileSet = callPackage ./builder.nix {
type = "tileset";
};
wrapCDDA = callPackage ./wrapper.nix {};
# Required to fix `pkgs` and `withMods` attrs after applying `overrideAttrs`.
#
# Example:
# let
# myBuild = cataclysmDDA.jenkins.latest.tiles.overrideAttrs (_: {
# x = "hello";
# });
#
# # This refers to the derivation before overriding! So, `badExample.x` is not accessible.
# badExample = myBuild.withMods (_: []);
#
# # `myBuild` is correctly referred by `withMods` and `goodExample.x` is accessible.
# goodExample = let
# inherit (cataclysmDDA) attachPkgs pkgs;
# in
# (attachPkgs pkgs myBuild).withMods (_: []);
# in
# goodExample.x # returns "hello"
attachPkgs = pkgs: super:
let
self = super.overrideAttrs (old: {
passthru = old.passthru // {
pkgs = pkgs.override { build = self; };
withMods = wrapCDDA self;
};
});
in
self;
}

View file

@ -0,0 +1,29 @@
{ lib, callPackage, build ? null }:
let
pkgs = {
mod = {
};
soundpack = {
};
tileset = {
UndeadPeople = callPackage ./tilesets/UndeadPeople {};
};
};
pkgs' = lib.mapAttrs (_: mods: lib.filterAttrs isAvailable mods) pkgs;
isAvailable = _: mod:
if isNull build then
true
else if build.isTiles then
mod.forTiles or false
else if build.isCurses then
mod.forCurses or false
else
false;
in
lib.makeExtensible (_: pkgs')

View file

@ -0,0 +1,23 @@
{ lib, buildTileSet, fetchFromGitHub }:
buildTileSet {
modName = "UndeadPeople";
version = "2020-07-08";
src = fetchFromGitHub {
owner = "SomeDeadGuy";
repo = "UndeadPeopleTileset";
rev = "f7f13b850fafe2261deee051f45d9c611a661534";
sha256 = "0r06srjr7rq51jk9yfyxz80nfgb98mkn86cbcjfxpibgbqvcp0zm";
};
modRoot = "MSX++UnDeadPeopleEdition";
meta = with lib; {
description = "Cataclysm DDA tileset based on MSX++ tileset";
homepage = "https://github.com/SomeDeadGuy/UndeadPeopleTileset";
license = licenses.unfree;
maintainers = with maintainers; [ mnacamura ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,34 @@
{ lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA, attachPkgs
, tiles ? true, Cocoa
, debug ? false
, useXdgDir ? false
}:
let
common = callPackage ./common.nix {
inherit CoreFoundation tiles Cocoa debug useXdgDir;
};
self = common.overrideAttrs (common: rec {
version = "0.F-3";
src = fetchFromGitHub {
owner = "CleverRaven";
repo = "Cataclysm-DDA";
rev = version;
sha256 = "sha256-2su1uQaWl9WG41207dRvOTdVKcQsEz/y0uTi9JX52uI=";
};
makeFlags = common.makeFlags ++ [
# Makefile declares version as 0.F, with no minor release number
"VERSION=${version}"
];
meta = common.meta // {
maintainers = with lib.maintainers;
common.meta.maintainers ++ [ skeidel ];
};
});
in
attachPkgs pkgs self

View file

@ -0,0 +1,47 @@
{ lib, symlinkJoin, makeWrapper }:
unwrapped:
pkgsSpec:
let
mods = if lib.isFunction pkgsSpec
then pkgsSpec unwrapped.pkgs
else pkgsSpec;
in
if builtins.length mods == 0
then unwrapped
else symlinkJoin {
name = unwrapped.name + "-with-mods";
paths = [ unwrapped ] ++ mods;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
if [ -x $out/bin/cataclysm ]; then
wrapProgram $out/bin/cataclysm \
--add-flags "--datadir $out/share/cataclysm-dda/"
fi
if [ -x $out/bin/cataclysm-tiles ]; then
wrapProgram $out/bin/cataclysm-tiles \
--add-flags "--datadir $out/share/cataclysm-dda/"
fi
# Launch the wrapped program
replaceProgram() {
cp "$1" "''${1}.bk"
unlink "$1"
mv "''${1}.bk" "$1"
sed -i "$1" -e "s,/nix/store/.\+\(/bin/cataclysm-tiles\),$out\1,"
}
for script in "$out/share/applications/cataclysm-dda.desktop" \
"$out/Applications/Cataclysm.app/Contents/MacOS/Cataclysm.sh"
do
if [ -e "$script" ]; then
replaceProgram "$script"
fi
done
'';
}

View file

@ -0,0 +1,29 @@
{ stdenv, lib, fetchFromGitLab, ncurses, pkg-config, nix-update-script, scdoc }:
stdenv.mkDerivation rec {
pname = "cbonsai";
version = "1.3.1";
src = fetchFromGitLab {
owner = "jallbrit";
repo = pname;
rev = "v${version}";
sha256 = "sha256-XFK6DiIb8CzVubTnEMkqRW8xZkX/SWjUsrfS+I7LOs8=";
};
nativeBuildInputs = [ pkg-config scdoc ];
buildInputs = [ ncurses ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installFlags = [ "PREFIX=$(out)" ];
passthru.updateScript = nix-update-script { attrPath = pname; };
meta = with lib; {
description = "Grow bonsai trees in your terminal";
homepage = "https://gitlab.com/jallbrit/cbonsai";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ manveru ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,56 @@
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, SDL2
, SDL2_image
, SDL2_mixer
, cmake
, gtk3-x11
, python3
, protobuf
}:
stdenv.mkDerivation rec {
pname = "cdogs";
version = "0.13.0";
src = fetchFromGitHub {
repo = "cdogs-sdl";
owner = "cxong";
rev = version;
sha256 = "sha256-7wNiDA/gOpqzSFWw8Bn6suC/f5RXdDTxPV49nCvOxas=";
};
postPatch = ''
patchShebangs src/proto/nanopb/generator/*
'';
cmakeFlags = [
"-DCDOGS_DATA_DIR=${placeholder "out"}/"
"-DCMAKE_C_FLAGS=-Wno-error=array-bounds"
];
nativeBuildInputs = [
pkg-config
cmake
(python3.withPackages (pp: with pp; [ pp.protobuf setuptools ]))
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
gtk3-x11
protobuf
];
meta = with lib; {
homepage = "https://cxong.github.io/cdogs-sdl";
description = "Open source classic overhead run-and-gun game";
license = licenses.gpl2Only;
maintainers = with maintainers; [ nixinator ];
platforms = platforms.unix;
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/cdogs-sdl.x86_64-darwin
};
}

View file

@ -0,0 +1,39 @@
{ lib
, stdenv
, writers
, adoptopenjdk-jre-bin
, fetchurl
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "cgoban";
version = "3.5.23";
nativeBuildInputs = [ adoptopenjdk-jre-bin makeWrapper ];
src = fetchurl {
url = "https://web.archive.org/web/20210116034119/https://files.gokgs.com/javaBin/cgoban.jar";
sha256 = "0srw1hqr9prgr9dagfbh2j6p9ivaj40kdpyhs6zjkg7lhnnrrrcv";
};
dontConfigure = true;
dontUnpack = true;
dontBuild = true;
dontPatchELF = true;
installPhase = ''
runHook preInstall
install -D $src $out/lib/cgoban.jar
makeWrapper ${adoptopenjdk-jre-bin}/bin/java $out/bin/cgoban --add-flags "-jar $out/lib/cgoban.jar"
runHook postInstall
'';
meta = with lib; {
description = "Client for the KGS Go Server";
homepage = "https://www.gokgs.com/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.free;
maintainers = with maintainers; [ savannidgerinel ];
platforms = adoptopenjdk-jre-bin.meta.platforms;
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl, tcl, tk, libX11, makeWrapper }:
stdenv.mkDerivation rec {
pname = "chessdb";
version = "3.6.19-beta-1";
src = fetchurl {
url = "mirror://sourceforge/chessdb/ChessDB-${version}.tar.gz";
sha256 = "0brc3wln3bxp979iqj2w1zxpfd0pch8zzazhdmwf7acww4hrsz62";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ tcl tk libX11 ];
makeFlags = [
"BINDIR=$(out)/bin"
"SHAREDIR=$(out)/share/chessdb"
"SOUNDSDIR=$(out)/share/chessdb/sounds"
"TBDIR=$(out)/share/chessdb/tablebases"
"MANDIR=$(out)/man"
];
postInstall = ''
wrapProgram $out/bin/chessdb --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
'';
meta = {
homepage = "http://chessdb.sourceforge.net/";
description = "A free chess database";
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,56 @@
{ mkDerivation
, lib
, pkg-config
, zlib
, qtbase
, qtsvg
, qttools
, qtmultimedia
, qmake
, fetchurl
}:
mkDerivation rec {
pname = "chessx";
version = "1.5.7";
src = fetchurl {
url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
sha256 = "sha256-wadIO3iNvj8LgIzExHTmeXxXnWOI+ViLrdhAlzZ79Jw=";
};
nativeBuildInputs = [
pkg-config
qmake
];
buildInputs = [
qtbase
qtmultimedia
qtsvg
qttools
zlib
];
# RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_da.qm'
enableParallelBuilding = false;
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
mkdir -p "$out/share/applications"
cp -pr release/chessx "$out/bin"
cp -pr unix/chessx.desktop "$out/share/applications"
runHook postInstall
'';
meta = with lib; {
homepage = "http://chessx.sourceforge.net/";
description = "Browse and analyse chess games";
license = licenses.gpl2;
maintainers = [ maintainers.luispedro ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,64 @@
{ lib, stdenv
, fetchgit
, cmake
, pkg-config
, protobuf
, python3Packages
, ffmpeg
, libopus
, mkDerivation
, qtbase
, qtmultimedia
, qtsvg
, SDL2
, libevdev
, udev
, qtmacextras
}:
mkDerivation rec {
pname = "chiaki";
version = "2.1.1";
src = fetchgit {
url = "https://git.sr.ht/~thestr4ng3r/chiaki";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-VkCA8KS4EHuVSgoYt1YDT38hA1NEBckiBwRcgDZUSs4=";
};
nativeBuildInputs = [
cmake
pkg-config
protobuf
python3Packages.protobuf
python3Packages.python
];
buildInputs = [
ffmpeg
libopus
qtbase
qtmultimedia
qtsvg
protobuf
SDL2
] ++ lib.optionals stdenv.isLinux [
libevdev
udev
] ++ lib.optionals stdenv.isDarwin [
qtmacextras
];
doCheck = true;
installCheckPhase = "$out/bin/chiaki --help";
meta = with lib; {
homepage = "https://git.sr.ht/~thestr4ng3r/chiaki";
description = "Free and Open Source PlayStation Remote Play Client";
license = licenses.agpl3Only;
maintainers = with maintainers; [ delroth ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, fetchpatch }:
stdenv.mkDerivation rec {
pname = "chocolate-doom";
version = "3.0.1";
src = fetchFromGitHub {
owner = "chocolate-doom";
repo = pname;
rev = "${pname}-${version}";
sha256 = "1zlcqhd49c5n8vaahgaqrc2y10z86xng51sbd82xm3rk2dly25jp";
};
patches = [
# Pull upstream patch to fix builx against gcc-10:
# https://github.com/chocolate-doom/chocolate-doom/pull/1257
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/chocolate-doom/chocolate-doom/commit/a8fd4b1f563d24d4296c3e8225c8404e2724d4c2.patch";
sha256 = "1dmbygn952sy5n8qqp0asg11pmygwgygl17lrj7i0fxa0nrhixhj";
})
];
postPatch = ''
sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am
'';
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ SDL2 SDL2_mixer SDL2_net ];
enableParallelBuilding = true;
meta = {
homepage = "http://chocolate-doom.org/";
description = "A Doom source port that accurately reproduces the experience of Doom as it was played in the 1990s";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
hydraPlatforms = lib.platforms.linux; # darwin times out
maintainers = with lib.maintainers; [ MP2E ];
};
}

View file

@ -0,0 +1,68 @@
{ lib
, stdenv
, fetchurl
, SDL2
, SDL2_image
, SDL2_mixer
, fontconfig
, freealut
, freeglut
, ftgl
, gettext
, glpng
, libGL
, libGLU
, openal
, pkg-config
, quesoglc
}:
stdenv.mkDerivation rec {
pname = "chromium-bsu";
version = "0.9.16.1";
src = fetchurl {
url = "mirror://sourceforge/project/chromium-bsu/Chromium%20B.S.U.%20source%20code/${pname}-${version}.tar.gz";
hash = "sha256-ocFBo00ZpZYHroEWahmGTrjITPhrFVRi/tMabVbhYko=";
};
nativeBuildInputs = [
gettext
pkg-config
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
fontconfig
freealut
freeglut
ftgl
glpng
libGL
libGLU
openal
quesoglc
];
# Autodetection is somewhat buggy; this is to avoid SLD1 to be loaded
configureFlags = [
"--disable-sdlimage"
"--disable-sdlmixer"
];
postInstall = ''
install -D misc/chromium-bsu.png $out/share/pixmaps/chromium-bsu.png
install -D misc/chromium-bsu.desktop $out/share/applications/chromium-bsu.desktop
'';
meta = with lib; {
homepage = "http://chromium-bsu.sourceforge.net/";
description = "A fast paced, arcade-style, top-scrolling space shooter";
license = licenses.artistic1;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO [ AndersonTorres ]: joystick; gothic uralic font

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchurl, makeWrapper, mono, gtk2, curl }:
stdenv.mkDerivation rec {
pname = "ckan";
version = "1.30.4";
src = fetchurl {
url = "https://github.com/KSP-CKAN/CKAN/releases/download/v${version}/ckan.exe";
sha256 = "sha256-IgPqUEDpaIuGoaGoH2GCEzh3KxF3pkJC3VjTYXwSiQE=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ mono ];
libraries = lib.makeLibraryPath [ gtk2 curl ];
buildPhase = "true";
installPhase = ''
install -m 644 -D $src $out/bin/ckan.exe
makeWrapper ${mono}/bin/mono $out/bin/ckan \
--add-flags $out/bin/ckan.exe \
--set LD_LIBRARY_PATH $libraries
'';
meta = with lib; {
description = "Mod manager for Kerbal Space Program";
homepage = "https://github.com/KSP-CKAN/CKAN";
license = licenses.mit;
maintainers = with maintainers; [ Baughn ymarkus ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,24 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "cl-wordle";
version = "0.5.0";
src = fetchFromGitHub {
owner = "conradludgate";
repo = "wordle";
rev = "v${version}";
sha256 = "sha256-wFTvzAzboUFQg3fauIwIdRChK7rmLES92jK+8ff1D3s=";
};
cargoSha256 = "sha256-PtJbLpAUH44alupFY6wX++t/QsKknn5bXvnXzdYsd9o=";
meta = with lib; {
description = "Wordle TUI in Rust";
homepage = "https://github.com/conradludgate/wordle";
# repo has no license, but crates.io says it's MIT
license = licenses.mit;
maintainers = with maintainers; [ lom ];
mainProgram = "wordle";
};
}

View file

@ -0,0 +1,73 @@
{ lib
, stdenv
, fetchurl
, autoPatchelfHook
, alsa-lib
, gtk2
, libXrandr
, libXScrnSaver
, udev
, zlib
}:
let
name = "clonehero";
in
stdenv.mkDerivation rec {
pname = "${name}-unwrapped";
version = "0.23.2.2";
src = fetchurl {
url = "http://dl.clonehero.net/${name}-v${lib.removePrefix "0" version}/${name}-linux.tar.gz";
sha256 = "0k9jcnd55yhr42gj8cmysd18yldp4k3cpk4z884p2ww03fyfq7mi";
};
outputs = [ "out" "doc" ];
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
# Load-time libraries (loaded from DT_NEEDED section in ELF binary)
gtk2
stdenv.cc.cc.lib
zlib
# Run-time libraries (loaded with dlopen)
alsa-lib # ALSA sound
libXrandr # X11 resolution detection
libXScrnSaver # X11 screensaver prevention
udev # udev input drivers
];
installPhase = ''
mkdir -p "$out/bin" "$out/share"
install -Dm755 ${name} "$out/bin"
cp -r clonehero_Data "$out/share"
mkdir -p "$doc/share/${name}"
cp README.txt "$doc/share/${name}"
'';
# Patch required run-time libraries as load-time libraries
#
# Libraries found with:
# > strings clonehero | grep '\.so'
# and
# > strace clonehero 2>&1 | grep '\.so'
postFixup = ''
patchelf \
--add-needed libasound.so.2 \
--add-needed libudev.so.1 \
--add-needed libXrandr.so.2 \
--add-needed libXss.so.1 \
"$out/bin/${name}"
'';
meta = with lib; {
description = "Clone of Guitar Hero and Rockband-style games";
homepage = "https://clonehero.net";
license = licenses.unfree;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,39 @@
{ clonehero-unwrapped
, makeDesktopItem
, buildFHSUserEnv
, liberation_ttf
, callPackage
}:
let
name = "clonehero";
desktopName = "Clone Hero";
desktopItem = makeDesktopItem {
inherit name desktopName;
comment = clonehero-unwrapped.meta.description;
exec = name;
icon = name;
categories = [ "Game" ];
};
in
buildFHSUserEnv {
inherit name;
inherit (clonehero-unwrapped) meta;
# Clone Hero has /usr/share/fonts hard-coded in its binary for looking up fonts.
# This workaround is necessary for rendering text on the keybinding screen (and possibly elsewhere)
# If a better solution is found, the FHS environment can be removed.
extraBuildCommands = ''
chmod +w usr/share
mkdir -p usr/share/fonts/truetype
ln -s ${liberation_ttf}/share/fonts/truetype/* usr/share/fonts/truetype
'';
extraInstallCommands = ''
mkdir -p "$out/share/applications" "$out/share/pixmaps"
cp ${desktopItem}/share/applications/* "$out/share/applications"
ln -s ${clonehero-unwrapped}/share/clonehero_Data/Resources/UnityPlayer.png "$out/share/pixmaps/${name}.png"
'';
runScript = callPackage ./xdg-wrapper.nix { };
}

View file

@ -0,0 +1,21 @@
{ stdenv, clonehero-unwrapped, writeScript }:
# Clone Hero doesn't have an installer, so it just stores configuration & data relative to the binary.
# This wrapper works around that limitation, storing game configuration & data in XDG_CONFIG_HOME.
let
name = "clonehero";
desktopName = "Clone Hero";
in
writeScript "${name}-xdg-wrapper-${clonehero-unwrapped.version}" ''
#!${stdenv.shell} -e
configDir="''${XDG_CONFIG_HOME:-$HOME/.config}/unity3d/srylain Inc_/${desktopName}"
mkdir -p "$configDir"
# Force link shipped clonehero_Data, unless directory already exists (to allow modding)
if [ ! -d "$configDir/clonehero_Data" ] || [ -L "$configDir/clonehero_Data" ]; then
ln -snf ${clonehero-unwrapped}/share/clonehero_Data "$configDir"
fi
# Fake argv[0] to emulate running in the config directory
exec -a "$configDir/${name}" ${clonehero-unwrapped}/bin/${name} "$@"
''

View file

@ -0,0 +1,29 @@
{ lib, fetchFromGitHub, mkDerivation, cmake, protobuf
, qtbase, qtmultimedia, qttools, qtwebsockets, wrapQtAppsHook
}:
mkDerivation rec {
pname = "cockatrice";
version = "2021-02-03-Development-2.8.1-beta";
src = fetchFromGitHub {
owner = "Cockatrice";
repo = "Cockatrice";
rev = version;
sha256 = "0g1d7zq4lh4jf08mvvgp6m2r2gdvy4y1mhf46c0s8607h2l8vavh";
};
buildInputs = [
qtbase qtmultimedia protobuf qttools qtwebsockets
];
nativeBuildInputs = [ cmake wrapQtAppsHook ];
meta = {
homepage = "https://github.com/Cockatrice/Cockatrice";
description = "A cross-platform virtual tabletop for multiplayer card games";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ evanjs ];
platforms = with lib.platforms; linux;
};
}

View file

@ -0,0 +1,41 @@
{ stdenv, lib, fetchFromGitHub, cmake
, gettext, vorbis-tools
, xmlstarlet, doxygen, python3 }:
stdenv.mkDerivation rec {
pname = "colobot-data";
version = "0.2.0-alpha";
src = fetchFromGitHub {
owner = "colobot";
repo = "colobot-data";
rev = "colobot-gold-${version}";
sha256 = "sha256-yzIbAzrGsDe6hO0GHF9gjnj7IE8B7+5LDbvjZi4Wtms=";
};
nativeBuildInputs = [ cmake vorbis-tools xmlstarlet doxygen python3 ];
buildInputs = [ gettext ];
enableParallelBuilding = false;
# Build procedure requires the data folder
patchPhase = ''
cp -r $src localSrc
chmod +w localSrc/help/bots/po
find -type d -exec chmod +w {} \;
for po in localSrc/help/{bots,cbot,object,generic,programs}/po/* localSrc/levels/*{/*/*,}/po/*; do
rm $po
touch $po
done
# skip music
rm localSrc/music/CMakeLists.txt
cd localSrc
'';
meta = with lib; {
homepage = "https://colobot.info/";
description = "Game data for colobot";
license = licenses.gpl3;
maintainers = with maintainers; [ freezeboy ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, SDL2, SDL2_image, SDL2_ttf, libpng
, glew, gettext, libsndfile, libvorbis, libogg, physfs, openal
, xmlstarlet, doxygen, python3, callPackage }:
let
colobot-data = callPackage ./data.nix {};
in
stdenv.mkDerivation rec {
pname = "colobot";
# Maybe require an update to package colobot-data as well
# in file data.nix next to this one
version = "0.2.0-alpha";
src = fetchFromGitHub {
owner = "colobot";
repo = pname;
rev = "colobot-gold-${version}";
sha256 = "sha256-Nu7NyicNIk5yza9sXfd4KbGdB65guVuGREd6rwRU3lU=";
};
nativeBuildInputs = [ cmake xmlstarlet doxygen python3 ];
buildInputs = [ boost SDL2 SDL2_image SDL2_ttf libpng glew gettext libsndfile libvorbis libogg physfs openal ];
enableParallelBuilding = false;
# The binary ends in games directoy
postInstall = ''
mv $out/games $out/bin
for contents in ${colobot-data}/share/games/colobot/*; do
ln -s $contents $out/share/games/colobot
done
'';
meta = with lib; {
homepage = "https://colobot.info/";
description = "Colobot: Gold Edition is a real-time strategy game, where you can program your bots";
license = licenses.gpl3;
maintainers = with maintainers; [ freezeboy ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,44 @@
{ lib, stdenv, fetchFromGitLab, SDL2, SDL2_image, pkg-config
, libvorbis, libGL, boost, cmake, zlib, curl, SDL2_mixer, python3
}:
stdenv.mkDerivation rec {
pname = "commandergenius";
version = "2.3.3";
src = fetchFromGitLab {
owner = "Dringgstein";
repo = "Commander-Genius";
rev = "v${version}";
sha256 = "04nb23wwvc3yywz3cr6gvn02fa7psfs22ssg4wk12s08z1azvz3h";
};
buildInputs = [ SDL2 SDL2_image SDL2_mixer libGL boost libvorbis zlib curl python3 ];
preConfigure = ''
export cmakeFlags="$cmakeFlags -DCMAKE_INSTALL_PREFIX=$out -DSHAREDIR=$out/share"
export makeFlags="$makeFlags DESTDIR=$(out)"
'';
nativeBuildInputs = [ cmake pkg-config ];
postPatch = ''
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
'';
meta = with lib; {
description = "Modern Interpreter for the Commander Keen Games";
longDescription = ''
Commander Genius is an open-source clone of
Commander Keen which allows you to play
the games, and some of the mods
made for it. All of the original data files
are required to do so
'';
homepage = "https://github.com/gerstrong/Commander-Genius";
maintainers = with maintainers; [ hce ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv
, fetchurl
, libX11
, zlib
, xorgproto
, libGL ? null
, libGLU ? null
, freeglut ? null
}:
stdenv.mkDerivation rec {
pname = "construo";
version = "0.2.3";
src = fetchurl {
url = "https://github.com/Construo/construo/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "1wmj527hbj1qv44cdsj6ahfjrnrjwg2dp8gdick8nd07vm062qxa";
};
buildInputs = [ libX11 zlib xorgproto ]
++ lib.optional (libGL != null) libGL
++ lib.optional (libGLU != null) libGLU
++ lib.optional (freeglut != null) freeglut;
preConfigure = ''
substituteInPlace src/Makefile.in \
--replace games bin
'';
meta = {
description = "Masses and springs simulation game";
homepage = "http://fs.fsf.org/construo/";
license = lib.licenses.gpl3;
};
}

View file

@ -0,0 +1,10 @@
--- crack-attack-1.1.14/src/Game.h
+++ crack-attack-1.1.14/src/Game.h
@@ -34,6 +34,7 @@
#include <climits>
#include <cstdlib>
#include <cmath>
+#include <cstring>
#ifdef __MINGW32__
# include <windows.h>

Some files were not shown because too many files have changed in this diff Show more