From 9596c236385b6b4e7ae5268cfce7cd3ea833c269 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Fri, 25 Apr 2025 14:16:47 +0200 Subject: [PATCH] minor improvements * added ability to override source * use inherit (I heard that this improves performance) --- balatromobile/package.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/balatromobile/package.nix b/balatromobile/package.nix index eea352e..21f39b7 100644 --- a/balatromobile/package.nix +++ b/balatromobile/package.nix @@ -2,13 +2,16 @@ fetchgit, python3Packages, jre, - ... + balatromobileSrc ? + fetchgit { + url = "https://github.com/antipatico/balatromobile"; + hash = "sha256-P6MVmDiI6NLHqBYdkbtqExHKjkjLeD5bE/kTEyPxVTw="; + fetchLFS = true; + }, }: let - src = fetchgit { - url = "https://github.com/antipatico/balatromobile"; - sha256 = "P6MVmDiI6NLHqBYdkbtqExHKjkjLeD5bE/kTEyPxVTw="; - fetchLFS = true; - }; + 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 @@ -16,6 +19,6 @@ in inherit pname version src; pyproject = true; - build-system = [python3Packages.flit]; - dependencies = [python3Packages.tabulate jre]; + build-system = [flit]; + dependencies = [tabulate jre]; }