2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "pyradio";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.9.3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coderholic";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pyradio";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-EoHCOg4nPkKRSFX/3AUKJaXzS6J1quwtv+mKeKBu5Ns=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
dnspython
|
2024-04-21 15:54:59 +00:00
|
|
|
netifaces
|
|
|
|
psutil
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
rich
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Disable update check
|
|
|
|
substituteInPlace pyradio/config \
|
|
|
|
--replace-fail "distro = None" "distro = NixOS"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
$out/bin/pyradio --help
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage *.1
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.coderholic.com/pyradio/";
|
|
|
|
description = "Curses based internet radio player";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pyradio";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/coderholic/pyradio/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ contrun yayayayaka ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|