nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 asciidoctor,
4 fetchFromGitLab,
5 ncurses,
6 stdenv,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "galaxis";
11 version = "1.11";
12
13 src = fetchFromGitLab {
14 owner = "esr";
15 repo = "galaxis";
16 rev = finalAttrs.version;
17 hash = "sha256-fSzifGoSdWyFGt99slzAsqCMDoeLbBqQGXujX8QAfGc=";
18 };
19
20 outputs = [
21 "out"
22 "man"
23 ];
24
25 nativeBuildInputs = [
26 asciidoctor
27 ];
28
29 buildInputs = [
30 ncurses
31 ];
32
33 strictDeps = true;
34
35 makeFlags = [
36 "CC=${stdenv.cc.targetPrefix}cc"
37 "galaxis"
38 "galaxis.6"
39 ];
40
41 postPatch = ''
42 sed -i -E '/[[:space:]]*xmlto/ s|xmlto|xmlto --skip-validation|' Makefile
43 '';
44
45 # This is better than sed-patch the Makefile
46 installPhase = ''
47 runHook preInstall
48 mkdir -p $out/bin $man/share/man/man6
49 install -Dm755 galaxis -t $out/bin/
50 install -Dm644 galaxis.6 -t $man/share/man/man6
51 runHook postInstall
52 '';
53
54 meta = {
55 description = "Rescue lifeboats lost in interstellar space";
56 longDescription = ''
57 Lifeboats from a crippled interstellar liner are adrift in a starfield. To
58 find them, you can place probes that look in all eight compass directions
59 and tell you how many lifeboats they see. If you drop a probe directly on
60 a lifeboat it will be revealed immediately. Your objective: find the
61 lifeboats as quickly as possible, before the stranded passengers run out
62 of oxygen!
63
64 This is a UNIX-hosted, curses-based clone of the nifty little Macintosh
65 freeware game Galaxis. It doesn't have the super-simple, point-and-click
66 interface of the original, but compensates by automating away some of the
67 game's simpler deductions.
68 '';
69 homepage = "http://catb.org/~esr/galaxis/";
70 license = with lib.licenses; [ gpl2Plus ];
71 mainProgram = "galaxis";
72 maintainers = with lib.maintainers; [ ];
73 platforms = lib.platforms.linux;
74 };
75})