about summary refs log tree commit diff
path: root/pkgs/applications/networking/feedreaders/castget/default.nix
blob: f0f09c8de7e6e136bd0f2d22098ee7eb7064bde0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib, stdenv, fetchFromGitHub
, autoreconfHook
, pkg-config
, 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
    pkg-config
  ];

  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;
  };
}