From: Benjamin Slade <beoram@gmail.com>
To: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: using dpkg-deb in a Guix package definition
Date: Fri, 13 May 2022 12:50:17 -0600 [thread overview]
Message-ID: <87r14xjmf0.fsf@gmail.com> (raw)
In-Reply-To: <87tua2wwqz.fsf@gmail.com>
On Fri, 06 May 2022 08:39:48 -0600 (1 week, 4 hours, 10 minutes ago), Katherine Cox-Buday <cox.katherine.e@gmail.com> wrote:
> Benjamin Slade <beoram@gmail.com> writes:
> > Are there any good examples of writing a Guix package definition using dpkg?
> I'm not sure if this helps, but I had to consume a deb and wrote a package that
> unpacks it to get the binary:
> <https://github.com/kat-co/guix-channels/blob/non-free/non-free/packages/security.scm#L122-L127>=
> --
> Katherine
Thanks! I got a partial definition done; it at least downloads and dpkg's, though I have to figure out what to patchelf still (and would rather have in /bin than /opt).
,----
| (use-modules (guix packages)
| (guix download)
| ((guix licenses) #:prefix license:)
| (gnu packages)
| (gnu packages debian)
| (gnu packages gnome)
| (gnu packages glib)
| (gnu packages gtk)
| (guix build-system)
| (nonguix build-system binary)
| (gnu packages pkg-config))
|
| (package
| (name "brave-browser")
| (version "1.38.111")
| (source
| (origin
| (method url-fetch)
| (uri (string-append
| "https://github.com/brave/brave-browser/releases/download/v"
| version "/brave-browser_" version "_amd64.deb"))
| (sha256
| (base32 "1fx2gbp21m7adclykq7nl21qm5hmlpcbnz0fdybmqfchs29d0i5i"))))
| (build-system binary-build-system)
| (arguments
| `(#:install-plan
| '(("opt/" "opt"))
| #:patchelf-plan
| '(("opt/brave.com/brave/brave" ("libc"))
| ("opt/brave.com/brave/brave-browser" ("libc")))
| #:phases
| (modify-phases %standard-phases
| (replace 'unpack
| (lambda* (#:key inputs source #:allow-other-keys)
| (let ((dpkg (string-append (assoc-ref inputs "dpkg")
| "/bin/dpkg")))
| (invoke dpkg "-x" source ".")))))))
| ; need something like: dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner
| (native-inputs
| `(("dpkg" ,dpkg)
| ;; ("wrapGAppsHook" ,wrapGAppsHooks)
| ))
| (inputs
| `(("glib" ,glib)
| ("gtk+" ,gtk+)
| ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
| (supported-systems '("x86_64-linux"))
| (home-page "https://brave.com/")
| (synopsis "Brave browser")
| (description "Brave browser based on Chromium.")
| (license (list license:mpl2.0)))
`----
prev parent reply other threads:[~2022-05-13 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 17:48 using dpkg-deb in a Guix package definition Benjamin Slade
2022-05-06 13:41 ` zimoun
2022-05-06 14:39 ` Katherine Cox-Buday
2022-05-13 18:50 ` Benjamin Slade [this message]
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=87r14xjmf0.fsf@gmail.com \
--to=beoram@gmail.com \
--cc=cox.katherine.e@gmail.com \
--cc=help-guix@gnu.org \
/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.
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).