diff options
author | John Garcia <jgarcia3788@yahoo.co.uk> | 2023-11-04 13:58:18 +0000 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2023-11-06 14:45:25 +0100 |
commit | 87e58fd593870eab91022b91c9535632730d7eb6 (patch) | |
tree | 9e74bbe220904e535116b40d8d7eda11ecf6bfba /pkgs/by-name | |
parent | eb39de91193f8bcdae43d4e00781faacf67ea2d9 (diff) | |
download | nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar.gz nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar.bz2 nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar.lz nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar.xz nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.tar.zst nixpkgs-87e58fd593870eab91022b91c9535632730d7eb6.zip |
clamtk: init at 6.16
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/cl/clamtk/package.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/by-name/cl/clamtk/package.nix b/pkgs/by-name/cl/clamtk/package.nix new file mode 100644 index 00000000000..5abe53ddb8c --- /dev/null +++ b/pkgs/by-name/cl/clamtk/package.nix @@ -0,0 +1,69 @@ +{ lib +, perlPackages +, fetchFromGitHub +, makeWrapper +, gobject-introspection +, perl +, clamav +}: + +perlPackages.buildPerlPackage rec { + pname = "clamtk"; + version = "6.16"; + + src = fetchFromGitHub { + owner = "dave-theunsub"; + repo = "clamtk"; + rev = "v${version}"; + hash = "sha256-o6OaXOXLykTUuF/taKnEhZRV04/3nlU5aNY05ANr1Ko="; + }; + + nativeBuildInputs = [ makeWrapper gobject-introspection ]; + buildInputs = [ perl clamav ]; + propagatedBuildInputs = with perlPackages; [ Glib LWP LWPProtocolHttps TextCSV JSON LocaleGettext Gtk3 ]; + + preConfigure = "touch Makefile.PL"; + # no tests implemented + doCheck = false; + outputs = [ "out" "man" ]; + + postPatch = '' + # Set correct nix paths in perl scripts + substituteInPlace lib/App.pm \ + --replace /usr/bin/freshclam ${lib.getBin clamav}/bin/freshclam \ + --replace /usr/bin/sigtool ${lib.getBin clamav}/bin/sigtool \ + --replace /usr/bin/clamscan ${lib.getBin clamav}/bin/clamscan \ + --replace /usr/bin/clamdscan ${lib.getBin clamav}/bin/clamdscan \ + --replace /usr/share/pixmaps $out/share/pixmaps + + # We want to catch the crontab wrapper on NixOS and the + # System crontab on non-NixOS so we don't give a full path. + substituteInPlace lib/Schedule.pm \ + --replace "( -e '/usr/bin/crontab' )" "(1)" \ + --replace /usr/bin/crontab crontab + ''; + + installPhase = '' + runHook preInstall + + install -D lib/*.pm -t $out/lib/perl5/site_perl/ClamTk + install -D clamtk.desktop -t $out/share/applications + install -D images/* -t $out/share/pixmaps + install -D clamtk.1.gz -t $out/share/man/man1 + install -D -m755 clamtk -t $out/bin + wrapProgram $out/bin/clamtk --prefix PERL5LIB : $PERL5LIB --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" + + runHook postInstall + ''; + + meta = with lib; { + description = '' + Easy to use, lightweight front-end for ClamAV (Clam Antivirus). + ''; + license = licenses.gpl1Plus; + homepage = "https://github.com/dave-theunsub/clamtk"; + platforms = platforms.linux; + maintainers = with maintainers; [ jgarcia ]; + }; + +} |