about summary refs log tree commit diff
path: root/pkgs/applications/audio/pyradio
diff options
context:
space:
mode:
authorYaya <github@uwu.is>2024-04-20 13:47:08 +0200
committerYaya <github@uwu.is>2024-05-04 17:13:59 +0200
commita98dd90cef69b7240440ddb52720dada0a2ba3e0 (patch)
treeb952f2250464fc129d620f7fdf5b4143281bf5f7 /pkgs/applications/audio/pyradio
parent2f075b8ad94f112e99b4def30f6f0040d7a8b8b5 (diff)
pyradio: Disable update check
pyradio checks for new releases every 10 days and offers the user to
self-update:

```console
$ pyradio --update
Released version   :  0.9.3.3
Installed version  :  0.9.3.1
Updating PyRadio...
Using directory: "/tmp/tmp-pyradio"
Downloading PyRadio source code...
  url: "https://github.com/coderholic/pyradio/archive/0.9.3.3.zip"
  filename: "/tmp/tmp-pyradio/pyradio-0.9.3.3.zip"
^CError: Failed to download PyRadio source code..
```

This functionality can be disabled by setting the `distro` configuration
parameter to anything different than `None`. With such patch applied, it
will now refuse to self-update:

```console
$ pyradio --update
PyRadio has been installed using either pip or your distribution's
package manager. Please use that to update it.
```

Co-authored-by: Guilhem Saurel <guilhem.saurel@laas.fr>
Diffstat (limited to 'pkgs/applications/audio/pyradio')
-rw-r--r--pkgs/applications/audio/pyradio/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/audio/pyradio/default.nix b/pkgs/applications/audio/pyradio/default.nix
index 72cbfd443c08b..d6d5a6d78a6c5 100644
--- a/pkgs/applications/audio/pyradio/default.nix
+++ b/pkgs/applications/audio/pyradio/default.nix
@@ -28,6 +28,12 @@ python3Packages.buildPythonApplication rec {
     rich
   ];
 
+  postPatch = ''
+    # Disable update check
+    substituteInPlace pyradio/config \
+      --replace-fail "distro = None" "distro = NixOS"
+  '';
+
   checkPhase = ''
     $out/bin/pyradio --help
   '';