diff --git a/pkgs/by-name/ga/galaxis/package.nix b/pkgs/by-name/ga/galaxis/package.nix new file mode 100644 index 000000000000..788a7453e20f --- /dev/null +++ b/pkgs/by-name/ga/galaxis/package.nix @@ -0,0 +1,71 @@ +{ lib +, asciidoctor +, fetchFromGitLab +, ncurses +, stdenv +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "galaxis"; + version = "1.11"; + + src = fetchFromGitLab { + owner = "esr"; + repo = "galaxis"; + rev = finalAttrs.version; + hash = "sha256-fSzifGoSdWyFGt99slzAsqCMDoeLbBqQGXujX8QAfGc="; + }; + + outputs = [ "out" "man" ]; + + nativeBuildInputs = [ + asciidoctor + ]; + + buildInputs = [ + ncurses + ]; + + strictDeps = true; + + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + "galaxis" + "galaxis.6" + ]; + + postPatch = '' + sed -i -E '/[[:space:]]*xmlto/ s|xmlto|xmlto --skip-validation|' Makefile + ''; + + # This is better than sed-patch the Makefile + installPhase = '' + runHook preInstall + mkdir -p $out/bin $man/share/man/man6 + install -Dm755 galaxis -t $out/bin/ + install -Dm644 galaxis.6 -t $man/share/man/man6 + runHook postInstall + ''; + + meta = { + description = "Rescue lifeboats lost in interstellar space"; + longDescription = '' + Lifeboats from a crippled interstellar liner are adrift in a starfield. To + find them, you can place probes that look in all eight compass directions + and tell you how many lifeboats they see. If you drop a probe directly on + a lifeboat it will be revealed immediately. Your objective: find the + lifeboats as quickly as possible, before the stranded passengers run out + of oxygen! + + This is a UNIX-hosted, curses-based clone of the nifty little Macintosh + freeware game Galaxis. It doesn't have the super-simple, point-and-click + interface of the original, but compensates by automating away some of the + game's simpler deductions. + ''; + homepage = "http://catb.org/~esr/galaxis/"; + license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "galaxis"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/games/galaxis/default.nix b/pkgs/games/galaxis/default.nix deleted file mode 100644 index a3847e73c8da..000000000000 --- a/pkgs/games/galaxis/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, stdenv, fetchurl, ncurses, xmlto }: - -with lib; -stdenv.mkDerivation rec { - - pname = "galaxis"; - version = "1.10"; - - src = fetchurl{ - url = "http://www.catb.org/~esr/galaxis/${pname}-${version}.tar.gz"; - sha256 = "1181x3z4r0794v2bkpigb5fablw1nayj42wvhy2am79p7j1iqq5r"; - }; - - buildInputs = [ ncurses xmlto ]; - - patchPhase = '' - sed -i\ - -e 's|^install: galaxis\.6 uninstall|install: galaxis.6|'\ - -e 's|usr/||g' -e 's|ROOT|DESTDIR|g'\ - -e 's|install -m 755 -o 0 -g 0|install -m 755|' Makefile - ''; - - dontConfigure = true; - - makeFlags = [ "DESTDIR=$(out)" ]; - - meta = { - description = "Rescue lifeboats lost in interstellar space"; - longDescription = '' - Lifeboats from a crippled interstellar liner are adrift in a starfield. To - find them, you can place probes that look in all eight compass directions - and tell you how many lifeboats they see. If you drop a probe directly on - a lifeboat it will be revealed immediately. Your objective: find the - lifeboats as quickly as possible, before the stranded passengers run out - of oxygen! - - This is a UNIX-hosted, curses-based clone of the nifty little Macintosh - freeware game Galaxis. It doesn't have the super-simple, point-and-click - interface of the original, but compensates by automating away some of the - game's simpler deductions. - ''; - homepage = "http://catb.org/~esr/galaxis/"; - license = licenses.gpl2; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3187b7f957be..5de7219b376e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37408,8 +37408,6 @@ with pkgs; fsg = callPackage ../games/fsg { }; - galaxis = callPackage ../games/galaxis { }; - gambit-chess = callPackage ../games/gambit { }; garden-of-coloured-lights = callPackage ../games/garden-of-coloured-lights { allegro = allegro4; };