* using dpkg-deb in a Guix package definition
@ 2022-04-30 17:48 Benjamin Slade
2022-05-06 13:41 ` zimoun
2022-05-06 14:39 ` Katherine Cox-Buday
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Slade @ 2022-04-30 17:48 UTC (permalink / raw)
To: help-guix
Hello Guix,
I've been using this package [ <https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/networking/browsers/brave/default.nix#L177> ] from Nix on top of Guix System, but I'd like to create my own Guix package for it instead. Are there any good examples of writing a Guix package definition using dpkg?
best,
—Ben
--
'(Dr Benjamin Slade (he/him)
((Linguistics . University of Utah) . <https://linguistics.utah.edu> )
`(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
((:official-mail . <b.slade@utah.edu>)
(:secure-mail . <slade@lambda-y.net>))
(:website . <https://lambda-y.net> )
"sent by [mu4e] 1.6.10 in [Emacs] 28.1.50 with [org-msg] on [GNU Guix]")
[mu4e] <https://www.djcbsoftware.nl/code/mu/mu4e.html>
[Emacs] <https://www.gnu.org/software/emacs/>
[org-msg] <https://github.com/jeremy-compostella/org-msg>
[GNU Guix] <https://guix.gnu.org/>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using dpkg-deb in a Guix package definition
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
1 sibling, 0 replies; 4+ messages in thread
From: zimoun @ 2022-05-06 13:41 UTC (permalink / raw)
To: Benjamin Slade, help-guix
Hi,
On Sat, 30 Apr 2022 at 11:48, Benjamin Slade <beoram@gmail.com> wrote:
> I've been using this package [
> <https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/networking/browsers/brave/default.nix#L177>
> ] from Nix on top of Guix System, but I'd like to create my own Guix
> package for it instead. Are there any good examples of writing a Guix
> package definition using dpkg?
I do not know what is «this package». :-)
Well, if by using ’dpkg’ you mean reuse the binary inside a .deb
archive, then no, not good examples. Guix tries hard to build from
source.
For your curiosity, you could give a look at the ’copy-build-system’;
maybe that could fit your needs.
Cheers,
simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using dpkg-deb in a Guix package definition
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
1 sibling, 1 reply; 4+ messages in thread
From: Katherine Cox-Buday @ 2022-05-06 14:39 UTC (permalink / raw)
To: Benjamin Slade; +Cc: help-guix
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using dpkg-deb in a Guix package definition
2022-05-06 14:39 ` Katherine Cox-Buday
@ 2022-05-13 18:50 ` Benjamin Slade
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Slade @ 2022-05-13 18:50 UTC (permalink / raw)
To: Katherine Cox-Buday; +Cc: help-guix
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)))
`----
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-13 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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.