about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/errbot/default.nix35
-rw-r--r--pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix67
-rw-r--r--pkgs/applications/networking/instant-messengers/cinny/default.nix26
3 files changed, 83 insertions, 45 deletions
diff --git a/pkgs/applications/networking/errbot/default.nix b/pkgs/applications/networking/errbot/default.nix
index 54d0b862b891..7085ac5f38ba 100644
--- a/pkgs/applications/networking/errbot/default.nix
+++ b/pkgs/applications/networking/errbot/default.nix
@@ -1,25 +1,26 @@
 { lib
 , fetchFromGitHub
-, glibcLocales
-, python39
+, python3
 }:
 
-let
-  python3 = python39;
-in python3.pkgs.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "errbot";
-  version = "6.1.7";
+  version = "6.1.9";
+
+  format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "errbotio";
     repo = "errbot";
     rev = version;
-    sha256 = "02h44qd3d91zy657hyqsw3gskgxg31848pw6zpb8dhd1x84z5y77";
+    hash = "sha256-BmHChLWWnrtg0p4WH8bANwpo+p4RTwjYbXfyPnz6mp8=";
   };
 
-  LC_ALL = "en_US.utf8";
+  nativeBuildInputs = with python3.pkgs; [
+    pythonRelaxDepsHook
+  ];
 
-  buildInputs = [ glibcLocales ];
+  pythonRelaxDeps = true;
 
   propagatedBuildInputs = with python3.pkgs; [
     ansi
@@ -28,7 +29,6 @@ in python3.pkgs.buildPythonApplication rec {
     deepmerge
     dulwich
     flask
-    hypchat
     irc
     jinja2
     markdown
@@ -38,9 +38,8 @@ in python3.pkgs.buildPythonApplication rec {
     pygments-markdown-lexer
     pyopenssl
     requests
-    slackclient
-    sleekxmpp
-    telegram
+    slixmpp
+    python-telegram-bot
     webtest
   ];
 
@@ -49,18 +48,20 @@ in python3.pkgs.buildPythonApplication rec {
     pytestCheckHook
   ];
 
-  # Slack backend test has an import issue
+  # errbot-backend-slackv3 has not been packaged
   pytestFlagsArray = [ "--ignore=tests/backend_tests/slack_test.py" ];
 
   disabledTests = [
-    "backup"
-    "broken_plugin"
-    "plugin_cycle"
+    # require networking
+    "test_backup"
+    "test_broken_plugin"
+    "test_plugin_cycle"
   ];
 
   pythonImportsCheck = [ "errbot" ];
 
   meta = with lib; {
+    changelog = "https://github.com/errbotio/errbot/blob/${version}/CHANGES.rst";
     description = "Chatbot designed to be simple to extend with plugins written in Python";
     homepage = "http://errbot.io/";
     maintainers = with maintainers; [ globin ];
diff --git a/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix b/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
index 511b6bccb997..2dbe74d3b34e 100644
--- a/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
@@ -1,45 +1,74 @@
-{ stdenv
-, lib
-, dpkg
-, fetchurl
-, autoPatchelfHook
-, glib-networking
+{ lib
+, fetchFromGitHub
+, rustPlatform
+, cinny
+, copyDesktopItems
+, wrapGAppsHook
+, pkg-config
 , openssl
+, dbus
+, glib
+, glib-networking
 , webkitgtk
-, wrapGAppsHook
+, makeDesktopItem
 }:
 
-stdenv.mkDerivation rec {
+rustPlatform.buildRustPackage rec {
   pname = "cinny-desktop";
   version = "2.2.6";
 
-  src = fetchurl {
-    url = "https://github.com/cinnyapp/cinny-desktop/releases/download/v${version}/Cinny_desktop-x86_64.deb";
-    sha256 = "sha256-Bh7qBlHh2bQ6y2HnI4TtxMU6N3t04tr1Juoul2KMrqs=";
+  src = fetchFromGitHub {
+    owner = "cinnyapp";
+    repo = "cinny-desktop";
+    rev = "v${version}";
+    hash = "sha256-RW6LeItIAHJk1e7qMa1MLIGb3jHvJ/KM8E9l1qR48w8=";
   };
 
+  sourceRoot = "${src.name}/src-tauri";
+
+  cargoHash = "sha256-Iab/icQ9hFVh/o6egZVPa2zeKgO5WxzkluhRckcayvw=";
+
+  postPatch = ''
+    substituteInPlace tauri.conf.json \
+      --replace '"distDir": "../cinny/dist",' '"distDir": "${cinny}",'
+  '';
+
+  postInstall = ''
+    install -DT icons/128x128@2x.png $out/share/icons/hicolor/256x256@2/apps/cinny.png
+    install -DT icons/128x128.png $out/share/icons/hicolor/128x128/apps/cinny.png
+    install -DT icons/32x32.png $out/share/icons/hicolor/32x32/apps/cinny.png
+  '';
+
   nativeBuildInputs = [
-    autoPatchelfHook
-    dpkg
+    copyDesktopItems
+    wrapGAppsHook
+    pkg-config
   ];
 
   buildInputs = [
-    glib-networking
     openssl
+    dbus
+    glib
+    glib-networking
     webkitgtk
-    wrapGAppsHook
   ];
 
-  unpackCmd = "dpkg-deb -x $curSrc source";
-
-  installPhase = "mv usr $out";
+  desktopItems = [
+    (makeDesktopItem {
+      name = "cinny";
+      exec = "cinny";
+      icon = "cinny";
+      desktopName = "Cinny";
+      comment = meta.description;
+      categories = [ "Network" "InstantMessaging" ];
+    })
+  ];
 
   meta = with lib; {
     description = "Yet another matrix client for desktop";
     homepage = "https://github.com/cinnyapp/cinny-desktop";
     maintainers = [ maintainers.aveltras ];
     license = licenses.agpl3Only;
-    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     platforms = platforms.linux;
     mainProgram = "cinny";
   };
diff --git a/pkgs/applications/networking/instant-messengers/cinny/default.nix b/pkgs/applications/networking/instant-messengers/cinny/default.nix
index d8f7e72b9d1d..336d045b6c16 100644
--- a/pkgs/applications/networking/instant-messengers/cinny/default.nix
+++ b/pkgs/applications/networking/instant-messengers/cinny/default.nix
@@ -1,22 +1,30 @@
-{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
+{ lib, buildNpmPackage, fetchFromGitHub, writeText, jq, conf ? { } }:
 
 let
   configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
-in stdenv.mkDerivation rec {
+in
+buildNpmPackage rec {
   pname = "cinny";
   version = "2.2.6";
 
-  src = fetchurl {
-    url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz";
-    hash = "sha256-AvYM8++PqKmm7CJN5hmg9GSC72IoHX+rRxuT3GflvjU=";
+  src = fetchFromGitHub {
+    owner = "cinnyapp";
+    repo = "cinny";
+    rev = "v${version}";
+    hash = "sha256-Da/gbq9piKvkIMiamoafcRrqxF7128GXoswk2C43An8=";
   };
 
+  npmDepsHash = "sha256-3wgB/dQmLtwxbRsk+OUcyfx98vpCvhvseEOCrJIFohY=";
+
+  nativeBuildInputs = [
+    jq
+  ];
+
   installPhase = ''
     runHook preInstall
 
-    mkdir -p $out/
-    cp -R . $out/
-    ${jq}/bin/jq -s '.[0] * .[1]' "config.json" "${configOverrides}" > "$out/config.json"
+    cp -r dist $out
+    jq -s '.[0] * .[1]' "config.json" "${configOverrides}" > "$out/config.json"
 
     runHook postInstall
   '';
@@ -25,7 +33,7 @@ in stdenv.mkDerivation rec {
     description = "Yet another Matrix client for the web";
     homepage = "https://cinny.in/";
     maintainers = with maintainers; [ abbe ];
-    license = licenses.mit;
+    license = licenses.agpl3Only;
     platforms = platforms.all;
   };
 }