about summary refs log tree commit diff
path: root/pkgs/applications/networking/irc/communi
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2022-08-13 13:31:05 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2022-08-13 13:31:05 +0200
commit348da227c569d07ca572e6279e41a84dafe48404 (patch)
tree854b49b7999fb57e1637a380af7e0cfc76791d85 /pkgs/applications/networking/irc/communi
parentf8334115fb5406b236b070a1810bbf1453f08cf6 (diff)
communi: fix Qt wrapping
Diffstat (limited to 'pkgs/applications/networking/irc/communi')
-rw-r--r--pkgs/applications/networking/irc/communi/default.nix48
1 files changed, 29 insertions, 19 deletions
diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix
index b9321f0797fa2..71c559cbe713e 100644
--- a/pkgs/applications/networking/irc/communi/default.nix
+++ b/pkgs/applications/networking/irc/communi/default.nix
@@ -1,4 +1,11 @@
-{ fetchFromGitHub, libcommuni, qtbase, qmake, lib, stdenv, wrapQtAppsHook }:
+{ stdenv
+, lib
+, fetchFromGitHub
+, libcommuni
+, qmake
+, qtbase
+, wrapQtAppsHook
+}:
 
 stdenv.mkDerivation rec {
   pname = "communi";
@@ -15,12 +22,15 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ qmake ]
-    ++ lib.optional stdenv.isDarwin wrapQtAppsHook;
-
-  buildInputs = [ libcommuni qtbase ];
+  nativeBuildInputs = [
+    qmake
+    wrapQtAppsHook
+  ];
 
-  dontWrapQtApps = true;
+  buildInputs = [
+    libcommuni
+    qtbase
+  ];
 
   preConfigure = ''
     export QMAKEFEATURES=${libcommuni}/features
@@ -32,20 +42,19 @@ stdenv.mkDerivation rec {
     "COMMUNI_INSTALL_ICONS=${placeholder "out"}/share/icons/hicolor"
     "COMMUNI_INSTALL_DESKTOP=${placeholder "out"}/share/applications"
     "COMMUNI_INSTALL_THEMES=${placeholder "out"}/share/communi/themes"
-    (if stdenv.isDarwin
-      then [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/Applications" ]
-      else [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/bin" ])
+    "COMMUNI_INSTALL_BINS=${placeholder "out"}/${if stdenv.isDarwin then "Applications" else "bin"}"
   ];
 
-  postInstall = if stdenv.isDarwin then ''
-    # Nix qmake does not add the bundle rpath by default.
-    install_name_tool \
-      -add_rpath @executable_path/../Frameworks \
-      $out/Applications/Communi.app/Contents/MacOS/Communi
-  '' else ''
-    substituteInPlace "$out/share/applications/communi.desktop" \
-      --replace "/usr/bin" "$out/bin"
-  '';
+  postInstall =
+    if stdenv.isDarwin then ''
+      # Nix qmake does not add the bundle rpath by default.
+      install_name_tool \
+        -add_rpath @executable_path/../Frameworks \
+        $out/Applications/Communi.app/Contents/MacOS/Communi
+    '' else ''
+      substituteInPlace "$out/share/applications/communi.desktop" \
+        --replace "/usr/bin" "$out/bin"
+    '';
 
   preFixup = ''
     rm -rf lib
@@ -56,6 +65,7 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/communi/communi-desktop";
     license = licenses.bsd3;
     maintainers = with maintainers; [ hrdinka ];
-    platforms = platforms.linux;
+    platforms = platforms.all;
+    broken = stdenv.isDarwin;
   };
 }