1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4
5 name = "f-prot-${version}";
6 version = "6.2.1";
7
8 src = fetchurl {
9 url = http://files.f-prot.com/files/unix-trial/fp-Linux.x86.32-ws.tar.gz;
10 sha256 = "0qlsrkanf0inplwv1i6hqbimdg91syf5ggd1vahsm9lhivmnr0v5";
11 };
12
13 installPhase = ''
14 mkdir -p $out/bin
15 cp fpscan $out/bin
16
17 mkdir -p $out/opt/f-prot
18 cp fpupdate $out/opt/f-prot
19 cp product.data.default $out/opt/f-prot/product.data
20 cp license.key $out/opt/f-prot/
21 cp f-prot.conf.default $out/opt/f-prot/f-prot.conf
22 ln -s $out/opt/f-prot/fpupdate $out/bin/fpupdate
23
24 patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate
25
26 mkdir -p $out/share/man/
27 mkdir -p $out/share/man/man1
28 cp doc/man/fpscan.1 $out/share/man/man1
29 mkdir -p $out/share/man/man5
30 cp doc/man/f-prot.conf.5 $out/share/man/man5
31 mkdir -p $out/share/man/man8
32 cp doc/man/fpupdate.8 $out/share/man/man8
33 '';
34
35 meta = with stdenv.lib; {
36 homepage = http://www.f-prot.com;
37 description = "A popular proprietary antivirus program";
38 license = licenses.unfree;
39 maintainers = [ maintainers.phreedom ];
40 platforms = platforms.linux;
41 };
42}