From 6d7d3560e8e5660ae270b82c844cd9cb77a4bd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Sun, 2 Feb 2025 15:35:23 +0100 Subject: [PATCH] patch to have correct path for executing app --- desktopitemdialog.patch | 11 +++++++++++ flake.nix | 4 ++++ main_ui.patch | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 desktopitemdialog.patch create mode 100644 main_ui.patch diff --git a/desktopitemdialog.patch b/desktopitemdialog.patch new file mode 100644 index 0000000..4c4b0f2 --- /dev/null +++ b/desktopitemdialog.patch @@ -0,0 +1,11 @@ +--- a/src/cassowary/gui/components/desktopitemdialog.py 1970-01-01 01:00:01.000000000 +0100 ++++ b/src/cassowary/gui/components/desktopitemdialog.py 1970-01-01 01:00:01.000000000 +0100 +@@ -29,7 +29,7 @@ + self.inp_icon.setText(icon_path) + self.inp_description.setText(description + " (cassowary remote application)") + self.inp_comment.setText("'{}' version '{}'".format(name, version)) +- self.inp_command.setText("python3 -m cassowary -c guest-run -- '{}' %u".format( ++ self.inp_command.setText("cassowary -c guest-run -- '{}' %u".format( + path.replace("\\", "\\\\").replace("'", "").replace("\"", "")) + ) + # Not using pixmap for now, just use css border-image diff --git a/flake.nix b/flake.nix index b001851..2f2285c 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,10 @@ wrapQtApp $out/bin/cassowary ''; format = "pyproject"; + patches = [ + ./main_ui.patch + ./desktopitemdialog.patch + ]; }; }; } diff --git a/main_ui.patch b/main_ui.patch new file mode 100644 index 0000000..e61aa06 --- /dev/null +++ b/main_ui.patch @@ -0,0 +1,20 @@ +--- a/src/cassowary/gui/components/main_ui.py 1970-01-01 01:00:01.000000000 +0100 ++++ b/src/cassowary/gui/components/main_ui.py 1970-01-01 01:00:01.000000000 +0100 +@@ -69,7 +69,7 @@ + desktop_item = """[Desktop Entry] + Comment=Cassowary Background Service + Encoding=UTF-8 +-Exec=python -m cassowary -bc ++Exec=cassowary -bc + GenericName=cassowary-service + Icon={icon} + Name[en_US]=Cassowary Background Service +@@ -93,7 +93,7 @@ + desktop_item = """[Desktop Entry] + Comment=Controls settings for cassowary + Encoding=UTF-8 +-Exec=python -m cassowary -a ++Exec=cassowary -a + GenericName=cassowary + Icon={icon} + Name[en_US]=Cassowary Linux