base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / py / pyradio / package.nix
blob85ccaedd97a8b934443c928f16a6e8e180067ba7
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , installShellFiles
5 }:
7 python3Packages.buildPythonApplication rec {
8   pname = "pyradio";
9   version = "0.9.3.11.1";
11   src = fetchFromGitHub {
12     owner = "coderholic";
13     repo = "pyradio";
14     rev = "refs/tags/${version}";
15     hash = "sha256-k/MgvdR4ed9qMLx52AAK7Aq963/qkUyF+bam06yCZHc=";
16   };
18   nativeBuildInputs = [
19     installShellFiles
20   ];
22   propagatedBuildInputs = with python3Packages; [
23     dnspython
24     netifaces
25     psutil
26     python-dateutil
27     requests
28     rich
29   ];
31   postPatch = ''
32     # Disable update check
33     substituteInPlace pyradio/config \
34       --replace-fail "distro = None" "distro = NixOS"
35   '';
37   checkPhase = ''
38     $out/bin/pyradio --help
39   '';
41   postInstall = ''
42     installManPage *.1
43   '';
45   meta = with lib; {
46     homepage = "http://www.coderholic.com/pyradio/";
47     description = "Curses based internet radio player";
48     mainProgram = "pyradio";
49     changelog = "https://github.com/coderholic/pyradio/releases/tag/${version}";
50     license = licenses.mit;
51     maintainers = with maintainers; [ contrun yayayayaka ];
52   };