about summary refs log tree commit diff
path: root/pkgs/applications/networking/sniffnet
diff options
context:
space:
mode:
authorh7x4 <h7x4@nani.wtf>2023-12-01 22:17:20 +0100
committerh7x4 <h7x4@nani.wtf>2023-12-02 06:57:21 +0100
commitefdec26090fe6c61327b67d933e39d694da36bc2 (patch)
treeebdd2c343c8be18cbcfb29b81babb409682eee53 /pkgs/applications/networking/sniffnet
parent5171694860f185961daff3b1b413dabcab421300 (diff)
treewide: install missing desktopItems
Diffstat (limited to 'pkgs/applications/networking/sniffnet')
-rw-r--r--pkgs/applications/networking/sniffnet/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/applications/networking/sniffnet/default.nix b/pkgs/applications/networking/sniffnet/default.nix
index afa496f5ab612..4bfb2d3030501 100644
--- a/pkgs/applications/networking/sniffnet/default.nix
+++ b/pkgs/applications/networking/sniffnet/default.nix
@@ -50,6 +50,16 @@ rustPlatform.buildRustPackage rec {
     "--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github"
   ];
 
+  postInstall = ''
+    for res in $(ls resources/packaging/linux/graphics | sed -e 's/sniffnet_//g' -e 's/x.*//g'); do
+      install -Dm444 resources/packaging/linux/graphics/sniffnet_''${res}x''${res}.png \
+        $out/share/icons/hicolor/''${res}x''${res}/apps/sniffnet.png
+    done
+    install -Dm444 resources/packaging/linux/sniffnet.desktop -t $out/share/applications
+    substituteInPlace $out/share/applications/sniffnet.desktop \
+      --replace 'Exec=/usr/bin/sniffnet' 'Exec=sniffnet'
+  '';
+
   postFixup = lib.optionalString stdenv.isLinux ''
     patchelf $out/bin/sniffnet \
       --add-rpath ${lib.makeLibraryPath [ vulkan-loader xorg.libX11 ]}