From: Kaelyn <kaelyn.alexi@protonmail.com>
To: "Clément Lassieur" <clement@lassieur.org>
Cc: Christopher Baines <mail@cbaines.net>, guix-devel@gnu.org
Subject: Re: branch master updated: gnu: Add passff.
Date: Sat, 28 Oct 2023 17:53:30 +0000 [thread overview]
Message-ID: <e_n9GQmrx7NHEZ4GjEY4MsX8gQKme57kq1O19vxKK6uf2FEV32cxnANvxVQO3Seky6WuO8KmbE2Q7eEXmIfwAbloCNC798FQlv8zqLu-l8g=@protonmail.com> (raw)
In-Reply-To: <87a5s2bxeg.fsf@lassieur.org>
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
------- Original Message -------
On Saturday, October 28th, 2023 at 8:05 AM, Clément Lassieur <clement@lassieur.org> wrote:
>
>
> On Sat, Oct 28 2023, Christopher Baines wrote:
>
> > This passff-host package looks a bit odd to me, one thing to mention is
> > that guix show says it has no dependencies, but I don't think that's
> > correct:
I agree about this. When I packaged passff-host locally some time ago, I saw it has a runtime dependency on python and also needs to be able to find the pass binary. I've attached the bare (unfinished/unpolished) package definition extracted from my local channel and attached it, for if it is of assistance to folks. My definition tries to embed a sane path for finding pass with a default of the path to the password-store package it was built against, and also tries to copy the passff.json into the correct browser folder for Chromium, Firefox, and Icecat based on the packaged install_host_app.sh script (note: I have only used it with Icecat).
Cheers,
Kaelyn
> >
> > ./pre-inst-env guix show passff-host
> > name: passff-host
> > version: 1.2.3
> > outputs:
> > + out: everything
> > systems: x86_64-linux mips64el-linux aarch64-linux powerpc64le-linux riscv64-linux
> > + i686-linux armhf-linux i586-gnu powerpc-linux
> > dependencies:
>
>
> I imagine it's a bug in `guix show`? As doc says:
>
> • Gexps carry information about the packages or derivations they
> refer to, and these dependencies are automatically added as inputs
> to the build processes that use them.
>
> > Was this change sent as a patch to guix-patches?
>
>
> No it wasn't.
I
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: passff-host.scm --]
[-- Type: text/x-scheme; name=passff-host.scm, Size: 3656 bytes --]
(define-public passff-host
(package
(name "passff-host")
(version "1.2.3")
(home-page "https://github.com/passff/passff-host/")
(source
(origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1p18l1jh20x4v8dj64z9qjlp96fxsl5h069iynxfpbkzj6hd74yl"))
))
;; NOTE: python-build-system is used instead of copy-build-system to
;; automatically pick up the Python 3 dependency and to wrap the installed
;; Python script.
;; FIXME: The passff.json in etc/ needs to go into a browser-dependent
;; location to work with that specific browser. How to install it to the
;; right location needs to be figured out and documented.
(build-system python-build-system)
(arguments
(list #:tests? #f ; There are no tests
#:phases
#~(modify-phases %standard-phases
(replace 'build
(lambda _
;; TODO? Add password-store as an input and embed the store
;; path to the "pass" executable.
(substitute* "src/passff.py"
(("_VERSIONHOLDER_") #$(package-version this-package))
;; (("\"pass\"") (string-append
;; "\""
;; #$(this-package-input "password-store")
;; "/bin/pass\""))
(("\"PATH\": .*")
(string-join (list
"\"PATH\""
" \"/run/current-system/profile/bin"
"/run/booted-system/profile/bin"
(string-append
#$(this-package-input "password-store")
"/bin\",\n"))
":"))
)))
(replace 'install
(lambda _
(let ((etc (string-append #$output "/etc"))
(libexec (string-append #$output "/libexec")))
;; Install the host script in libexec
(install-file "src/passff.py" libexec)
;; Insert the script path and install the (example)
;; native host manifest to etc
(substitute* "src/passff.json"
(("PLACEHOLDER") (string-append libexec "/passff.py")))
(for-each
(lambda (dir)
(install-file "src/passff.json" dir))
(list etc ;; Generic location for easier access
;; Chromium location based on src/install_host_app.sh
(string-append etc "/chromium/native-messaging-hosts")
;; Firefox location based on src/install_host_app.sh
(string-append #$output "/lib/mozilla/native-messaging-hosts")
;; Icecat location derived from the above Firefox location
(string-append #$output "/lib/icecat/native-messaging-hosts")))
)))
)))
(inputs (list password-store))
(synopsis "Host app for the WebExtension PassFF")
(description
"This piece of software wraps around the zx2c4 pass shell command. It has
to be installed for the PassFF browser extension to work properly.")
(license li:gpl2)))
next prev parent reply other threads:[~2023-10-28 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169826674567.18633.11885829962706141651@vcs2.savannah.gnu.org>
2023-10-28 14:35 ` branch master updated: gnu: Add passff Christopher Baines
2023-10-28 15:05 ` Clément Lassieur
2023-10-28 17:53 ` Kaelyn [this message]
2023-10-30 14:23 ` Clément Lassieur
2023-11-01 3:33 ` Clément Lassieur
2023-10-31 2:48 ` John Kehayias
2023-10-31 19:33 ` Clément Lassieur
2023-11-01 3:36 ` Clément Lassieur
2023-11-03 18:46 ` G-expressions and chroot environment? (was Re: branch master updated: gnu: Add passff.) Simon Tournier
2023-11-06 15:19 ` Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e_n9GQmrx7NHEZ4GjEY4MsX8gQKme57kq1O19vxKK6uf2FEV32cxnANvxVQO3Seky6WuO8KmbE2Q7eEXmIfwAbloCNC798FQlv8zqLu-l8g=@protonmail.com' \
--to=kaelyn.alexi@protonmail.com \
--cc=clement@lassieur.org \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).