9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{ lib
|
|
, python3Packages
|
|
, fetchPypi
|
|
, yt-dlp
|
|
, ffmpeg
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "ytmdl";
|
|
version = "2022.03.16";
|
|
|
|
src = fetchPypi {
|
|
inherit pname;
|
|
version = builtins.replaceStrings [ ".0" ] [ "." ] version;
|
|
sha256 = "sha256-2lEOgwSi4fAVK+gJXvjWQDBWIb1cODFmUiq0FUfpyXA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "bs4" "beautifulsoup4" \
|
|
--replace "/etc/bash_completion.d" "share/bash-completion/completions" \
|
|
--replace "/usr/share/zsh/functions/Completion/Unix" "share/zsh/site-functions"
|
|
sed -i '/python_requires=/d' setup.py
|
|
'';
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
ffmpeg-python
|
|
musicbrainzngs
|
|
rich
|
|
simber
|
|
pydes
|
|
youtube-search-python
|
|
unidecode
|
|
pyxdg
|
|
downloader-cli
|
|
beautifulsoup4
|
|
itunespy
|
|
mutagen
|
|
pysocks
|
|
yt-dlp
|
|
ytmusicapi
|
|
spotipy
|
|
];
|
|
|
|
makeWrapperArgs = [
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
|
|
];
|
|
|
|
# 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 ];
|
|
};
|
|
}
|