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