about summary refs log tree commit diff
path: root/pkgs/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2023-06-02 11:39:21 +0200
committeraszlig <aszlig@nix.build>2023-06-02 12:03:20 +0200
commitf72625079cc9cea8abe06d1a29b10530da538c15 (patch)
tree1a499b9fd525938550c4d4fd7ea59f613deaae66 /pkgs/aszlig
parent989ec0fc8365ae3f8b1d6cc864cc9558c6af2361 (diff)
dnyarri: Switch to gpodder from Git
I already had the latest Git version laying around in my Nix user
profile, so it's battle-tested enough. The main reason why I did this is
because it has much better support for yt-dlp, which I prefer to
youtube-dl.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig')
-rw-r--r--pkgs/aszlig/default.nix5
-rw-r--r--pkgs/aszlig/gpodder/default.nix37
-rw-r--r--pkgs/aszlig/gpodder/disable-autoupdate.patch54
3 files changed, 95 insertions, 1 deletions
diff --git a/pkgs/aszlig/default.nix b/pkgs/aszlig/default.nix
index 79343bab..52513103 100644
--- a/pkgs/aszlig/default.nix
+++ b/pkgs/aszlig/default.nix
@@ -1,4 +1,6 @@
-{ callPackage, vim-full, gopass, mutt, xterm, radare2, rustfmt }:
+{ callPackage, vim-full, gopass, gpodder, mutt, xterm, radare2
+, rustfmt
+}:
 
 {
   aacolorize = callPackage ./aacolorize { };
@@ -6,6 +8,7 @@
   firefox = callPackage ./firefox { };
   git-detach = callPackage ./git-detach { };
   gopass = callPackage ./gopass { inherit gopass; };
+  gpodder = callPackage ./gpodder { inherit gpodder; };
   librxtx_java = callPackage ./librxtx-java { };
   lockdev = callPackage ./lockdev { };
   mutt = callPackage ./mutt { inherit mutt; };
diff --git a/pkgs/aszlig/gpodder/default.nix b/pkgs/aszlig/gpodder/default.nix
new file mode 100644
index 00000000..481ff9ca
--- /dev/null
+++ b/pkgs/aszlig/gpodder/default.nix
@@ -0,0 +1,37 @@
+{ gpodder, fetchFromGitHub, python3Packages, buildSandbox }:
+
+buildSandbox (gpodder.overridePythonAttrs (drv: {
+  version = "git-2023-04-29";
+
+  src = fetchFromGitHub {
+    owner = "gpodder";
+    repo = "gpodder";
+    rev = "0267b448eb97e3db3ebfad1bcf8ae348a44ff856";
+    hash = "sha256-LVlwmNI1EZOdWdIvc4HuN2zwCn+1ouS/upFAP0sge08";
+  };
+
+  patches = [ ./disable-autoupdate.patch ];
+
+  propagatedBuildInputs = with python3Packages; [
+    dbus-python
+    mygpoclient
+    pygobject3
+    eyeD3
+    podcastparser
+    requests
+    html5lib
+    yt-dlp
+  ];
+
+  checkInputs = with python3Packages; [
+    pytest pytest-httpserver minimock
+  ];
+
+  installCheckPhase = ''
+    LC_ALL=C PYTHONPATH=./src:$PYTHONPATH pytest --doctest-modules \
+    tests src/gpodder/util.py src/gpodder/jsonconfig.py
+  '';
+})) {
+  paths.required = [ "$HOME/gPodder" ];
+  fullNixStore = true;
+}
diff --git a/pkgs/aszlig/gpodder/disable-autoupdate.patch b/pkgs/aszlig/gpodder/disable-autoupdate.patch
new file mode 100644
index 00000000..b3c2c40f
--- /dev/null
+++ b/pkgs/aszlig/gpodder/disable-autoupdate.patch
@@ -0,0 +1,54 @@
+diff --git a/share/gpodder/ui/gtk/menus.ui b/share/gpodder/ui/gtk/menus.ui
+index c2c30093..07f655d3 100644
+--- a/share/gpodder/ui/gtk/menus.ui
++++ b/share/gpodder/ui/gtk/menus.ui
+@@ -13,10 +13,6 @@
+         <attribute name="action">app.gotoMygpo</attribute>
+         <attribute name="label" translatable="yes">Go to gpodder.net</attribute>
+       </item>
+-      <item>
+-        <attribute name="action">app.checkForUpdates</attribute>
+-        <attribute name="label" translatable="yes">Software updates</attribute>
+-      </item>
+     </section>
+     <section>
+       <item>
+diff --git a/src/gpodder/config.py b/src/gpodder/config.py
+index e22b4cf8..ec49265f 100644
+--- a/src/gpodder/config.py
++++ b/src/gpodder/config.py
+@@ -92,13 +92,6 @@ defaults = {
+ 
+     'check_connection': True,
+ 
+-    # Software updates from gpodder.org
+-    'software_update': {
+-        'check_on_startup': True,  # check for updates on start
+-        'last_check': 0,  # unix timestamp of last update check
+-        'interval': 5,  # interval (in days) to check for updates
+-    },
+-
+     'ui': {
+         # Settings for the Command-Line Interface
+         'cli': {
+diff --git a/src/gpodder/gtkui/main.py b/src/gpodder/gtkui/main.py
+index 63c2c346..66338054 100644
+--- a/src/gpodder/gtkui/main.py
++++ b/src/gpodder/gtkui/main.py
+@@ -247,7 +247,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
+             util.idle_add(self.subscribe_to_url, self.options.subscribe)
+         elif not self.channels:
+             self.on_itemUpdate_activate()
+-        elif self.config.software_update.check_on_startup:
++        elif False and self.config.software_update.check_on_startup:
+             # Check for software updates from gpodder.org
+             diff = time.time() - self.config.software_update.last_check
+             if diff > (60 * 60 * 24) * self.config.software_update.interval:
+@@ -3489,6 +3489,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
+         If silent=False, a message will be shown even if no updates are
+         available (set silent=False when the check is manually triggered).
+         """
++        return
+         try:
+             up_to_date, version, released, days = util.get_update_info()
+         except Exception as e: