diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-05-12 14:31:36 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-05-12 14:31:36 +0200 |
commit | 71fa678899b621117dfb03e5e1444a67e454b6f1 (patch) | |
tree | 7fe0a55ded0d6f7d1228469b782d338994d731c3 /pkgs/applications/networking/irc | |
parent | 917218e8e244b0351dcdd590abb84d2ae77c8dba (diff) | |
parent | 1d2db664643ea78f1987bf4ec5e3f8521a4d6cab (diff) |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/applications/networking/irc')
-rw-r--r-- | pkgs/applications/networking/irc/communi/default.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix index 0d0144fbf9156..ab698ea9c5605 100644 --- a/pkgs/applications/networking/irc/communi/default.nix +++ b/pkgs/applications/networking/irc/communi/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, libcommuni, qtbase, qmake, lib, stdenv }: +{ fetchgit, libcommuni, qtbase, qmake, lib, stdenv, wrapQtAppsHook }: stdenv.mkDerivation rec { pname = "communi"; @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ qmake ]; + nativeBuildInputs = [ qmake ] + ++ lib.optional stdenv.isDarwin wrapQtAppsHook; buildInputs = [ libcommuni qtbase ]; @@ -25,14 +26,23 @@ stdenv.mkDerivation rec { qmakeFlags = [ "COMMUNI_INSTALL_PREFIX=${placeholder "out"}" - "COMMUNI_INSTALL_BINS=${placeholder "out"}/bin" "COMMUNI_INSTALL_PLUGINS=${placeholder "out"}/lib/communi/plugins" "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" ]) ]; - postInstall = lib.optionalString stdenv.isLinux '' + 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 + + wrapQtApp $out/Applications/Communi.app/Contents/MacOS/Communi + '' else '' substituteInPlace "$out/share/applications/communi.desktop" \ --replace "/usr/bin" "$out/bin" ''; |