main
1{
2 lib,
3 python3,
4 yt-dlp,
5}:
6
7python3.pkgs.buildPythonApplication {
8 pname = "music-playlist-dl";
9 version = "1.0.0";
10 format = "other";
11
12 src = ./.;
13
14 propagatedBuildInputs = with python3.pkgs; [
15 pyyaml
16 ];
17
18 # yt-dlp is a runtime dependency
19 makeWrapperArgs = [
20 "--prefix PATH : ${lib.makeBinPath [ yt-dlp ]}"
21 ];
22
23 # Don't unpack since we're not using a typical Python package structure
24 dontUnpack = true;
25 dontBuild = true;
26
27 # Simple install: just copy the script
28 installPhase = ''
29 runHook preInstall
30
31 mkdir -p $out/bin
32 cp ${./music-playlist-dl.py} $out/bin/music-playlist-dl
33 chmod +x $out/bin/music-playlist-dl
34
35 runHook postInstall
36 '';
37
38 meta = with lib; {
39 description = "Download DJ podcasts/radio shows and generate playlists";
40 homepage = "https://github.com/vdemeester/home";
41 license = licenses.mit;
42 maintainers = [ ];
43 mainProgram = "music-playlist-dl";
44 };
45}