Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6684,6 +6684,13 @@
fingerprint = "932F 3E8E 1C0F 4A98 95D7 B8B8 B0CA A28A 0295 8308";
}];
};
kenran = {
email = "johannes.maier@mailbox.org";
github = "kenranunderscore";
githubId = 5188977;
matrix = "@kenran_:matrix.org";
name = "Johannes Maier";
};
kentjames = {
email = "jameschristopherkent@gmail.com";
github = "kentjames";
Expand Down
66 changes: 66 additions & 0 deletions pkgs/games/sil-q/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }:

let
setup = writeScript "setup" ''
mkdir -p "$ANGBAND_PATH"
# copy all the data files into place
cp -ar $1/* "$ANGBAND_PATH"
# the copied files need to be writable
chmod +w -R "$ANGBAND_PATH"
'';
in stdenv.mkDerivation rec {
pname = "sil-q";
version = "1.5.0";

src = fetchFromGitHub {
owner = "sil-quirk";
repo = "sil-q";
rev = "v${version}";
sha256 = "sha256-v/sWhPWF9cCKD8N0RHpwzChMM1t9G2yrMDmi1cZxdOs=";
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ncurses libX11 ];

# Makefile(s) and config are not top-level
sourceRoot = "source/src";

postPatch = ''
# allow usage of ANGBAND_PATH
substituteInPlace config.h --replace "#define FIXED_PATHS" ""

# change Makefile.std for ncurses according to its own comment
substituteInPlace Makefile.std --replace "-lcurses" "-lncurses"
'';

makefile = "Makefile.std";

installPhase = ''
runHook preInstall

mkdir -p $out/bin
cp sil $out/bin/sil-q
wrapProgram $out/bin/sil-q \
--run "export ANGBAND_PATH=\$HOME/.sil" \
Comment thread
kenranunderscore marked this conversation as resolved.
Outdated
--run "${setup} ${src}/lib"

runHook postInstall
'';

meta = {
description = "A roguelike game set in the First Age of Middle-earth";
longDescription = ''
A game of adventure set in the First Age of Middle-earth, when the world still
rang with Elven song and gleamed with Dwarven mail.

Walk the dark halls of Angband. Slay creatures black and fell. Wrest a shining
Silmaril from Morgoth’s iron crown.

A fork of Sil that's still actively developed.
'';
homepage = "https://github.com/sil-quirk/sil-q";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.kenran ];
platforms = lib.platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32308,6 +32308,8 @@ with pkgs;

sil = callPackage ../games/sil { };

sil-q = callPackage ../games/sil-q { };

simutrans = callPackage ../games/simutrans { };
# get binaries without data built by Hydra
simutrans_binaries = lowPrio simutrans.binaries;
Expand Down