all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob b9fb464b7aad1ef7b2398c0111ec74e1e2015bc1 6568 bytes (raw)
name: gnu/packages/browser-extensions.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;;
;;; 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 browser-extensions)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu build chromium-extension)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages python)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages node))

(define play-to-kodi
  (package
    (name "play-to-kodi")
    (version "1.9.1")
    (home-page "https://github.com/khloke/play-to-xbmc-chrome")
    (source (origin
              (method git-fetch)
              (uri (git-reference (url home-page) (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "01rmcpbkn9vhcd8mrah2jmd2801k2r5fz7aqvp22hbwmh2z5f1ch"))))
    (build-system copy-build-system)
    (synopsis "Send website contents to Kodi")
    (description
     "Play to Kodi is a browser add-on that can send video, audio, and other
supported content to the Kodi media center.")
    (license license:expat)))

(define-public play-to-kodi/chromium
  (make-chromium-extension play-to-kodi))

(define uassets
  (let ((commit "20d21ad7e92539660c7cde4c5884b3e234854264"))
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/uBlockOrigin/uAssets")
            (commit commit)))
      (file-name (git-file-name "uAssets" (string-take commit 9)))
      (sha256
       (base32
        "1xcl4qnvjb4pv3fajpmycg1i0xqsah2qakhq2figvyrq991pldy1")))))

(define ublock-origin
  (package
    (name "ublock-origin")
    (version "1.36.0")
    (home-page "https://github.com/gorhill/uBlock")
    (source (origin
              (method git-fetch)
              (uri (git-reference (url home-page) (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1r3aic18zkz8s3v1a2kffidp4swzbxnq0h8444bif9myjffnpxpj"))))
    (build-system gnu-build-system)
    (outputs '("xpi" "firefox" "chromium"))
    (arguments
     '(#:tests? #f                      ;no tests
       #:allowed-references ()
       #:phases
       (modify-phases (map (lambda (phase)
                             (assq phase %standard-phases))
                           '(set-paths unpack patch-source-shebangs))
         (add-after 'unpack 'link-uassets
           (lambda* (#:key native-inputs inputs #:allow-other-keys)
             (symlink (string-append (assoc-ref (or native-inputs inputs)
                                                "uassets"))
                      "../uAssets")
             #t))
         (add-after 'unpack 'make-files-writable
           (lambda _
             ;; The build system copies some files and later tries
             ;; modifying them.
             (for-each make-file-writable (find-files "."))
             #t))
         (add-after 'patch-source-shebangs 'build-xpi
           (lambda _
             (invoke "./tools/make-firefox.sh" "all")))
         (add-after 'build-xpi 'build-chromium
           (lambda _
             (invoke "./tools/make-chromium.sh")))
         (add-after 'build-chromium 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((firefox (assoc-ref outputs "firefox"))
                   (xpi (assoc-ref outputs "xpi"))
                   (chromium (assoc-ref outputs "chromium")))
               (install-file "dist/build/uBlock0.firefox.xpi"
                             (string-append xpi "/lib/mozilla/extensions"))
               (copy-recursively "dist/build/uBlock0.firefox" firefox)
               (copy-recursively "dist/build/uBlock0.chromium" chromium)
               #t))))))
    (native-inputs
     `(("python" ,python-wrapper)
       ("uassets" ,uassets)
       ("zip" ,zip)))
    (synopsis "Block unwanted content from web sites")
    (description
     "uBlock Origin is a @dfn{wide spectrum blocker} for IceCat and
ungoogled-chromium.")
    (license license:gpl3+)))

(define-public ublock-origin/chromium
  (make-chromium-extension ublock-origin "chromium"))

(define tosdr
  (package
    (name "tosdr")
    (version "4.1.1")
    (source
     (origin
       (uri
        (git-reference
         (url "https://github.com/tosdr/browser-extensions.git")
         (commit version)))
       (sha256
        (base32 "0wz31f9rz087yw1a7cdhdgqvgnhbk569jywv846n122m4bpk3yw0"))
       (method git-fetch)))
    (native-inputs
     `(("bash" ,bash-minimal)
       ("coreutils" ,coreutils-minimal)
       ("node" ,node)
       ("zip" ,zip)
       ("unzip" ,unzip)))
    (arguments
     `(#:builder
       (begin
         (use-modules (guix build utils))
         (set-path-environment-variable "PATH"
                                        '("bin")
                                        (map cdr %build-inputs))
         (copy-recursively (assoc-ref %build-inputs "source") ".")
         (invoke "sh" "./build.sh")
         (invoke "unzip" "dist/chrome.zip" "-d" %output)
         #t)
       #:modules ((guix build utils))))
    (build-system trivial-build-system)
    (synopsis "extension to inform of the important aspects of the terms and
conditions of a web service")
    (description "This extension informs you instantly of your rights online by
showing an unintrusive icon in the toolbar. You can click on this icon to get
summaries from the Terms of Service; Didn't Read initiative.")
    (license license:agpl3)
    (home-page "https://tosdr.org/")))

(define-public tosdr-chromium
  (make-chromium-extension tosdr))

debug log:

solving b9fb464b7a ...
found b9fb464b7a in https://yhetil.org/guix/236d4a8f-b911-8242-5e09-9ccb07981592@gmail.com/
found a6120baf96 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 a6120baf966bbd0a7440c878f7e2b652716c2126	gnu/packages/browser-extensions.scm

applying [1/1] https://yhetil.org/guix/236d4a8f-b911-8242-5e09-9ccb07981592@gmail.com/
diff --git a/gnu/packages/browser-extensions.scm b/gnu/packages/browser-extensions.scm
index a6120baf96..b9fb464b7a 100644

Checking patch gnu/packages/browser-extensions.scm...
Applied patch gnu/packages/browser-extensions.scm cleanly.

index at:
100644 b9fb464b7aad1ef7b2398c0111ec74e1e2015bc1	gnu/packages/browser-extensions.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.