communi: fix Qt wrapping

OPNA2608 348da227 f8334115

+29 -19
+29 -19
pkgs/applications/networking/irc/communi/default.nix
··· 1 - { fetchFromGitHub, libcommuni, qtbase, qmake, lib, stdenv, wrapQtAppsHook }: 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , libcommuni 5 + , qmake 6 + , qtbase 7 + , wrapQtAppsHook 8 + }: 2 9 3 10 stdenv.mkDerivation rec { 4 11 pname = "communi"; ··· 15 22 fetchSubmodules = true; 16 23 }; 17 24 18 - nativeBuildInputs = [ qmake ] 19 - ++ lib.optional stdenv.isDarwin wrapQtAppsHook; 20 - 21 - buildInputs = [ libcommuni qtbase ]; 25 + nativeBuildInputs = [ 26 + qmake 27 + wrapQtAppsHook 28 + ]; 22 29 23 - dontWrapQtApps = true; 30 + buildInputs = [ 31 + libcommuni 32 + qtbase 33 + ]; 24 34 25 35 preConfigure = '' 26 36 export QMAKEFEATURES=${libcommuni}/features ··· 32 42 "COMMUNI_INSTALL_ICONS=${placeholder "out"}/share/icons/hicolor" 33 43 "COMMUNI_INSTALL_DESKTOP=${placeholder "out"}/share/applications" 34 44 "COMMUNI_INSTALL_THEMES=${placeholder "out"}/share/communi/themes" 35 - (if stdenv.isDarwin 36 - then [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/Applications" ] 37 - else [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/bin" ]) 45 + "COMMUNI_INSTALL_BINS=${placeholder "out"}/${if stdenv.isDarwin then "Applications" else "bin"}" 38 46 ]; 39 47 40 - postInstall = if stdenv.isDarwin then '' 41 - # Nix qmake does not add the bundle rpath by default. 42 - install_name_tool \ 43 - -add_rpath @executable_path/../Frameworks \ 44 - $out/Applications/Communi.app/Contents/MacOS/Communi 45 - '' else '' 46 - substituteInPlace "$out/share/applications/communi.desktop" \ 47 - --replace "/usr/bin" "$out/bin" 48 - ''; 48 + postInstall = 49 + if stdenv.isDarwin then '' 50 + # Nix qmake does not add the bundle rpath by default. 51 + install_name_tool \ 52 + -add_rpath @executable_path/../Frameworks \ 53 + $out/Applications/Communi.app/Contents/MacOS/Communi 54 + '' else '' 55 + substituteInPlace "$out/share/applications/communi.desktop" \ 56 + --replace "/usr/bin" "$out/bin" 57 + ''; 49 58 50 59 preFixup = '' 51 60 rm -rf lib ··· 56 65 homepage = "https://github.com/communi/communi-desktop"; 57 66 license = licenses.bsd3; 58 67 maintainers = with maintainers; [ hrdinka ]; 59 - platforms = platforms.linux; 68 + platforms = platforms.all; 69 + broken = stdenv.isDarwin; 60 70 }; 61 71 }