diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix index 445fefe3274c..9c64f305d073 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, fetchFromGitHub, telegram-desktop, withWebkit ? true, @@ -23,6 +24,10 @@ telegram-desktop.override { fetchSubmodules = true; }; + # Find the Swift SDK overlays needed by the translation provider. + # Remove after next release + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-L/usr/lib/swift"; + meta = { description = "Kotatogram – experimental Telegram Desktop fork"; longDescription = '' diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix index 0344468bc243..edcb1455f4d4 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix @@ -37,6 +37,7 @@ libicns, wallet-engine, apple-sdk_15, + swift, nix-update-script, }: @@ -68,6 +69,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals stdenv.hostPlatform.isLinux [ gobject-introspection + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + swift ]; buildInputs = [ @@ -111,8 +115,9 @@ stdenv.mkDerivation (finalAttrs: { # We're allowed to used the API ID of the Snap package: (lib.cmakeFeature "TDESKTOP_API_ID" "611335") (lib.cmakeFeature "TDESKTOP_API_HASH" "d524b414d21f4d37f08684c1df41ac9c") - # swift 6 is not available in nixpkgs - (lib.cmakeBool "DESKTOP_APP_DISABLE_SWIFT6" true) + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + (lib.cmakeFeature "CMAKE_Swift_COMPILER_TARGET" stdenv.hostPlatform.swift.triple) ]; installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' diff --git a/pkgs/by-name/_6/_64gram/package.nix b/pkgs/by-name/_6/_64gram/package.nix index 37ee3b21f262..3d66027ce19c 100644 --- a/pkgs/by-name/_6/_64gram/package.nix +++ b/pkgs/by-name/_6/_64gram/package.nix @@ -1,5 +1,6 @@ { lib, + stdenv, fetchFromGitHub, telegram-desktop, withWebkit ? true, @@ -20,6 +21,10 @@ telegram-desktop.override { fetchSubmodules = true; }; + # Find the Swift SDK overlays needed by the translation provider. + # Remove after next release + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-L/usr/lib/swift"; + meta = { description = "Unofficial Telegram Desktop providing Windows 64bit build and extra features"; license = lib.licenses.gpl3Only; diff --git a/pkgs/by-name/ay/ayugram-desktop/package.nix b/pkgs/by-name/ay/ayugram-desktop/package.nix index 5781bb56663a..bd62effd801f 100644 --- a/pkgs/by-name/ay/ayugram-desktop/package.nix +++ b/pkgs/by-name/ay/ayugram-desktop/package.nix @@ -1,5 +1,6 @@ { lib, + stdenv, fetchFromGitHub, nix-update-script, telegram-desktop, @@ -22,6 +23,10 @@ telegram-desktop.override { fetchSubmodules = true; }; + # Find the Swift SDK overlays needed by the translation provider. + # Remove after next release + env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-L/usr/lib/swift"; + passthru.updateScript = nix-update-script { }; meta = previousAttrs.meta // {