From e36d99a5df9e4d0a706ca28d7c0ca10a1cc57537 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 16 Jun 2022 17:18:01 +0200 Subject: [PATCH 1/3] python310Packages.scrap-engine: init at 1.2.0 --- .../python-modules/scrap-engine/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/scrap-engine/default.nix diff --git a/pkgs/development/python-modules/scrap-engine/default.nix b/pkgs/development/python-modules/scrap-engine/default.nix new file mode 100644 index 000000000000..07d942f01099 --- /dev/null +++ b/pkgs/development/python-modules/scrap-engine/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "scrap_engine"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-dn/9wxK1UHd3cc3Jo1Cp9tynOFUlndH+cZfIc244ysE="; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + meta = with lib; { + maintainers = with maintainers; [ fgaz ]; + description = "A 2D ascii game engine for the terminal"; + homepage = "https://github.com/lxgr-linux/scrap_engine"; + license = licenses.gpl3Only; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 47d7a2f9d0c5..b9ae2bd13ed6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9502,6 +9502,8 @@ in { scramp = callPackage ../development/python-modules/scramp { }; + scrap-engine = callPackage ../development/python-modules/scrap-engine { }; + scrapy = callPackage ../development/python-modules/scrapy { }; scrapy-deltafetch = callPackage ../development/python-modules/scrapy-deltafetch { }; From 11c5f738289e335e72aa5d206a67fc6d15739e5e Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 16 Jun 2022 17:18:31 +0200 Subject: [PATCH 2/3] pokete: init at 0.7.2 --- pkgs/games/pokete/default.nix | 55 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/games/pokete/default.nix diff --git a/pkgs/games/pokete/default.nix b/pkgs/games/pokete/default.nix new file mode 100644 index 000000000000..8ddea5cbbcea --- /dev/null +++ b/pkgs/games/pokete/default.nix @@ -0,0 +1,55 @@ +{ 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 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e53048ee6ad2..916a6e70934f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32189,6 +32189,8 @@ with pkgs; target = "server"; }; + pokete = callPackage ../games/pokete { }; + powermanga = callPackage ../games/powermanga { }; prboom-plus = callPackage ../games/prboom-plus { }; From 42ff489d5393629b3ac06f865adc3e5c87c8a33b Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 19 Jun 2022 11:30:48 +0200 Subject: [PATCH 3/3] pokete: drop default platform --- pkgs/games/pokete/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/games/pokete/default.nix b/pkgs/games/pokete/default.nix index 8ddea5cbbcea..9d4469e1705c 100644 --- a/pkgs/games/pokete/default.nix +++ b/pkgs/games/pokete/default.nix @@ -50,6 +50,5 @@ python3.pkgs.buildPythonApplication rec { homepage = "https://lxgr-linux.github.io/pokete"; license = licenses.gpl3Only; maintainers = with maintainers; [ fgaz ]; - platforms = platforms.unix; }; }