]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - default.nix
Add nextcloud client and image processing tools
[perso/Immae/Config/Nix.git] / default.nix
index 674a72f89f64ed8f5c1b8c52ce0bb9d7d010af76..0c7cd7bc5fe200b1e29aba1cb9ab07b519a4f86d 100644 (file)
@@ -66,6 +66,7 @@ let
       plugins = with availablePlugins; [
          (python.withPackages (ps: with ps; [websocket_client emoji]))
          perl
+         ruby
         ];
     };
   };
@@ -496,6 +497,43 @@ let
       '';
   };
 
+  mypkgs.telegramircd = with python3Packages; let
+    telethon = buildPythonPackage rec {
+      pname = "Telethon-sync";
+      version = "1.1.1";
+
+      src = fetchPypi {
+        inherit pname version;
+        sha256 =
+          "01z8fzqn0qs5pxhvzq891r3mwffq1ga3f8xvm7qdn6kvmxjni9fy";
+      };
+
+      propagatedBuildInputs = with self; [
+        rsa pyaes async_generator
+      ];
+      doCheck = false;
+
+      meta = with lib; {
+        homepage = https://github.com/LonamiWebs/Telethon;
+        description = "Full-featured Telegram client library for Python 3";
+        license = licenses.mit;
+      };
+    };
+  in
+    buildPythonApplication rec {
+      format = "other";
+      pname = "telegramircd";
+      version = "master";
+      propagatedBuildInputs = [ telethon aiohttp ConfigArgParse openssl ];
+      src = (fetchedGithub ./fetched/telegramircd.json).src;
+      LD_LIBRARY_PATH = "${openssl.out}/lib";
+      installPhase = ''
+        install -D $src/telegramircd.py $out/bin/telegramircd
+        wrapProgram "$out/bin/telegramircd" \
+          --prefix LD_LIBRARY_PATH : "${openssl.out}/lib"
+        install -Dm644 "$src/config" -t "$out/etc/telegramircd/"
+        '';
+    };
 # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
 # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
 in
@@ -539,6 +577,8 @@ in
     inherit nix-zsh-completions;
     inherit browsh;
     inherit monero;
+    inherit nextcloud-client;
+    inherit feh imagemagick;
     stgit = gitAndTools.stgit;
     # todo: lx* ?, unrar, unzip, zeromq?
     #inherit nextcloud-client;