summary refs log tree commit diff
path: root/pkgs/applications/networking/newsreaders/kwooty/default.nix
blob: e49e2c6fe261bb7f69399f94619986821c5cf309 (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
{ stdenv, fetchurl, cmake, qt4, gettext
, kdelibs, kdebase_workspace, perl
, openssl, phonon, automoc4
, libX11, libXext, libXft
, unrar, p7zip, par2cmdline, coreutils
}:

let version = "0.8.4";
    name = "kwooty-${version}";
in stdenv.mkDerivation {
  inherit name;
  
  src = fetchurl {
    url = "mirror://sourceforge/kwooty/${name}.tar.gz";
    sha256 = "0i3zmh7y52n5k0yn3xc6zjpjz75f48nly40n394i6sxy89psgfc2";
  };

  patches = [ ./searchPath.patch ];

  postPatch = ''
    echo "Changing paths to archive utilities to the nix store";
    substituteInPlace "src/utility.cpp" \
      --replace "/usr/bin/unrar" "${unrar}/bin" \
      --replace "/usr/bin/unpar" "${par2cmdline}/bin" \
      --replace "/usr/bin/7z" "${p7zip}/bin" \
      --replace "/usr/bin/nice" "${coreutils}/bin/nice"
  '';

  buildInputs =
    [ stdenv perl cmake qt4 gettext automoc4 openssl
      kdelibs kdebase_workspace phonon
      libX11 libXext libXft
    ];
                  
  meta = {
    description = "Binary news reader of KDE";
  };
}