nixpkgs/pkgs/games/nile/default.nix

63 lines
1.2 KiB
Nix

{ lib
, unstableGitUpdater
, buildPythonApplication
, fetchFromGitHub
, pythonOlder
, setuptools
, requests
, protobuf
, pycryptodome
, zstandard
, json5
, platformdirs
, cacert
}:
buildPythonApplication rec {
pname = "nile";
version = "1.0.3-unstable-2024-05-10";
format = "pyproject";
src = fetchFromGitHub {
owner = "imLinguin";
repo = "nile";
rev = "74e3ca979b2a66f9174c04fd0279211e0276ac9c";
hash = "sha256-ezX9MLQsULRvX+X2NXYBQnKRzBRt9eN9JnJinzysI9o=";
};
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";
mainProgram = "nile";
homepage = "https://github.com/imLinguin/nile";
license = with licenses; [ gpl3 ];
maintainers = with maintainers; [ aidalgol ];
};
passthru.updateScript = unstableGitUpdater {
tagPrefix = "v";
};
}