From 602583a7203823d97da2880aa3f83f9eb56c6eb4 Mon Sep 17 00:00:00 2001 From: emanuel <134736553+EmanuelM153@users.noreply.github.com> Date: Sat, 4 Jan 2025 13:44:40 -0500 Subject: [PATCH 1/2] maintainers: add EmanuelM153 --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 77493c7f1090..f8b5a4dc2632 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6709,6 +6709,11 @@ githubId = 934284; name = "Rouven Czerwinski"; }; + EmanuelM153 = { + name = "Emanuel"; + github = "EmanuelM153"; + githubId = 134736553; + }; emattiza = { email = "nix@mattiza.dev"; github = "emattiza"; From 1bd30bda66702486e654dd7310a77d71d18130f3 Mon Sep 17 00:00:00 2001 From: emanuel <134736553+EmanuelM153@users.noreply.github.com> Date: Sat, 4 Jan 2025 14:50:23 -0500 Subject: [PATCH 2/2] open-adventure: init at 1.20 --- pkgs/by-name/op/open-adventure/package.nix | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 pkgs/by-name/op/open-adventure/package.nix diff --git a/pkgs/by-name/op/open-adventure/package.nix b/pkgs/by-name/op/open-adventure/package.nix new file mode 100644 index 000000000000..76b23b9ac12e --- /dev/null +++ b/pkgs/by-name/op/open-adventure/package.nix @@ -0,0 +1,81 @@ +{ + lib, + stdenv, + fetchFromGitLab, + python3Packages, + pkg-config, + libedit, + cppcheck, + coreutils, + asciidoctor, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "open-adventure"; + version = "1.20"; + src = fetchFromGitLab { + owner = "esr"; + repo = "open-adventure"; + tag = finalAttrs.version; + hash = "sha256-xbsMz99CNLhpM6BSJVcRzxPB6tUYfPy/3Z+8BKt8b1E="; + }; + + nativeBuildInputs = [ + python3Packages.python + pkg-config + asciidoctor + ]; + + buildInputs = [ + python3Packages.pyyaml + libedit + ]; + + doCheck = true; + + nativeCheckInputs = [ + python3Packages.pylint + cppcheck + ]; + + postPatch = '' + patchShebangs --build make_dungeon.py + + # https://gitlab.com/esr/open-adventure/-/issues/70 + substituteInPlace Makefile --replace-fail "--template " "--template=" + + substituteInPlace tests/tapview --replace-fail "/bin/echo" ${lib.getExe' coreutils "echo"} + ''; + + buildFlags = [ + "advent.6" + ]; + + installPhase = '' + runHook preInstall + + mkdir -vp "$out/bin" "$out/share/man/man6" "$out/share/applications/" "$out/share/icons/hicolor/scalable/apps" + install -m 555 ./advent $out/bin + install -m 444 ./advent.6 $out/share/man/man6 + install -m 444 ./advent.desktop $out/share/applications + install -m 444 ./advent.svg $out/share/icons/hicolor/scalable/apps + + runHook postInstall + ''; + + meta = { + description = "Forward-port of the Crowther/Woods Adventure 2.5 game from 1995"; + longDescription = '' + This code is a forward-port of the Crowther/Woods Adventure 2.5 game + from 1995, last version in the main line of Colossal Cave Adventure + development written by Crowther and Woods. The authors have given + permission and encouragement to this release. + ''; + license = lib.licenses.bsd2; + mainProgram = "advent"; + homepage = "http://www.catb.org/~esr/open-adventure/"; + changelog = "https://gitlab.com/esr/open-adventure/-/blob/${finalAttrs.version}/NEWS.adoc"; + maintainers = with lib.maintainers; [ EmanuelM153 ]; + platforms = lib.platforms.all; + }; +})