summary refs log tree commit diff
path: root/pkgs/tools/security/fprot/default.nix
blob: 2a8531a179541d387015b9f79f88582f8708b10e (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
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {

  name = "f-prot-${version}";
  version = "6.2.1";

  src = fetchurl {
    url = http://files.f-prot.com/files/unix-trial/fp-Linux.x86.32-ws.tar.gz;
    sha256 = "0qlsrkanf0inplwv1i6hqbimdg91syf5ggd1vahsm9lhivmnr0v5";
  };

  installPhase = ''
    ensureDir $out/bin
    cp fpscan $out/bin

    ensureDir $out/opt/f-prot
    cp fpupdate $out/opt/f-prot
    cp product.data.default $out/opt/f-prot/product.data
    cp license.key $out/opt/f-prot/
    cp f-prot.conf.default $out/opt/f-prot/f-prot.conf
    ln -s $out/opt/f-prot/fpupdate $out/bin/fpupdate

    patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate

    ensureDir $out/share/man/
    ensureDir $out/share/man/man1
    cp doc/man/fpscan.1 $out/share/man/man1
    ensureDir $out/share/man/man5
    cp doc/man/f-prot.conf.5 $out/share/man/man5
    ensureDir $out/share/man/man8
    cp doc/man/fpupdate.8 $out/share/man/man8
  '';

  meta = with stdenv.lib; {
    homepage = http://www.f-prot.com;
    description = "A popular proprietary antivirus program";
    license = licenses.unfree;
    maintainers = [ maintainers.phreedom ];
    platforms = platforms.linux;
  };
}