about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/telegram
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-29 22:00:46 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-29 22:00:46 +0100
commit5296a360c6e9a32c47cef8d9df697f170faf1c9a (patch)
treeebe7fb5227f25213ea76183b67372fb1cf9b8e92 /pkgs/applications/networking/instant-messengers/telegram
parent8461d467d7035012ac281cd8001880ea69c5ce87 (diff)
telegram-cli: pull patch pending upstream inclusion for -fno-common toolchain support
Without the change builds fails on upstream gcc-10 as:

    ld: objs/loop.o:/build/tg/loop.c:77: multiple definition of
      `verbosity'; objs/main.o:/build/tg/main.c:93: first defined here
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram')
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
index 3b69aa5566dc0..c8e8598c14030 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, jansson, lib, libconfig, libevent, libgcrypt, lua, lua53Packages
+{ stdenv, fetchFromGitHub, fetchpatch, jansson, lib, libconfig, libevent, libgcrypt, lua, lua53Packages
 , makeWrapper, openssl, pkg-config, python3, readline, zlib
 }:
 
@@ -14,6 +14,16 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
+  patches = [
+    # Pull patch pending upstream upstream inclusion for -fno-common toolchains:
+    #   https://github.com/kenorb-contrib/tg/pull/61
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/kenorb-contrib/tg/commit/aad2e644fffa16066b227741d54de31bddb04ff8.patch";
+      sha256 = "sha256-LAa5J4BVj3QCiDSs+p2bynDroMSIqCeexQvrgaDl6OE=";
+    })
+  ];
+
   buildInputs = [
     jansson
     libconfig