about summary refs log tree commit diff
path: root/pkgs/tools/misc/ytmdl/default.nix
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2021-08-28 00:04:20 +0000
committerMario Rodas <marsam@users.noreply.github.com>2021-08-28 00:04:20 +0000
commitd3a7131d7d1d507393ce71f5d6ddd9f290aaa567 (patch)
tree542660ada0ca7ce32c3d042d439bf8347e056b3c /pkgs/tools/misc/ytmdl/default.nix
parent87e41eca9c2408d692538db323b5f0ed0fdec842 (diff)
ytmdl: 2021.06.26 -> 2021.08.01
Diffstat (limited to 'pkgs/tools/misc/ytmdl/default.nix')
-rw-r--r--pkgs/tools/misc/ytmdl/default.nix37
1 files changed, 13 insertions, 24 deletions
diff --git a/pkgs/tools/misc/ytmdl/default.nix b/pkgs/tools/misc/ytmdl/default.nix
index 43f46bc052314..90a0590b8d955 100644
--- a/pkgs/tools/misc/ytmdl/default.nix
+++ b/pkgs/tools/misc/ytmdl/default.nix
@@ -1,44 +1,32 @@
 { lib
-, fetchFromGitHub
-, python3
-, fetchpatch
+, python3Packages
 , ffmpeg
 }:
 
-python3.pkgs.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "ytmdl";
-  version = "2021.06.26";
+  version = "2021.08.01";
 
-  src = fetchFromGitHub {
-    owner = "deepjyoti30";
-    repo = pname;
-    rev = version;
-    sha256 = "1jpd5zhqg2m9vjjjw4mgzb594q1v1pq1yl65py6kw42bq9w5yl5p";
+  src = python3Packages.fetchPypi {
+    inherit pname;
+    version = builtins.replaceStrings [ ".0" ] [ "." ] version;
+    sha256 = "f5ef23dcba89aaf2307baf4ffc2326dc5c02324f646e5e5748219ed328202af4";
   };
 
-  patches = [
-    # Fixes https://github.com/deepjyoti30/ytmdl/issues/188
-    # Only needed until the next major release after 2021.06.26
-    (fetchpatch {
-      url = "https://github.com/deepjyoti30/ytmdl/commit/37ba821d9692249c1fa563505cf60bd11b8e209e.patch";
-      includes = [ "bin/ytmdl" ];
-      sha256 = "sha256-VqtthpUL0Oub3DK7tSvAnemOzPPTcLvXXeebZIGOgdc=";
-    })
-  ];
-
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "bs4" "beautifulsoup4"
+      --replace "bs4" "beautifulsoup4" \
+      --replace "/etc/bash_completion.d" "share/bash-completion/completions" \
+      --replace "/usr/share/zsh/functions/Completion/Unix" "share/zsh/site-functions"
   '';
 
-
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = with python3Packages; [
     ffmpeg-python
     musicbrainzngs
     rich
     simber
     pydes
-    youtube-search
+    youtube-search-python
     unidecode
     pyxdg
     downloader-cli
@@ -48,6 +36,7 @@ python3.pkgs.buildPythonApplication rec {
     pysocks
     youtube-dl
     ytmusicapi
+    spotipy
   ];
 
   makeWrapperArgs = [