nixpkgs/pkgs/applications/networking/feedreaders/castget/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

53 lines
1.4 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, autoreconfHook
, pkgconfig
, glib
, ronn
, curl
, id3lib
, libxml2
, glibcLocales
}:
stdenv.mkDerivation rec {
pname = "castget";
version = "2.0.0";
src = fetchFromGitHub {
owner = "mlj";
repo = pname;
# Upstream uses `_` instead of `.` for the version
rev = "rel_${lib.replaceStrings ["."] ["_"] version}";
sha256 = "1129x64rw587q3sdpa3lrgs0gni5f0siwbvmfz8ya4zkbhgi2ik7";
};
# without this, the build fails because of an encoding issue with the manual page.
# https://stackoverflow.com/a/17031697/4935114
# This requires glibcLocales to be present in the build so it will have an impact.
# See https://github.com/NixOS/nixpkgs/issues/8398
preBuild = ''
export LC_ALL="en_US.UTF-8";
'';
buildInputs = [ glib curl id3lib libxml2 ];
nativeBuildInputs = [
ronn
# See comment on locale above
glibcLocales
autoreconfHook
pkgconfig
];
meta = with lib; {
description = "A simple, command-line based RSS enclosure downloader";
longDescription = ''
castget is a simple, command-line based RSS enclosure downloader. It is
primarily intended for automatic, unattended downloading of podcasts.
'';
homepage = "https://castget.johndal.com/";
maintainers = with maintainers; [ doronbehar ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}