commit c39391f85c03805a783ecc53ddae9f2f9a9db12c
parent 39dadbb4234cadf01bcd6e3f1f95a06c9d8e1547
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sat, 25 Nov 2023 19:32:08 +0400
Add libgnunetchat,messenger-cli,messenger-gtk
Diffstat:
4 files changed, 118 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -85,6 +85,7 @@ lib.makeScope newScope (
### DEVELOPMENT / LIBRARIES
+ libgnunetchat = callPackage ./development/libraries/libgnunetchat { };
libshell = callPackage ./development/libraries/libshell { };
microjson = callPackage ./development/libraries/microjson { };
@@ -359,6 +360,8 @@ lib.makeScope newScope (
libmdbx = callPackage ./misc/libmdbx { };
libnbcompat = callPackage ./misc/libnbcompat { };
md2html = callPackage ./misc/md2html { };
+ messenger-cli = callPackage ./misc/messenger-cli { };
+ messenger-gtk = callPackage ./misc/messenger-gtk { };
miband4 = callPackage ./misc/miband4 { };
mitzasql = callPackage ./misc/mitzasql { };
modbus-tools = callPackage ./misc/modbus-tools {
diff --git a/pkgs/development/libraries/libgnunetchat/default.nix b/pkgs/development/libraries/libgnunetchat/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, cmake, meson, ninja, pkg-config, check
+, gnunet, libextractor, libgcrypt, libsodium
+}:
+
+stdenv.mkDerivation rec {
+ pname = "libgnunetchat";
+ version = "0.1.3";
+
+ src = fetchurl {
+ url = "mirror://gnu/gnunet/libgnunetchat-${version}.tar.xz";
+ hash = "sha256-+lRjKQsYyyYVxhhgwLE9RNVe0LsT4rTNOqKiJVkAXpI=";
+ };
+
+ postPatch = ''
+ # The major and minor version should be identical, but currently they don't:
+ # GNUNET_MESSENGER_VERSION 0x00000002
+ # GNUNET_CHAT_VERSION 0x000000010000L
+ substituteInPlace src/gnunet_chat_lib.c \
+ --replace "GNUNET_CHAT_VERSION_ASSERT();" ""
+ '';
+
+ nativeBuildInputs = [ meson cmake ninja pkg-config ];
+
+ buildInputs = [ check gnunet libextractor libgcrypt libsodium ];
+
+ doCheck = false;
+
+ meta = with lib; {
+ description = "A client-side library for applications to utilize the Messenger service of GNUnet";
+ homepage = "https://www.gnunet.org/";
+ changelog = "https://git.gnunet.org/libgnunetchat.git/tree/ChangeLog?h=v${version}";
+ license = licenses.agpl3Plus;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/misc/messenger-cli/default.nix b/pkgs/misc/messenger-cli/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, cmake, meson, ninja, pkg-config
+, gnunet, libgcrypt, libgnunetchat, libsodium, ncurses
+}:
+
+stdenv.mkDerivation rec {
+ pname = "messenger-cli";
+ version = "0.1.1";
+
+ src = fetchurl {
+ url = "mirror://gnu/gnunet/messenger-cli-${version}.tar.xz";
+ hash = "sha256-j2Z8AFeQJjsnkWpY9q6x6TJ5oVldhucx4iKfpBAT1os=";
+ };
+
+ nativeBuildInputs = [
+ meson
+ cmake
+ ninja
+ pkg-config
+ ];
+
+ buildInputs = [
+ gnunet
+ libgcrypt
+ libgnunetchat
+ libsodium
+ ncurses
+ ];
+
+ meta = with lib; {
+ description = "A CLI for the Messenger service of GNUnet";
+ homepage = "https://www.gnunet.org/";
+ changelog = "https://git.gnunet.org/messenger-cli.git/tree/ChangeLog?h=v${version}";
+ license = licenses.agpl3Plus;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/misc/messenger-gtk/default.nix b/pkgs/misc/messenger-gtk/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, cmake, meson, ninja, pkg-config, desktop-file-utils, desktopToDarwinBundle
+, gnunet, gst_all_1, gtk3, libgcrypt, libgnunetchat, libhandy, libnotify, libsodium, qrencode
+}:
+
+stdenv.mkDerivation rec {
+ pname = "messenger-gtk";
+ version = "0.8.0";
+
+ src = fetchurl {
+ url = "mirror://gnu/gnunet/messenger-gtk-${version}.tar.xz";
+ hash = "sha256-Udw1thBu3cBql5KJthC+fTGwx07bvOfEFKLyyK1rtUs=";
+ };
+
+ nativeBuildInputs = [
+ meson
+ cmake
+ ninja
+ pkg-config
+ desktop-file-utils # for update-desktop-database
+ ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle;
+
+ buildInputs = [
+ gnunet
+ gst_all_1.gstreamer
+ gtk3
+ libgcrypt
+ libgnunetchat
+ libhandy
+ libnotify
+ libsodium
+ qrencode
+ ];
+
+ meta = with lib; {
+ description = "A GTK based GUI for the Messenger service of GNUnet";
+ homepage = "https://www.gnunet.org/";
+ changelog = "https://git.gnunet.org/messenger-gtk.git/tree/ChangeLog?h=v${version}";
+ license = licenses.agpl3Plus;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}