diff options
| author | Clément Lassieur <clement@lassieur.org> | 2023-11-01 02:16:48 +0100 |
|---|---|---|
| committer | Clément Lassieur <clement@lassieur.org> | 2023-11-04 00:52:39 +0100 |
| commit | f54f36b363a86bb033275e3a0594974d3d91bd53 (patch) | |
| tree | b4041671bad75e18fbd1a156204fa0c7c59fc0b0 /gnu/packages/browser-extensions.scm | |
| parent | 625cfb4c4ce22250e19cba243c27a4f950746dd7 (diff) | |
gnu: passff-host: Add explicit references to inputs and remove some.
This removes ‘coreutils’, ‘grep’, ‘sed’, ‘which’, ‘bash-minimal’ and
‘gnu-make’ inputs, which were only used by the Makefile and
install_host_app.sh. Instead of running install_host_app.sh (through
‘make’) which does a few text substitutions, do the text substitutions with
Scheme code. This simplifies things and avoids unnecessary native inputs.
* gnu/packages/browser-extensions.scm (passff-host)[build-system]: Change to
copy-build-system.
[arguments]: Copy passff.json and passff.py. Do text substitutions on
them rather than running make. Refer to ‘password-store’ and ‘python’ through
inputs rather than directly.
[inputs]: Add PASSWORD-STORE and PYTHON.
Change-Id: I8fdb757516a7c30eae36b15f2a8d91e1445b19a5
Diffstat (limited to 'gnu/packages/browser-extensions.scm')
| -rw-r--r-- | gnu/packages/browser-extensions.scm | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/gnu/packages/browser-extensions.scm b/gnu/packages/browser-extensions.scm index 99dc7de109c..8ae6fbf4974 100644 --- a/gnu/packages/browser-extensions.scm +++ b/gnu/packages/browser-extensions.scm | |||
| @@ -24,12 +24,9 @@ | |||
| 24 | #:use-module (guix git-download) | 24 | #:use-module (guix git-download) |
| 25 | #:use-module (guix build-system copy) | 25 | #:use-module (guix build-system copy) |
| 26 | #:use-module (guix build-system gnu) | 26 | #:use-module (guix build-system gnu) |
| 27 | #:use-module (guix build-system trivial) | ||
| 28 | #:use-module ((guix licenses) #:prefix license:) | 27 | #:use-module ((guix licenses) #:prefix license:) |
| 29 | #:use-module (gnu build chromium-extension) | 28 | #:use-module (gnu build chromium-extension) |
| 30 | #:use-module (gnu build icecat-extension) | 29 | #:use-module (gnu build icecat-extension) |
| 31 | #:use-module (gnu packages base) | ||
| 32 | #:use-module (gnu packages bash) | ||
| 33 | #:use-module (gnu packages compression) | 30 | #:use-module (gnu packages compression) |
| 34 | #:use-module (gnu packages password-utils) | 31 | #:use-module (gnu packages password-utils) |
| 35 | #:use-module (gnu packages python)) | 32 | #:use-module (gnu packages python)) |
| @@ -167,28 +164,26 @@ ungoogled-chromium.") | |||
| 167 | (sha256 | 164 | (sha256 |
| 168 | (base32 | 165 | (base32 |
| 169 | "1p18l1jh20x4v8dj64z9qjlp96fxsl5h069iynxfpbkzj6hd74yl")))) | 166 | "1p18l1jh20x4v8dj64z9qjlp96fxsl5h069iynxfpbkzj6hd74yl")))) |
| 170 | (build-system trivial-build-system) | 167 | (build-system copy-build-system) |
| 171 | (arguments | 168 | (arguments |
| 172 | (list | 169 | (let ((native-manifests "lib/icecat/native-messaging-hosts")) |
| 173 | #:modules '((guix build utils)) | 170 | (list |
| 174 | #:builder | 171 | #:install-plan |
| 175 | #~(begin | 172 | `'(("src" ,native-manifests #:include ("passff.json" "passff.py"))) |
| 176 | (use-modules (guix build utils)) | 173 | #:phases |
| 177 | (setenv "PATH" (string-join '(#$coreutils | 174 | #~(modify-phases %standard-phases |
| 178 | #$grep | 175 | (add-after 'unpack 'substitute |
| 179 | #$password-store | 176 | (lambda _ |
| 180 | #$python | 177 | (substitute* "src/passff.json" |
| 181 | #$sed | 178 | (("PLACEHOLDER") |
| 182 | #$which) "/bin:" 'suffix)) | 179 | (format #f "~a/~a/passff.py" #$output #$native-manifests))) |
| 183 | (copy-recursively #$source ".") | 180 | (substitute* "src/passff.py" |
| 184 | (patch-shebang "src/install_host_app.sh" | 181 | (("_VERSIONHOLDER_") #$version) |
| 185 | (list (in-vicinity #$bash-minimal "bin"))) | 182 | (("^COMMAND = .*") |
| 186 | (substitute* "src/install_host_app.sh" | 183 | (format #f "COMMAND = \"~a/bin/pass\"~%" |
| 187 | (("(TARGET_DIR_FIREFOX=).*" all var) | 184 | #$(this-package-input "password-store")))) |
| 188 | (string-append var #$output "/lib/icecat/native-messaging-hosts" | 185 | (patch-shebang "src/passff.py"))))))) |
| 189 | "\n"))) | 186 | (inputs (list password-store python)) |
| 190 | (invoke #$(file-append gnu-make "/bin/make") | ||
| 191 | (string-append "VERSION=" #$version) "install-unix")))) | ||
| 192 | (synopsis "Host app for the WebExtension PassFF") | 187 | (synopsis "Host app for the WebExtension PassFF") |
| 193 | (description "This piece of software wraps around the zx2c4 pass shell | 188 | (description "This piece of software wraps around the zx2c4 pass shell |
| 194 | command. It has to be installed for the PassFF browser extension to work | 189 | command. It has to be installed for the PassFF browser extension to work |
