5 , gobject-introspection
10 perlPackages.buildPerlPackage rec {
14 src = fetchFromGitHub {
15 owner = "dave-theunsub";
18 hash = "sha256-ClBsBXbGj67zgrkA9EjgK7s3OmXOJA+xV5xLGOcMsbI=";
21 nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
22 buildInputs = [ perl clamav ];
23 propagatedBuildInputs = with perlPackages; [ Glib LWP LWPProtocolHttps TextCSV JSON LocaleGettext Gtk3 ];
25 preConfigure = "touch Makefile.PL";
26 # no tests implemented
28 outputs = [ "out" "man" ];
31 # Set correct nix paths in perl scripts
32 substituteInPlace lib/App.pm \
33 --replace /usr/bin/freshclam ${lib.getBin clamav}/bin/freshclam \
34 --replace /usr/bin/sigtool ${lib.getBin clamav}/bin/sigtool \
35 --replace /usr/bin/clamscan ${lib.getBin clamav}/bin/clamscan \
36 --replace /usr/bin/clamdscan ${lib.getBin clamav}/bin/clamdscan \
37 --replace /usr/share/pixmaps $out/share/pixmaps
39 # We want to catch the crontab wrapper on NixOS and the
40 # System crontab on non-NixOS so we don't give a full path.
41 substituteInPlace lib/Schedule.pm \
42 --replace "( -e '/usr/bin/crontab' )" "(1)" \
43 --replace /usr/bin/crontab crontab
49 install -Dm755 clamtk -t $out/bin
50 install -Dm444 lib/*.pm -t $out/lib/perl5/site_perl/ClamTk
51 install -Dm444 clamtk.desktop -t $out/share/applications
52 install -Dm444 images/* -t $out/share/pixmaps
53 install -Dm444 clamtk.1.gz -t $out/share/man/man1
54 install -Dm444 {CHANGES,LICENSE,*.md} -t $out/share/doc/clamtk
61 --prefix PERL5LIB : $PERL5LIB
62 --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
68 Easy to use, lightweight front-end for ClamAV (Clam Antivirus).
70 mainProgram = "clamtk";
71 license = licenses.gpl1Plus;
72 homepage = "https://github.com/dave-theunsub/clamtk";
73 platforms = platforms.linux;
74 maintainers = with maintainers; [ chewblacka ShamrockLee ];