|
| 1 | +{ lib |
| 2 | +, stdenv |
| 3 | +, fetchFromGitHub |
| 4 | + |
| 5 | +, ccrtp |
| 6 | +, cmake |
| 7 | +, python3Packages |
| 8 | +, x11vnc |
| 9 | +, libvncserver |
| 10 | +, pjsip |
| 11 | +, pkg-config |
| 12 | +}: |
| 13 | + |
| 14 | +let |
| 15 | + # AG Projects dependencies required for Blink |
| 16 | + python3-application = python3Packages.buildPythonApplication rec { |
| 17 | + pname = "python3-application"; |
| 18 | + version = "3.0.7"; |
| 19 | + pyproject = true; |
| 20 | + |
| 21 | + src = fetchFromGitHub { |
| 22 | + owner = "AGProjects"; |
| 23 | + repo = "python3-application"; |
| 24 | + rev = "refs/tags/release-${version}"; |
| 25 | + hash = "sha256-gGq1V+4GrjUgp6XteWAko4YRZuCWGArvImp8isUOoMU="; |
| 26 | + }; |
| 27 | + |
| 28 | + build-system = with python3Packages; [ |
| 29 | + setuptools |
| 30 | + ]; |
| 31 | + |
| 32 | + dependencies = with python3Packages; [ |
| 33 | + zope-interface |
| 34 | + ]; |
| 35 | + |
| 36 | + pythonImportsCheck = [ "application" ]; |
| 37 | + }; |
| 38 | + |
| 39 | + python3-sipsimple = python3Packages.buildPythonApplication rec { |
| 40 | + pname = "python3-sipsimple"; |
| 41 | + version = "5.3.3"; |
| 42 | + pyproject = true; |
| 43 | + |
| 44 | + src = fetchFromGitHub { |
| 45 | + owner = "AGProjects"; |
| 46 | + repo = "python3-sipsimple"; |
| 47 | + rev = "refs/tags/${version}"; |
| 48 | + hash = "sha256-SiJo6YoYy4OiVVVKhfy0U1z4iz5aYPHu2P6JuJjXyEI="; |
| 49 | + }; |
| 50 | + |
| 51 | + # Don't build pjsip, use package from nixpkgs |
| 52 | + postPatch = '' |
| 53 | + substituteInPlace "setup.py" \ |
| 54 | + --replace-fail \ |
| 55 | + "'build_ext': PJSIP_build_ext" \ |
| 56 | + "" |
| 57 | + ''; |
| 58 | + |
| 59 | + build-system = with python3Packages; [ |
| 60 | + cython_0 |
| 61 | + setuptools |
| 62 | + ]; |
| 63 | + |
| 64 | + dependencies = with python3Packages; [ |
| 65 | + ]; |
| 66 | + |
| 67 | + buildInputs = [ |
| 68 | + pjsip |
| 69 | + zrtpcpp |
| 70 | + ]; |
| 71 | + }; |
| 72 | + |
| 73 | + python3-otr = python3Packages.buildPythonApplication rec { |
| 74 | + pname = "python3-otr"; |
| 75 | + version = "2.0.2"; |
| 76 | + pyproject = true; |
| 77 | + |
| 78 | + src = fetchFromGitHub { |
| 79 | + owner = "AGProjects"; |
| 80 | + repo = "python3-otr"; |
| 81 | + rev = "refs/tags/${version}"; |
| 82 | + hash = "sha256-Zt5nCkt9qdw5MJWrLJoMpi3ZhlCBDPAiAvoT1rBnWo0="; |
| 83 | + }; |
| 84 | + |
| 85 | + build-system = with python3Packages; [ |
| 86 | + setuptools |
| 87 | + ]; |
| 88 | + |
| 89 | + dependencies = with python3Packages; [ |
| 90 | + cryptography |
| 91 | + gmpy2 |
| 92 | + python3-application |
| 93 | + zope-interface |
| 94 | + ]; |
| 95 | + |
| 96 | + # FIXME: |
| 97 | + # nativeCheckInputs = with python3Packages; [ |
| 98 | + # unittestCheckHook |
| 99 | + # ]; |
| 100 | + |
| 101 | + pythonImportsCheck = [ "otr" ]; |
| 102 | + }; |
| 103 | + |
| 104 | + # Other third-party dependencies |
| 105 | + zrtpcpp = stdenv.mkDerivation rec { |
| 106 | + pname = "zrtpcpp"; |
| 107 | + version = "4.7.0"; |
| 108 | + |
| 109 | + src = fetchFromGitHub { |
| 110 | + owner = "wernerd"; |
| 111 | + repo = "ZRTPCPP"; |
| 112 | + tag = version; |
| 113 | + hash = "sha256-HgtJzVwriTJogN99ox3xd+Hhza+/KieOWXNf3eZwc4U="; |
| 114 | + }; |
| 115 | + |
| 116 | + patches = [ |
| 117 | + ./zrtpcpp-include-stdbool.patch |
| 118 | + ]; |
| 119 | + |
| 120 | + nativeBuildInputs = [ |
| 121 | + pkg-config |
| 122 | + cmake |
| 123 | + ]; |
| 124 | + |
| 125 | + buildInputs = [ |
| 126 | + ccrtp |
| 127 | + ]; |
| 128 | + |
| 129 | + cmakeFlags = [ ]; |
| 130 | + |
| 131 | + doCheck = true; |
| 132 | + }; |
| 133 | + |
| 134 | +in |
| 135 | +python3Packages.buildPythonApplication rec { |
| 136 | + pname = "blink-qt"; |
| 137 | + version = "6.0.4"; |
| 138 | + pyproject = true; |
| 139 | + |
| 140 | + src = fetchFromGitHub { |
| 141 | + owner = "AGProjects"; |
| 142 | + repo = "blink-qt"; |
| 143 | + rev = "refs/tags/${version}"; |
| 144 | + hash = "sha256-QESg9yo5oddYqSKuFLSMI2Oju3FCq97+j0uJDK85Yy8="; |
| 145 | + }; |
| 146 | + |
| 147 | + # TODO: try to set language_level instead of using cython_0 |
| 148 | + # postPatch = '' |
| 149 | + # substituteInPlace "setup.py" \ |
| 150 | + # --replace-fail \ |
| 151 | + # 'libraries=["vncclient"])]),' \ |
| 152 | + # 'libraries=["vncclient"])], language_level = "2"),' |
| 153 | + # ''; |
| 154 | + |
| 155 | + build-system = with python3Packages; [ |
| 156 | + cython_0 |
| 157 | + setuptools |
| 158 | + ]; |
| 159 | + |
| 160 | + dependencies = with python3Packages; [ |
| 161 | + pyqt6 |
| 162 | + pyqt6.dev |
| 163 | + pyqt6-sip |
| 164 | + python3-application |
| 165 | + python3-eventlib |
| 166 | + python3-otr |
| 167 | + python3-sipsimple |
| 168 | + ]; |
| 169 | + |
| 170 | + buildInputs = [ |
| 171 | + # x11vnc |
| 172 | + libvncserver.dev |
| 173 | + ]; |
| 174 | + |
| 175 | + meta = with lib; { |
| 176 | + homepage = ""; |
| 177 | + description = ""; |
| 178 | + license = licenses.bsd2; |
| 179 | + maintainers = with maintainers; [ ]; |
| 180 | + mainProgram = ""; |
| 181 | + }; |
| 182 | +} |
0 commit comments