@@ -8,7 +8,15 @@
88
99with lib;
1010
11−mkDerivation rec {
11+let
12+ # TODO: Not optimal (maybe we should only package the stable versions)
13+ previewPatches = fetchFromGitHub {
14+ owner = "primeos";
15+ repo = "nixpkgs-tdesktop-patches";
16+ rev = "b3c0cbce1b412443a8712c90069932bbcae87fb6";
17+ sha256 = "1bymrciaci6plghaz7a6qwsidjm8rg5fqdh158cdp70il4g7kmw9";
18+ };
19+in mkDerivation rec {
1220 name = "telegram-desktop-${version}";
1321 inherit version;
1422
@@ -29,7 +37,10 @@ mkDerivation rec {
2937 };
3038
3139 # TODO: libtgvoip.patch no-gtk2.patch
32− patches = [ "${archPatches}/tdesktop.patch" ]
40+ patches =
41+ (if stable
42+ then [ "${archPatches}/tdesktop.patch" ]
43+ else [ "${previewPatches}/tdesktop.patch" ])
3344 # TODO: Only required to work around a compiler bug.
3445 # This should be fixed in GCC 7.3.1 (or later?)
3546 ++ [ ./fix-internal-compiler-error.patch ];