Commit e7543c18 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

clamtk: wrap with wrapGAppsHook

Fix crashing due to missing icon files with wrapGAppsHook

Pass extra makeWrapper arguments through gappsWrapperArgs.
parent 067cd413
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
{ lib
, perlPackages
, fetchFromGitHub
, makeWrapper
, wrapGAppsHook
, gobject-introspection
, perl
, clamav
@@ -18,7 +18,7 @@ perlPackages.buildPerlPackage rec {
    hash = "sha256-o6OaXOXLykTUuF/taKnEhZRV04/3nlU5aNY05ANr1Ko=";
  };

  nativeBuildInputs = [ makeWrapper gobject-introspection ];
  nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
  buildInputs = [ perl clamav ];
  propagatedBuildInputs = with perlPackages; [ Glib LWP LWPProtocolHttps TextCSV JSON LocaleGettext Gtk3 ];

@@ -51,11 +51,17 @@ perlPackages.buildPerlPackage rec {
    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
  '';

  preFixup = ''
    gappsWrapperArgs+=(
      --prefix PERL5LIB : $PERL5LIB
      --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
    )
  '';

  meta = with lib; {
    description = ''
      Easy to use, lightweight front-end for ClamAV (Clam Antivirus).