about summary refs log tree commit diff
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@users.noreply.github.com>2019-04-05 15:52:08 -0400
committerGitHub <noreply@github.com>2019-04-05 15:52:08 -0400
commitc794bdaf0e8d1effd5795f51dc5e9571b3cff014 (patch)
tree3a3c1edb6314e3a647e32a3cafc086eecbeaf2c6
parent014196b7dbcbccc1b4771b87d013d7b2f39bada2 (diff)
parent810df3f55c29e2379218bfaad3b6728096937f9b (diff)
downloadnixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar.gz
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar.bz2
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar.lz
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar.xz
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.tar.zst
nixlib-c794bdaf0e8d1effd5795f51dc5e9571b3cff014.zip
Merge pull request #58970 from eyJhb/curseradio
curseradio: init at 0.2
-rw-r--r--pkgs/applications/audio/curseradio/default.nix36
-rw-r--r--pkgs/applications/audio/curseradio/mpv.patch11
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/audio/curseradio/default.nix b/pkgs/applications/audio/curseradio/default.nix
new file mode 100644
index 000000000000..1dd5f9ee5eb2
--- /dev/null
+++ b/pkgs/applications/audio/curseradio/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, substituteAll, python3Packages, mpv }:
+
+python3Packages.buildPythonApplication rec {
+  version = "0.2";
+  pname = "curseradio";
+
+  src = fetchFromGitHub {
+    owner = "chronitis";
+    repo = pname;
+    rev = "1bd4bd0faeec675e0647bac9a100b526cba19f8d";
+    sha256 = "11bf0jnj8h2fxhpdp498189r4s6b47vy4wripv0z4nx7lxajl88i";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    requests
+    lxml
+    pyxdg
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./mpv.patch;
+      inherit mpv;
+    })
+  ];
+
+  # No tests
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Command line radio player";
+    homepage = "https://github.com/chronitis/curseradio";
+    license = licenses.mit;
+    maintainers = [ maintainers.eyjhb ];
+  };
+}
diff --git a/pkgs/applications/audio/curseradio/mpv.patch b/pkgs/applications/audio/curseradio/mpv.patch
new file mode 100644
index 000000000000..d085dc791099
--- /dev/null
+++ b/pkgs/applications/audio/curseradio/mpv.patch
@@ -0,0 +1,11 @@
+--- a/curseradio/curseradio.py
++++ b/curseradio/curseradio.py
+@@ -30,7 +30,7 @@ import re
+ 
+ CONFIG_DEFAULT = {
+     'opml': {'root': "http://opml.radiotime.com/"},
+-    'playback': {'command': '/usr/bin/mpv'},
++    'playback': {'command': '@mpv@/bin/mpv'},
+     'interface': {'keymap': 'default'},
+     'keymap.default': {
+         'up': 'KEY_UP',
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index cea186d5f776..640c3803b050 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16771,6 +16771,8 @@ in
 
   cuneiform = callPackage ../tools/graphics/cuneiform {};
 
+  curseradio = callPackage ../applications/audio/curseradio { };
+
   cutecom = libsForQt5.callPackage ../tools/misc/cutecom { };
 
   cutegram =