* added ability to override source * use inherit (I heard that this improves performance)
25 lines
697 B
Nix
25 lines
697 B
Nix
{
|
|
fetchgit,
|
|
python3Packages,
|
|
jre,
|
|
balatromobileSrc ?
|
|
fetchgit {
|
|
url = "https://github.com/antipatico/balatromobile";
|
|
hash = "sha256-P6MVmDiI6NLHqBYdkbtqExHKjkjLeD5bE/kTEyPxVTw=";
|
|
fetchLFS = true;
|
|
},
|
|
}: let
|
|
inherit (python3Packages) flit tabulate;
|
|
|
|
src = balatromobileSrc;
|
|
pname = (builtins.fromTOML (builtins.readFile "${src}/pyproject.toml")).project.name;
|
|
version = builtins.elemAt (builtins.match ".*([0-9]+\.[0-9]+\.[0-9]+).*" (builtins.readFile "${src}/balatromobile/__version__.py")) 0;
|
|
in
|
|
python3Packages.buildPythonPackage {
|
|
inherit pname version src;
|
|
|
|
pyproject = true;
|
|
build-system = [flit];
|
|
dependencies = [tabulate jre];
|
|
}
|