From c06bfc0593700822ee1847f64325a0c2ef13b390 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Mon, 4 Jan 2021 00:25:03 -0500 Subject: [PATCH] rekahsoft-gnu/packages/emacs-xyz.scm: Add support for org-protocol --- rekahsoft-gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/rekahsoft-gnu/packages/emacs-xyz.scm b/rekahsoft-gnu/packages/emacs-xyz.scm index 9a5e457..b7302d5 100644 --- a/rekahsoft-gnu/packages/emacs-xyz.scm +++ b/rekahsoft-gnu/packages/emacs-xyz.scm @@ -655,6 +655,7 @@ See perspective.el on github: https://github.com/nex3/perspective-el (base32 "0a5b625i7gv467xm8p92nvrh2wzgmldm8gzcbrc15al1gvnwpbqm")))) (build-system emacs-build-system) + (inputs `(("emacs" ,emacs))) (propagated-inputs `(("emacs-dash" ,emacs-dash) ("emacs-simple-httpd" ,emacs-simple-httpd) @@ -672,11 +673,31 @@ See perspective.el on github: https://github.com/nex3/perspective-el (assets (string-append out site-lisp "/assets"))) (copy-recursively "assets" assets) (copy-file "index.html" - (string-append out site-lisp "/index.html")))))))) + (string-append out site-lisp "/index.html")) + #t))) + (add-after 'build 'install-application + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (emacs (assoc-ref inputs "emacs")) + (xapplications (string-append out "/share/applications"))) + (mkdir-p xapplications) + (call-with-output-file + (string-append xapplications "/org-protocol.desktop") + (lambda (port) + (format port + "[Desktop Entry]~@ + Name=Org-Protocol~@ + Comment=Protocol which allows interaction between org-roam-server in emacs and a web browser~@ + Exec=~a/bin/emacsclient %u~@ + Icon=emacs-icon~@ + Type=Application~@ + Terminal=false~@ + MimeType=x-scheme-handler/org-protocol~%" + emacs))) + #t)))))) (home-page "https://github.com/org-roam/org-roam-server") (synopsis "Web Application to Visualize the Org-Roam Database") (description "Web Application to Visualize the Org-Roam Database.") (license license:gpl3+))) -