nixpkgs/pkgs/games/nile/default.nix

60 lines
1.1 KiB
Nix

{ lib
, unstableGitUpdater
, buildPythonApplication
, fetchFromGitHub
, pythonOlder
, setuptools
, requests
, protobuf
, pycryptodome
, zstandard
, json5
, platformdirs
, cacert
}:
buildPythonApplication rec {
pname = "nile";
version = "unstable-2024-01-27";
format = "pyproject";
src = fetchFromGitHub {
owner = "imLinguin";
repo = "nile";
rev = "f4eca37794b7c06affcf0bc28660de7c54eddc9a";
hash = "sha256-WsCR2xjQc4Kx1nUdApxbkkyX+nYoLl5IsSUVW3rjT1Q=";
};
disabled = pythonOlder "3.8";
propagatedBuildInputs = [
setuptools
requests
protobuf
pycryptodome
zstandard
json5
platformdirs
];
pyprojectAppendix = ''
[tool.setuptools.packages.find]
include = ["nile*"]
'';
postPatch = ''
echo "$pyprojectAppendix" >> pyproject.toml
'';
pythonImportsCheck = [ "nile" ];
meta = with lib; {
description = "Unofficial Amazon Games client";
homepage = "https://github.com/imLinguin/nile";
license = with licenses; [ gpl3 ];
maintainers = with maintainers; [ aidalgol ];
};
passthru.updateScript = unstableGitUpdater { };
}