2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, pokete
|
2023-05-24 13:37:59 +00:00
|
|
|
, faketty
|
2022-06-26 10:26:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "pokete";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.9.1";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxgr-linux";
|
|
|
|
repo = "pokete";
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-T18908Einsgful8hYMVHl0cL4sIYFvhpy0MbLIcVhxs=";
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2023-05-24 13:37:59 +00:00
|
|
|
command = "${faketty}/bin/faketty pokete --help";
|
|
|
|
version = "v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal based Pokemon like game";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pokete";
|
2022-06-26 10:26:21 +00:00
|
|
|
homepage = "https://lxgr-linux.github.io/pokete";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|