1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 00:25:24 +00:00
nixpkgs/pkgs/applications/audio/gpodder/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

82 lines
1.7 KiB
Nix

{ lib, stdenv, fetchFromGitHub, python3, python3Packages, intltool
, glibcLocales, gnome3, gtk3, wrapGAppsHook
, gobject-introspection
}:
python3Packages.buildPythonApplication rec {
pname = "gpodder";
version = "3.10.17";
format = "other";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0wrk8d4q6ricbcjzlhk10vrk1qg9hi323kgyyd0c8nmh7a82h8pd";
};
patches = [
./disable-autoupdate.patch
];
postPatch = with stdenv.lib; ''
sed -i -re 's,^( *gpodder_dir *= *).*,\1"'"$out"'",' bin/gpodder
'';
nativeBuildInputs = [
intltool
wrapGAppsHook
glibcLocales
];
buildInputs = [
python3
gobject-introspection
gnome3.adwaita-icon-theme
];
checkInputs = with python3Packages; [
coverage minimock
];
doCheck = true;
propagatedBuildInputs = with python3Packages; [
feedparser
dbus-python
mygpoclient
pygobject3
eyeD3
podcastparser
html5lib
gtk3
];
makeFlags = [
"PREFIX=$(out)"
"share/applications/gpodder-url-handler.desktop"
"share/applications/gpodder.desktop"
"share/dbus-1/services/org.gpodder.service"
];
preBuild = ''
export LC_ALL="en_US.UTF-8"
'';
installCheckPhase = ''
LC_ALL=C PYTHONPATH=./src:$PYTHONPATH python3 -m gpodder.unittests
'';
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/";
license = licenses.gpl3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ skeidel mic92 ];
};
}