mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 01:02:20 +00:00
telegram-desktop: fix darwin build with Swift compilation
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 // {
|
||||
|
||||
Reference in New Issue
Block a user