nixpkgs/pkgs/games/nile/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

61 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-03-09";
format = "pyproject";
src = fetchFromGitHub {
owner = "imLinguin";
repo = "nile";
rev = "ae09acfc20fe4e462762666871f78caae70f6c74";
hash = "sha256-hqhIacsbultY3CvvkYAZHmhCkQLi1mkPQwkztaUOd10=";
};
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 { };
}