skim: 0.15.7 -> 0.16.0 (#376410)
[NixPkgs.git] / pkgs / by-name / yt / ytmdl / package.nix
blobb73ccd6c8c867e44ceef7fe0bbfb8427683563d0
2   lib,
3   python3Packages,
4   fetchPypi,
5   yt-dlp,
6   ffmpeg,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "ytmdl";
11   version = "2023.11.26";
13   src = fetchPypi {
14     inherit pname;
15     version = builtins.replaceStrings [ ".0" ] [ "." ] version;
16     hash = "sha256-Im3rQAs/TYookv6FeGpU6tJxUGBMb6/UW1ZMDg9FW4s=";
17   };
19   postPatch = ''
20     substituteInPlace setup.py \
21       --replace "bs4" "beautifulsoup4" \
22       --replace "/etc/bash_completion.d" "share/bash-completion/completions" \
23       --replace "/usr/share/zsh/functions/Completion/Unix" "share/zsh/site-functions"
24     sed -i '/python_requires=/d' setup.py
25   '';
27   propagatedBuildInputs = with python3Packages; [
28     ffmpeg-python
29     musicbrainzngs
30     rich
31     simber
32     pydes
33     youtube-search-python
34     unidecode
35     pyxdg
36     downloader-cli
37     beautifulsoup4
38     itunespy
39     mutagen
40     pysocks
41     yt-dlp
42     ytmusicapi
43     spotipy
44   ];
46   makeWrapperArgs = [
47     "--prefix"
48     "PATH"
49     ":"
50     (lib.makeBinPath [ ffmpeg ])
51   ];
53   # This application has no tests
54   doCheck = false;
56   meta = with lib; {
57     homepage = "https://github.com/deepjyoti30/ytmdl";
58     description = "YouTube Music Downloader";
59     license = licenses.mit;
60     maintainers = with maintainers; [ j0hax ];
61     mainProgram = "ytmdl";
62   };