diff options
author | Irene Knapp <ireneista@irenes.space> | 2025-09-06 16:04:36 -0700 |
---|---|---|
committer | Irene Knapp <ireneista@irenes.space> | 2025-09-06 16:04:36 -0700 |
commit | 18e38018cf4cc8f9689c453f5013426e60bf744a (patch) | |
tree | ceec00bee2761116a652341ef81bf4ffb7bffa7f | |
parent | 7f96b7a15e3d688d8a679f03532b5b89101744ce (diff) |
add a nix package for the now-forked pollyana
the contents of the patch against upstream kaylee are now applied to the pollyanna source; the patch is retained in case it's ever useful to build upstream Force-Push: yes Change-Id: I18df6c5b48ee1e767cff259bd323682c8dd693ff
-rw-r--r-- | flake.nix | 28 | ||||
-rw-r--r-- | packages/kaylee-data-location.patch (renamed from data-location.patch) | 0 | ||||
-rw-r--r-- | src/kayleevc/kaylee.py | 3 | ||||
-rw-r--r-- | src/setup.py | 6 |
4 files changed, 33 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix index d81cb77..3bda2c1 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,32 @@ nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); in { packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in rec { + default = pollyana; + + pollyana = pkgs.python3Packages.buildPythonPackage rec { + pname = "KayleeVC"; + version = "0.1.1"; + + src = ./src; + + nativeBuildInputs = with pkgs; [ + gobject-introspection + wrapGAppsHook4 + ]; + + propagatedBuildInputs = (with pkgs; [ + gtk3 + pocketsphinx.lib + ]) ++ (with pkgs.gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-good + ]) ++ (with pkgs.python3Packages; [ + requests + pygobject3 + ]); + }; + kaylee = pkgs.python3Packages.buildPythonPackage rec { pname = "KayleeVC"; version = "0.1.1"; @@ -26,7 +52,7 @@ }; patches = [ - ./data-location.patch + ./packages/kaylee-data-location.patch ]; nativeBuildInputs = with pkgs; [ diff --git a/data-location.patch b/packages/kaylee-data-location.patch index 8c0dd65..8c0dd65 100644 --- a/data-location.patch +++ b/packages/kaylee-data-location.patch diff --git a/src/kayleevc/kaylee.py b/src/kayleevc/kaylee.py index 4e99d1a..7cc927f 100644 --- a/src/kayleevc/kaylee.py +++ b/src/kayleevc/kaylee.py @@ -178,7 +178,8 @@ class Kaylee: def load_resource(self, string): # TODO: Use the Config object for this path management - local_data = os.path.join(os.path.dirname(__file__), '..', 'data') + local_data = os.path.join(os.path.dirname(__file__), '..', + 'usr', 'share', 'kaylee') paths = ["/usr/share/kaylee/", "/usr/local/share/kaylee", local_data] for path in paths: resource = os.path.join(path, string) diff --git a/src/setup.py b/src/setup.py index 34ba60c..b4c32c8 100644 --- a/src/setup.py +++ b/src/setup.py @@ -27,8 +27,10 @@ setup( ], install_requires=["requests"], data_files = [ - ("/usr/share/kaylee", ["data/icon_inactive.png", "data/icon.png", - "options.json.tmp"]), + ("/usr/share/kaylee", + ["data/icon.png", "data/icon_small.png", + "data/icon_inactive.png", "data/icon_inactive_small.png", + "options.json.tmp"]), ("/usr/lib/systemd/user", ["systemd/kaylee.service"]) ], entry_points = { |