From 16f8c8647978c64298c032c255ac6c6626ec8d27 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 22 Apr 2024 08:36:32 -0300 Subject: etc/guix/home.scm: Remove "tg" --- etc/guix/home.scm | 110 ++---------------------------------------------------- 1 file changed, 4 insertions(+), 106 deletions(-) (limited to 'etc') diff --git a/etc/guix/home.scm b/etc/guix/home.scm index 4e1b012..6e4bb96 100644 --- a/etc/guix/home.scm +++ b/etc/guix/home.scm @@ -30,109 +30,6 @@ -;; See: -;; https://github.com/NixOS/nixpkgs/issues/256704#issuecomment-1731626031 -(define tdlib@1.8.4 - (package - (inherit tdlib) - (version "1.8.4") - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/tdlib/td") - (commit "7eabd8ca60de025e45e99d4e5edd39f4ebd9467e"))) - (file-name - (git-file-name "tdlib" version)) - (sha256 - (base32 "1chs0ibghjj275v9arsn3k68ppblpm7ysqk0za9kya5vdnldlld5")))))) - -(define python-telegram - (package - (name "python-telegram") - (version "0.15.0") - (source - (origin - (method url-fetch) - (uri - (pypi-uri name version)) - (sha256 - (base32 "0w61z0915mixxkcvwk22az032j3y46gkg8sadi5fqqb04li8vb9m")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'unvendor - (lambda _ - (delete-file-recursively "telegram/lib/"))) - (add-after 'unvendor 'fix-find-library - (lambda _ - (substitute* "telegram/tdjson.py" - (("= _get_tdjson_lib_path\\(\\)") - (string-append - "= \"" - #$(this-package-input "tdlib") - "/lib/libtdjson.so\"")))))))) - (inputs - (list - tdlib@1.8.4)) - (home-page "https://github.com/alexander-akhmetov/python-telegram") - (synopsis "Python library to help you build your own Telegram clients") - (description #"- - Python API for the @url{https://github.com/tdlib/td, tdlib} library. It - helps you build your own Telegram clients."#) - (license licenses:expat))) - -(define tg - (package - (name "tg") - (version "0.19.0") - (source - (origin - (method url-fetch) - (uri - (pypi-uri name version)) - (sha256 - (base32 "1jv9npas46pwl7v31xi7rlgm7bri3ydwqqq6wpgi13pp3byx46ig")))) - (build-system pyproject-build-system) - (arguments - (list - #:tests? #f ; no tests - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-some-hardcoded-strings - (lambda _ - (substitute* "tg/config.py" - (("CONFIG_DIR = .*") - "CONFIG_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') + '/.config') + '/tg'\n") - (("FILES_DIR = .*") - "FILES_DIR = (os.getenv('XDG_CACHE_HOME') or os.getenv('HOME') + '/.cache') + '/tg'\n") - (("LOG_PATH = .*") - "LOG_PATH = (os.getenv('XDG_DATA_HOME') or os.getenv('HOME') + '/.local/share') + '/tg'\n") - (("DOWNLOAD_DIR = .*") - "DOWNLOAD_DIR = os.getenv('HOME') + '/Downloads/'\n") - (("API_ID = .*") - "API_ID = os.getenv(\"TG_API_ID\")\n") - (("API_HASH = .*") - "API_HASH = os.getenv(\"TG_API_HASH\")\n") - (("NOTIFY_CMD = .*") - "NOTIFY_CMD = \"notify-send -a tg -i {icon_path} {title} '{msg}'\"\n") - (("LONG_MSG_CMD = .*") - "LONG_MSG_CMD = \"vi {file_path}\"\n"))))))) - (native-inputs - (list - python-poetry-core)) - (propagated-inputs - (list - python-telegram)) - (home-page "https://github.com/paul-nameless/tg") - (synopsis "Terminal Telegram client") - (description "TUI client for Telegram with vi-like bindings.") - (license licenses:unlicense))) - - (define (slurp name) (string-trim-both (call-with-input-file @@ -446,9 +343,10 @@ icedove netsurf firefox)) - (list tg - (script "cronjob" (slurp (string-append (getenv "XDG_CONFIG_HOME") - "/sh/cronjob.sh")))))) + (list + (script "cronjob" + (slurp (string-append (getenv "XDG_CONFIG_HOME") + "/sh/cronjob.sh")))))) (services (list (service (home-service 'clipmenu clipmenu "/bin/clipmenud")) -- cgit v1.2.3