turnon: 2.0.0 -> 2.3.1 (#370430)
[NixPkgs.git] / pkgs / by-name / py / pyradio / package.nix
blobc60203cd1e0b6d1d42fe290f67f5a126c7fab89f
2   lib,
3   python3Packages,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 python3Packages.buildPythonApplication rec {
9   pname = "pyradio";
10   version = "0.9.3.11.4";
12   src = fetchFromGitHub {
13     owner = "coderholic";
14     repo = "pyradio";
15     tag = version;
16     hash = "sha256-r/XJIHxi/0+G+Xm0ftuffl01SGwnkSXk0OpAy8yoXzc=";
17   };
19   nativeBuildInputs = [
20     installShellFiles
21   ];
23   propagatedBuildInputs = with python3Packages; [
24     dnspython
25     netifaces
26     psutil
27     python-dateutil
28     requests
29     rich
30   ];
32   postPatch = ''
33     # Disable update check
34     substituteInPlace pyradio/config \
35       --replace-fail "distro = None" "distro = NixOS"
36   '';
38   checkPhase = ''
39     $out/bin/pyradio --help
40   '';
42   postInstall = ''
43     installManPage *.1
44   '';
46   meta = with lib; {
47     homepage = "http://www.coderholic.com/pyradio/";
48     description = "Curses based internet radio player";
49     mainProgram = "pyradio";
50     changelog = "https://github.com/coderholic/pyradio/releases/tag/${version}";
51     license = licenses.mit;
52     maintainers = with maintainers; [
53       contrun
54       yayayayaka
55     ];
56   };