about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2023-11-03 22:41:08 -0700
committerJörg Thalheim <Mic92@users.noreply.github.com>2023-11-05 06:30:37 +0100
commitc2a232a83b6ef9b52487c95d103033077b3b952c (patch)
tree13a9fdf0588264019f13580a2f8c28b0dcd3b588
parent101fe8d20f53f0677c02b36a3c867a504d59a1d2 (diff)
deltachat-repl: init at 1.128.0
-rw-r--r--pkgs/by-name/de/deltachat-repl/package.nix26
-rw-r--r--pkgs/development/libraries/libdeltachat/default.nix31
2 files changed, 45 insertions, 12 deletions
diff --git a/pkgs/by-name/de/deltachat-repl/package.nix b/pkgs/by-name/de/deltachat-repl/package.nix
new file mode 100644
index 0000000000000..3de470c08524d
--- /dev/null
+++ b/pkgs/by-name/de/deltachat-repl/package.nix
@@ -0,0 +1,26 @@
+{ lib
+, rustPlatform
+, libdeltachat
+, perl
+, pkg-config
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "deltachat-repl";
+
+  inherit (libdeltachat) version src cargoLock buildInputs;
+
+  nativeBuildInputs = [
+    perl
+    pkg-config
+  ];
+
+  cargoBuildFlags = [ "--package" "deltachat-repl" ];
+
+  doCheck = false;
+
+  meta = libdeltachat.meta // {
+    description = "Delta Chat CLI client";
+    mainProgram = "deltachat-repl";
+  };
+}
diff --git a/pkgs/development/libraries/libdeltachat/default.nix b/pkgs/development/libraries/libdeltachat/default.nix
index 1eb30822bd8a0..092a235d9fd7e 100644
--- a/pkgs/development/libraries/libdeltachat/default.nix
+++ b/pkgs/development/libraries/libdeltachat/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitHub
 , cargo
 , cmake
+, deltachat-repl
 , openssl
 , perl
 , pkg-config
@@ -17,7 +18,17 @@
 , libiconv
 }:
 
-stdenv.mkDerivation rec {
+let
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "email-0.0.21" = "sha256-u4CsK/JqFgq5z3iJGxxGtb7QbSkOAqmOvrmagsqfXIU=";
+      "encoded-words-0.2.0" = "sha256-KK9st0hLFh4dsrnLd6D8lC6pRFFs8W+WpZSGMGJcosk=";
+      "iroh-0.4.1" = "sha256-oLvka1nV2yQPzlcaq5CXqXRRu7GkbMocV6GoIlxQKlo=";
+      "lettre-0.9.2" = "sha256-+hU1cFacyyeC9UGVBpS14BWlJjHy90i/3ynMkKAzclk=";
+    };
+  };
+in stdenv.mkDerivation rec {
   pname = "libdeltachat";
   version = "1.128.0";
 
@@ -32,15 +43,7 @@ stdenv.mkDerivation rec {
     ./no-static-lib.patch
   ];
 
-  cargoDeps = rustPlatform.importCargoLock {
-    lockFile = ./Cargo.lock;
-    outputHashes = {
-      "email-0.0.21" = "sha256-u4CsK/JqFgq5z3iJGxxGtb7QbSkOAqmOvrmagsqfXIU=";
-      "encoded-words-0.2.0" = "sha256-KK9st0hLFh4dsrnLd6D8lC6pRFFs8W+WpZSGMGJcosk=";
-      "iroh-0.4.1" = "sha256-oLvka1nV2yQPzlcaq5CXqXRRu7GkbMocV6GoIlxQKlo=";
-      "lettre-0.9.2" = "sha256-+hU1cFacyyeC9UGVBpS14BWlJjHy90i/3ynMkKAzclk=";
-    };
-  };
+  cargoDeps = rustPlatform.importCargoLock cargoLock;
 
   nativeBuildInputs = [
     cmake
@@ -67,8 +70,12 @@ stdenv.mkDerivation rec {
     cargoCheckHook
   ];
 
-  passthru.tests = {
-    python = python3.pkgs.deltachat;
+  passthru = {
+    inherit cargoLock;
+    tests = {
+      inherit deltachat-repl;
+      python = python3.pkgs.deltachat;
+    };
   };
 
   meta = with lib; {