summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-09-20 16:12:08 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-09-20 16:12:52 +0300
commitaf3fed935ba5c33e9ca4540f8cf8aed08cbe1d42 (patch)
tree65fb001a2d47f2cba557c0baec7e39ac2238a4b8
parentgnu: Delete ubridge. (diff)
downloadguix-wigust-origin/wip-firefox-openwith.tar.gz
* gnu/packages/wigust-firefox.scm (firefox-openwith): New variable.
-rw-r--r--gnu/packages/wigust-firefox.scm78
1 files changed, 78 insertions, 0 deletions
diff --git a/gnu/packages/wigust-firefox.scm b/gnu/packages/wigust-firefox.scm
new file mode 100644
index 0000000..3a4cf92
--- /dev/null
+++ b/gnu/packages/wigust-firefox.scm
@@ -0,0 +1,78 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages wigust-firefox)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages python)
+ #:use-module (guix build-system trivial)
+ #:use-module (guix download)
+ #:use-module (guix packages))
+
+(define-public firefox-openwith
+ (package
+ (name "firefox-openwith")
+ (version "7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/darktrojan/openwith/archive/VERSION_"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0dr9y0kamn60k4a4j8cn9sm371ccg3mlxkh5sqdz2v4fw4y3z5d6"))))
+ (build-system trivial-build-system)
+ (native-inputs
+ `(("tar" ,tar)
+ ("gzip" ,gzip)
+ ("python" ,python)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (setenv "PATH"
+ (string-append
+ (assoc-ref %build-inputs "tar") "/bin" ":"
+ (assoc-ref %build-inputs "gzip") "/bin" ":"
+ (assoc-ref %build-inputs "python") "/bin"))
+ (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
+ (with-directory-excursion (string-append "openwith-VERSION_"
+ ,version
+ "/webextension/native")
+ (substitute* "open_with_linux.py"
+ (("#!/usr/bin/env python")
+ (which "python3"))
+ (("'/usr/share/applications'" line)
+ (string-join (list ""
+ line
+ "os.path.expanduser('~/.guix-profile/share/applications')"
+ "'/run/current-system/profile/share/applications'")
+ ", ")))
+ (install-file "open_with_linux.py"
+ (string-append (assoc-ref %outputs "out")
+ "/bin")))
+ #t)))
+ (home-page "https://darktrojan.github.io/openwith/")
+ (synopsis "Open URLs in other programs")
+ (description "This extension displays a list of your browsers on
+your menus and toolbars in Firefox. Clicking on them takes you to the
+page you're looking at in the browser of your choice.")
+ (license license:mpl2.0)))