2021-07-06 01:34:35 +03:00
|
|
|
{ lib
|
2021-08-28 03:04:20 +03:00
|
|
|
, python3Packages
|
2023-05-25 17:07:31 +03:00
|
|
|
, fetchPypi
|
2022-03-17 21:15:11 +03:00
|
|
|
, yt-dlp
|
2021-07-06 01:34:35 +03:00
|
|
|
, ffmpeg
|
2021-06-27 19:42:55 +03:00
|
|
|
}:
|
2021-06-16 00:44:28 +03:00
|
|
|
|
2021-08-28 03:04:20 +03:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2021-06-16 00:44:28 +03:00
|
|
|
pname = "ytmdl";
|
2023-12-01 17:33:18 +03:00
|
|
|
version = "2023.11.26";
|
2021-06-16 00:44:28 +03:00
|
|
|
|
2023-05-25 17:07:31 +03:00
|
|
|
src = fetchPypi {
|
2021-08-28 03:04:20 +03:00
|
|
|
inherit pname;
|
|
|
|
version = builtins.replaceStrings [ ".0" ] [ "." ] version;
|
2023-12-01 17:33:18 +03:00
|
|
|
sha256 = "sha256-Im3rQAs/TYookv6FeGpU6tJxUGBMb6/UW1ZMDg9FW4s=";
|
2021-06-16 00:44:28 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-08-28 03:04:20 +03:00
|
|
|
--replace "bs4" "beautifulsoup4" \
|
|
|
|
--replace "/etc/bash_completion.d" "share/bash-completion/completions" \
|
|
|
|
--replace "/usr/share/zsh/functions/Completion/Unix" "share/zsh/site-functions"
|
2023-03-12 21:57:02 +03:00
|
|
|
sed -i '/python_requires=/d' setup.py
|
2021-06-16 00:44:28 +03:00
|
|
|
'';
|
|
|
|
|
2021-08-28 03:04:20 +03:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2021-06-16 00:44:28 +03:00
|
|
|
ffmpeg-python
|
|
|
|
musicbrainzngs
|
|
|
|
rich
|
|
|
|
simber
|
|
|
|
pydes
|
2021-08-28 03:04:20 +03:00
|
|
|
youtube-search-python
|
2021-06-16 00:44:28 +03:00
|
|
|
unidecode
|
|
|
|
pyxdg
|
|
|
|
downloader-cli
|
|
|
|
beautifulsoup4
|
|
|
|
itunespy
|
|
|
|
mutagen
|
|
|
|
pysocks
|
2022-03-17 21:15:11 +03:00
|
|
|
yt-dlp
|
2021-06-27 19:42:55 +03:00
|
|
|
ytmusicapi
|
2021-08-28 03:04:20 +03:00
|
|
|
spotipy
|
2021-06-16 00:44:28 +03:00
|
|
|
];
|
|
|
|
|
2021-07-06 01:34:35 +03:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
|
|
|
|
];
|
|
|
|
|
2021-06-16 00:44:28 +03:00
|
|
|
# This application has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/deepjyoti30/ytmdl";
|
|
|
|
description = "YouTube Music Downloader";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ j0hax ];
|
2023-11-27 04:17:53 +03:00
|
|
|
mainProgram = "ytmdl";
|
2021-06-16 00:44:28 +03:00
|
|
|
};
|
|
|
|
}
|