diff --git a/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix new file mode 100644 index 000000000000..84b6f7ecb37e --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix @@ -0,0 +1,41 @@ +{ lib +, mkDerivation +, fetchFromSourcehut +, cmake +, extra-cmake-modules +, pkg-config +, kirigami2 +, libdeltachat +, qtmultimedia +}: + +mkDerivation rec { + pname = "kdeltachat"; + version = "unstable-2021-05-03"; + + src = fetchFromSourcehut { + owner = "~link2xt"; + repo = "kdeltachat"; + rev = "dd7455764074c0864234a6a25ab6f87e8d5c3121"; + sha256 = "1vsy2jcisvf9mndxlwif3ghv1n2gz5ycr1qh72kgski38qan621v"; + }; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + pkg-config + ]; + + buildInputs = [ + kirigami2 + libdeltachat + qtmultimedia + ]; + + meta = with lib; { + description = "Delta Chat client using Kirigami framework"; + homepage = "https://git.sr.ht/~link2xt/kdeltachat"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/libraries/libdeltachat/default.nix b/pkgs/development/libraries/libdeltachat/default.nix new file mode 100644 index 000000000000..842d08473c11 --- /dev/null +++ b/pkgs/development/libraries/libdeltachat/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, openssl +, perl +, pkg-config +, rustPlatform +, sqlite +}: + +stdenv.mkDerivation rec { + pname = "libdeltachat"; + version = "1.54.0"; + + src = fetchFromGitHub { + owner = "deltachat"; + repo = "deltachat-core-rust"; + rev = version; + sha256 = "02hvsfv1yar8bdpkfrfiiicq9qqnfhp46v6qqph9ar6khz3f1kim"; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "1p5yrhczp9nfijbvkmkmx1rabk5k3c1ni4k1vc0mw4jgl26lslcm"; + }; + + nativeBuildInputs = [ + cmake + perl + pkg-config + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + ]); + + buildInputs = [ + openssl + sqlite + ]; + + checkInputs = with rustPlatform; [ + cargoCheckHook + ]; + + meta = with lib; { + description = "Delta Chat Rust Core library"; + homepage = "https://github.com/deltachat/deltachat-core-rust/"; + changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/CHANGELOG.md"; + license = licenses.mpl20; + platforms = platforms.linux; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/deltachat/default.nix b/pkgs/development/python-modules/deltachat/default.nix new file mode 100644 index 000000000000..ffa9b8d7d63a --- /dev/null +++ b/pkgs/development/python-modules/deltachat/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, isPy27 +, fetchpatch +, setuptools-scm +, libdeltachat +, cffi +, IMAPClient +, pluggy +, requests +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "deltachat"; + inherit (libdeltachat) version src; + sourceRoot = "${src.name}/python"; + + disabled = isPy27; + + nativeBuildInputs = [ + setuptools-scm + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + buildInputs = [ + libdeltachat + ]; + + propagatedBuildInputs = [ + cffi + IMAPClient + pluggy + requests + setuptools + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "deltachat" + "deltachat.account" + "deltachat.contact" + "deltachat.chat" + "deltachat.message" + ]; + + meta = with lib; { + description = "Python bindings for the Delta Chat Core library"; + homepage = "https://github.com/deltachat/deltachat-core-rust/tree/master/python"; + changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/python/CHANGELOG"; + license = licenses.mpl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3eb535dd41df..7585193bf0ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15539,6 +15539,8 @@ in libdeflate = callPackage ../development/libraries/libdeflate { }; + libdeltachat = callPackage ../development/libraries/libdeltachat { }; + libdevil = callPackage ../development/libraries/libdevil { inherit (darwin.apple_sdk.frameworks) OpenGL; }; @@ -24173,6 +24175,8 @@ in kbibtex = libsForQt5.callPackage ../applications/office/kbibtex { }; + kdeltachat = libsForQt5.callPackage ../applications/networking/instant-messengers/kdeltachat { }; + kdevelop-pg-qt = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop-pg-qt.nix { }; kdevelop-unwrapped = libsForQt5.callPackage ../applications/editors/kdevelop5/kdevelop.nix { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 19d2a40dce68..18445278c1bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1751,6 +1751,8 @@ in { delegator-py = callPackage ../development/python-modules/delegator-py { }; + deltachat = callPackage ../development/python-modules/deltachat { }; + deluge-client = callPackage ../development/python-modules/deluge-client { }; demjson = callPackage ../development/python-modules/demjson { };