3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/pokete/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.1 KiB
Nix
Raw Normal View History

2022-06-16 16:18:31 +01:00
{ lib
, python3
, fetchFromGitHub
, testers
, pokete
}:
python3.pkgs.buildPythonApplication rec {
pname = "pokete";
2022-06-20 21:21:29 +01:00
version = "0.7.3";
2022-06-16 16:18:31 +01:00
format = "other";
src = fetchFromGitHub {
owner = "lxgr-linux";
repo = "pokete";
rev = version;
2022-06-20 21:21:29 +01:00
sha256 = "sha256-sP6fI3F/dQHei1ZJU6gChKxft9fGpTct4EyU3OdBtr4=";
2022-06-16 16:18:31 +01: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;
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 ];
};
}