1{ lib, stdenv, fetchurl, curl, libmrss, podofo, libiconv }:
2
3stdenv.mkDerivation rec {
4 pname = "offrss";
5 version = "1.3";
6
7 installPhase = ''
8 mkdir -p $out/bin
9 cp offrss $out/bin
10 '';
11
12 buildInputs = [ curl libmrss ]
13 ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) podofo
14 ++ lib.optional (!stdenv.isLinux) libiconv;
15
16 configurePhase = ''
17 substituteInPlace Makefile \
18 --replace '$(CC) $(CFLAGS) $(LDFLAGS)' '$(CXX) $(CFLAGS) $(LDFLAGS)'
19 '' + lib.optionalString (!stdenv.isLinux) ''
20 sed 's/#EXTRA/EXTRA/' -i Makefile
21 '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
22 sed 's/^PDF/#PDF/' -i Makefile
23 '';
24
25 src = fetchurl {
26 url = "http://vicerveza.homeunix.net/~viric/soft/offrss/offrss-${version}.tar.gz";
27 sha256 = "1akw1x84jj2m9z60cvlvmz21qwlaywmw18pl7lgp3bj5nw6250p6";
28 };
29
30 meta = with lib; {
31 homepage = "http://vicerveza.homeunix.net/~viric/cgi-bin/offrss";
32 description = "Offline RSS/Atom reader";
33 license = licenses.agpl3Plus;
34 maintainers = with maintainers; [ viric ];
35 platforms = lib.platforms.linux;
36 };
37}