nixpkgs/pkgs/tools/misc/ytmdl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.3 KiB
Nix
Raw Normal View History

2021-07-05 22:34:35 +00:00
{ lib
2021-08-28 00:04:20 +00:00
, python3Packages
, fetchPypi
2022-03-17 18:15:11 +00:00
, yt-dlp
2021-07-05 22:34:35 +00:00
, ffmpeg
}:
2021-06-15 21:44:28 +00:00
2021-08-28 00:04:20 +00:00
python3Packages.buildPythonApplication rec {
2021-06-15 21:44:28 +00:00
pname = "ytmdl";
2023-09-05 11:42:14 +00:00
version = "2023.07.27";
2021-06-15 21:44:28 +00:00
src = fetchPypi {
2021-08-28 00:04:20 +00:00
inherit pname;
version = builtins.replaceStrings [ ".0" ] [ "." ] version;
2023-09-05 11:42:14 +00:00
sha256 = "sha256-sBRzbUR+zqS8Zzg/uU4bjJUr/n1/tb0K6u/FVTEIRsk=";
2021-06-15 21:44:28 +00:00
};
postPatch = ''
substituteInPlace setup.py \
2021-08-28 00:04:20 +00:00
--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
2021-06-15 21:44:28 +00:00
'';
2021-08-28 00:04:20 +00:00
propagatedBuildInputs = with python3Packages; [
2021-06-15 21:44:28 +00:00
ffmpeg-python
musicbrainzngs
rich
simber
pydes
2021-08-28 00:04:20 +00:00
youtube-search-python
2021-06-15 21:44:28 +00:00
unidecode
pyxdg
downloader-cli
beautifulsoup4
itunespy
mutagen
pysocks
2022-03-17 18:15:11 +00:00
yt-dlp
ytmusicapi
2021-08-28 00:04:20 +00:00
spotipy
2021-06-15 21:44:28 +00:00
];
2021-07-05 22:34:35 +00:00
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
];
2021-06-15 21:44:28 +00: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 01:17:53 +00:00
mainProgram = "ytmdl";
2021-06-15 21:44:28 +00:00
};
}