nixpkgs/pkgs/applications/audio/gpodder/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

101 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
2023-06-13 03:50:31 +00:00
, gitUpdater
, glibcLocales
, gnome
, gobject-introspection
, gtk3
, intltool
, python3
, python3Packages
, wrapGAppsHook
, xdg-utils
}:
2014-07-20 19:12:05 +00:00
2017-12-31 01:38:39 +00:00
python3Packages.buildPythonApplication rec {
pname = "gpodder";
2023-10-28 20:07:31 +00:00
version = "3.11.4";
2017-12-31 01:38:39 +00:00
format = "other";
2014-07-20 19:12:05 +00:00
2017-12-31 01:38:39 +00:00
src = fetchFromGitHub {
2019-02-03 16:34:41 +00:00
owner = pname;
repo = pname;
2017-12-31 01:38:39 +00:00
rev = version;
2023-10-28 20:07:31 +00:00
sha256 = "kEhyV1o8VSQW9qMx6m5avj6LnJuVTONDd6msRuc8t/4=";
2014-07-20 19:12:05 +00:00
};
2019-04-14 11:51:15 +00:00
patches = [
./disable-autoupdate.patch
];
2021-01-15 13:21:58 +00:00
postPatch = with lib; ''
sed -i -re 's,^( *gpodder_dir *= *).*,\1"'"$out"'",' bin/gpodder
'';
2017-12-31 01:38:39 +00:00
nativeBuildInputs = [
intltool
wrapGAppsHook
glibcLocales
gobject-introspection
2017-12-31 01:38:39 +00:00
];
buildInputs = [
python3
2021-07-28 04:31:07 +00:00
gtk3
gnome.adwaita-icon-theme
];
2014-07-20 19:12:05 +00:00
nativeCheckInputs = with python3Packages; [
2022-03-09 14:08:03 +00:00
minimock
pytest
pytest-httpserver
pytest-cov
2017-12-31 01:38:39 +00:00
];
doCheck = true;
propagatedBuildInputs = with python3Packages; [
feedparser
dbus-python
mygpoclient
2022-03-09 14:08:03 +00:00
requests
2017-12-31 01:38:39 +00:00
pygobject3
eyeD3
podcastparser
html5lib
mutagen
];
2014-07-20 19:12:05 +00:00
2017-12-31 01:38:39 +00:00
makeFlags = [
"PREFIX=$(out)"
"share/applications/gpodder-url-handler.desktop"
"share/applications/gpodder.desktop"
"share/dbus-1/services/org.gpodder.service"
];
2017-10-25 18:54:19 +00:00
preBuild = ''
2017-12-31 01:38:39 +00:00
export LC_ALL="en_US.UTF-8"
2017-10-25 18:54:19 +00:00
'';
2017-12-31 01:38:39 +00:00
installCheckPhase = ''
2022-03-09 14:08:03 +00:00
LC_ALL=C PYTHONPATH=src/:$PYTHONPATH pytest --ignore=tests --ignore=src/gpodder/utilwin32ctypes.py --doctest-modules src/gpodder/util.py src/gpodder/jsonconfig.py
LC_ALL=C PYTHONPATH=src/:$PYTHONPATH pytest tests --ignore=src/gpodder/utilwin32ctypes.py --ignore=src/mygpoclient --cov=gpodder
2014-08-07 15:49:16 +00:00
'';
makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}" ];
2023-06-13 03:50:31 +00:00
passthru.updateScript = gitUpdater {};
meta = with lib; {
description = "A podcatcher written in python";
longDescription = ''
gPodder downloads and manages free audio and video content (podcasts)
for you. Listen directly on your computer or on your mobile devices.
'';
homepage = "http://gpodder.org/";
2017-03-21 16:12:07 +00:00
license = licenses.gpl3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ mic92 ];
};
2014-07-20 19:12:05 +00:00
}