diff options
author | Shawn8901 <shawn8901@googlemail.com> | 2023-01-24 17:29:20 +0100 |
---|---|---|
committer | Shawn8901 <shawn8901@googlemail.com> | 2023-01-24 17:29:20 +0100 |
commit | 0a1dd3ced1d7a0d7d611c9f64e02fa9cd3ba3c6d (patch) | |
tree | a55d636b68c5d8266e8b3de05a1bcbbf925e21c3 /pkgs/applications/networking/instant-messengers/telegram | |
parent | c0aeb3305473e3a0df97785f562ea8707630e999 (diff) |
treewide: remove global with lib; in pkgs/{misc,networking}
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram')
2 files changed, 9 insertions, 13 deletions
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 58c6501a1ffb..6e3a9e54f0db 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix @@ -65,8 +65,6 @@ , MetalKit }: -with lib; - let tg_owt = callPackage ./tg_owt.nix { abseil-cpp = abseil-cpp.override { @@ -99,14 +97,14 @@ stdenv.mkDerivation rec { ./shortcuts-binary-path.patch ]; - postPatch = optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \ --replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp \ --replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \ --replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"' - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' sed -i "13i#import <CoreAudio/CoreAudio.h>" Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm substituteInPlace Telegram/CMakeLists.txt \ --replace 'COMMAND iconutil' 'COMMAND png2icns' \ @@ -122,7 +120,7 @@ stdenv.mkDerivation rec { python3 wrapQtAppsHook removeReferencesTo - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ # to build bundled libdispatch clang extra-cmake-modules @@ -143,7 +141,7 @@ stdenv.mkDerivation rec { rnnoise tg_owt microsoft_gsl - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ kwayland alsa-lib libpulseaudio @@ -151,7 +149,7 @@ stdenv.mkDerivation rec { glibmm jemalloc wayland - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Cocoa CoreFoundation CoreServices @@ -192,7 +190,7 @@ stdenv.mkDerivation rec { "-DDESKTOP_APP_QT6=OFF" ]; - installPhase = optionalString stdenv.isDarwin '' + installPhase = lib.optionalString stdenv.isDarwin '' mkdir -p $out/Applications cp -r Kotatogram.app $out/Applications ln -s $out/Applications/Kotatogram.app/Contents/MacOS $out/bin @@ -209,7 +207,7 @@ stdenv.mkDerivation rec { inherit tg_owt; }; - meta = { + meta = with lib; { description = "Kotatogram – experimental Telegram Desktop fork"; longDescription = '' Unofficial desktop client for the Telegram messenger, based on Telegram Desktop. diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix index 435268cdf623..73c71d294c84 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix @@ -1,7 +1,5 @@ { stdenv, lib, kotatogram-desktop, glib-networking, webkitgtk, makeWrapper }: -with lib; - stdenv.mkDerivation { pname = "${kotatogram-desktop.pname}-with-webkit"; version = kotatogram-desktop.version; @@ -15,9 +13,9 @@ stdenv.mkDerivation { mkdir -p $out/bin makeWrapper ${kotatogram-desktop}/bin/kotatogram-desktop $out/bin/kotatogram-desktop \ --prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules \ - --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ webkitgtk ]} + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ webkitgtk ]} ''; meta = kotatogram-desktop.meta // { - platforms = platforms.linux; + platforms = lib.platforms.linux; }; } |