summary refs log tree commit diff
path: root/pkgs/applications/science/robotics
diff options
context:
space:
mode:
authorDaniel Nagy <danielnagy@posteo.de>2023-05-03 13:15:00 +0200
committerDaniel Nagy <danielnagy@posteo.de>2023-05-15 21:00:00 +0200
commit66f045a65f89ec18af9e1f8cf5eb45cef37a0eee (patch)
treea934cc9327d1b12dbc565132ac3a608cdb1800e2 /pkgs/applications/science/robotics
parent8a4f016281d5d1458013aef414e17574f883d338 (diff)
betaflight-configurator: reduce size
This reduces the size of the output from 512.5M to 233.9M.
Diffstat (limited to 'pkgs/applications/science/robotics')
-rw-r--r--pkgs/applications/science/robotics/betaflight-configurator/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/applications/science/robotics/betaflight-configurator/default.nix b/pkgs/applications/science/robotics/betaflight-configurator/default.nix
index a76327b854b0d..e8e5fbba4e499 100644
--- a/pkgs/applications/science/robotics/betaflight-configurator/default.nix
+++ b/pkgs/applications/science/robotics/betaflight-configurator/default.nix
@@ -19,11 +19,17 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-9FzMyBIR2u1zXHtTWJABM6RF1+OyjYdEPlRwtig9blI=";
   };
 
+  # remove large unneeded files
+  postUnpack = ''
+    find -name "lib*.so" -delete
+  '';
+
   nativeBuildInputs = [ wrapGAppsHook unzip ];
 
   buildInputs = [ gsettings-desktop-schemas gtk3 ];
 
   installPhase = ''
+    runHook preInstall
     mkdir -p $out/bin \
              $out/opt/${pname}
 
@@ -32,6 +38,7 @@ stdenv.mkDerivation rec {
     cp -r ${desktopItem}/share/applications $out/share/
 
     makeWrapper ${nwjs}/bin/nw $out/bin/${pname} --add-flags $out/opt/${pname}
+    runHook postInstall
   '';
 
   meta = with lib; {