about summary refs log tree commit diff
path: root/pkgs/by-name/cl
diff options
context:
space:
mode:
authorYueh-Shun Li <shamrocklee@posteo.net>2023-11-21 12:59:07 +0800
committerYueh-Shun Li <shamrocklee@posteo.net>2023-11-21 12:59:07 +0800
commite7543c18c999e12640dad08f685d49a5fade333b (patch)
tree8d421faa2b73dbda078de003b7119e15718f4100 /pkgs/by-name/cl
parent067cd413380370d8e9ae2de6a3de0a06c53d54f9 (diff)
clamtk: wrap with wrapGAppsHook
Fix crashing due to missing icon files with wrapGAppsHook

Pass extra makeWrapper arguments through gappsWrapperArgs.
Diffstat (limited to 'pkgs/by-name/cl')
-rw-r--r--pkgs/by-name/cl/clamtk/package.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/by-name/cl/clamtk/package.nix b/pkgs/by-name/cl/clamtk/package.nix
index 5abe53ddb8c09..f212542e04099 100644
--- a/pkgs/by-name/cl/clamtk/package.nix
+++ b/pkgs/by-name/cl/clamtk/package.nix
@@ -1,7 +1,7 @@
 { 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).