Skip to content

Commit

Permalink
Merge pull request #121151 from dotlambda/libdeltachat-init
Browse files Browse the repository at this point in the history
libdeltachat: init at 1.54.0
  • Loading branch information
dotlambda committed May 6, 2021
2 parents 688fee8 + 8a6ad02 commit 30c3036
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 0 deletions.
@@ -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 ];
};
}
55 changes: 55 additions & 0 deletions 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 ];
};
}
59 changes: 59 additions & 0 deletions 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 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -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 { };
Expand Down

0 comments on commit 30c3036

Please sign in to comment.