From 5d8f586b3321dabc8e55ae0c24c04ede2cd7c8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 27 Apr 2021 19:12:36 +0200 Subject: [PATCH 1/3] libdeltachat: init at 1.54.0 --- .../libraries/libdeltachat/default.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/libraries/libdeltachat/default.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bde8c53f5b61..2dfc012bc48e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15458,6 +15458,8 @@ in libdeflate = callPackage ../development/libraries/libdeflate { }; + libdeltachat = callPackage ../development/libraries/libdeltachat { }; + libdevil = callPackage ../development/libraries/libdevil { inherit (darwin.apple_sdk.frameworks) OpenGL; }; From 51aa52a0aa372ad92454d6bba89143c91e35f414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 27 Apr 2021 17:40:24 +0200 Subject: [PATCH 2/3] kdeltachat: init at unstable-2021-05-03 --- .../instant-messengers/kdeltachat/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/kdeltachat/default.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2dfc012bc48e..b8b30c94a24d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24080,6 +24080,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 { From 8a6ad02d46930cfb70a57d552fc207290018ebd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 29 Apr 2021 13:53:17 +0200 Subject: [PATCH 3/3] python3Packages.deltachat: init --- .../python-modules/deltachat/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/deltachat/default.nix 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/python-packages.nix b/pkgs/top-level/python-packages.nix index adb4a4aa4038..af52f6156316 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1743,6 +1743,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 { };