2021-07-05 23:34:35 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
2021-07-06 19:11:41 +01:00
|
|
|
, fetchpatch
|
2021-07-05 23:34:35 +01:00
|
|
|
, ffmpeg
|
2021-06-27 17:42:55 +01:00
|
|
|
}:
|
2021-06-15 22:44:28 +01:00
|
|
|
|
2021-07-05 23:34:35 +01:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-06-15 22:44:28 +01:00
|
|
|
pname = "ytmdl";
|
2021-06-27 17:42:55 +01:00
|
|
|
version = "2021.06.26";
|
2021-06-15 22:44:28 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepjyoti30";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-27 17:42:55 +01:00
|
|
|
sha256 = "1jpd5zhqg2m9vjjjw4mgzb594q1v1pq1yl65py6kw42bq9w5yl5p";
|
2021-06-15 22:44:28 +01:00
|
|
|
};
|
|
|
|
|
2021-07-06 19:11:41 +01:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-15 22:44:28 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "bs4" "beautifulsoup4"
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-07-05 23:34:35 +01:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-06-15 22:44:28 +01:00
|
|
|
ffmpeg-python
|
|
|
|
musicbrainzngs
|
|
|
|
rich
|
|
|
|
simber
|
|
|
|
pydes
|
|
|
|
youtube-search
|
|
|
|
unidecode
|
|
|
|
pyxdg
|
|
|
|
downloader-cli
|
|
|
|
beautifulsoup4
|
|
|
|
itunespy
|
|
|
|
mutagen
|
|
|
|
pysocks
|
|
|
|
youtube-dl
|
2021-06-27 17:42:55 +01:00
|
|
|
ytmusicapi
|
2021-06-15 22:44:28 +01:00
|
|
|
];
|
|
|
|
|
2021-07-05 23:34:35 +01:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
|
|
|
|
];
|
|
|
|
|
2021-06-15 22:44:28 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|