about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-06-19 11:51:52 +0200
committerGitHub <noreply@github.com>2022-06-19 11:51:52 +0200
commitd11a703d956985decfed846ab2ff13fab54fccb4 (patch)
tree9c6fde4ad5309918d79a53d45c2ce3fce76a9277 /pkgs/games
parent0fcb7894781b5542993c0f8ce05ee6d9ea68e924 (diff)
parent42ff489d5393629b3ac06f865adc3e5c87c8a33b (diff)
Merge pull request #177894 from fgaz/pokete/init
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/pokete/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/games/pokete/default.nix b/pkgs/games/pokete/default.nix
new file mode 100644
index 0000000000000..9d4469e1705ce
--- /dev/null
+++ b/pkgs/games/pokete/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, python3
+, fetchFromGitHub
+, testers
+, pokete
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "pokete";
+  version = "0.7.2";
+
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "lxgr-linux";
+    repo = "pokete";
+    rev = version;
+    sha256 = "sha256-P6007qY6MsnQH4LGiNPoKCUt3+YI0OinKFdosaj3Wrc=";
+  };
+
+  pythonPath = with python3.pkgs; [
+    scrap-engine
+    pynput
+  ];
+
+  buildPhase = ''
+    ${python3.interpreter} -O -m compileall .
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/pokete
+    cp -r assets pokete_classes pokete_data mods *.py $out/share/pokete/
+    mkdir -p $out/bin
+    ln -s $out/share/pokete/pokete.py $out/bin/pokete
+  '';
+
+  postFixup = ''
+    wrapPythonProgramsIn $out/share/pokete "$pythonPath"
+  '';
+
+  passthru.tests = {
+    pokete-version = testers.testVersion {
+      package = pokete;
+      command = "pokete --help";
+    };
+  };
+
+  meta = with lib; {
+    description = "A terminal based Pokemon like game";
+    homepage = "https://lxgr-linux.github.io/pokete";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}