From: Florian Paul Schmidt <mista.tapas@gmx.net>
To: help-guix@gnu.org
Subject: Re: General Question: Execution of binaries not built for GuixSD
Date: Wed, 22 Jun 2016 15:27:58 +0200 [thread overview]
Message-ID: <576A925E.20107@gmx.net> (raw)
In-Reply-To: <576A6D73.3070104@gmx.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 1563 bytes --]
See the attached file for reference. Put it into a guix checkout under
nonfree/packages/
Does that help as a starting point?
Regards,
Flo
On 06/22/2016 12:50 PM, Florian Paul Schmidt wrote:
>
>
> On 22.06.2016 01:21, christoph vogelsberg wrote:
>> Hello
>>
>> I have a fresh installation of GuixSD and I'm keen of learning more. I
>> struggle with a concept and don't know how to circumvent best:
>>
>> Binaries built for ordinary Linux's (as, in my case, Firefox Developer
>> Edition) expect libraries on certain standard pathes which doesn't
>> exist on GuixSD. I found three possibilities that might work:
>>
>> * use fakechroot to make my user profile a pseudo root (disadvantage:
>> I have no experience, it seams there is no package for that)
>> * create symbolic links (disadvantage: new builts get a new path with
>> a hash value and must be re-linked properly)
>> * install a minimal Linux and use Guix instead of GuixSD
>> (disadvantage: this would the point where I had capitulated)
>>
>> My question: is there an already elabored way, documentation and so
>> on, for this specific problem?
>
> There's a tool that you can use to hack library paths in ELF binaries. I
> once packaged the binary releases of firefox and thunderbird using that
> way, but I took the repos containing the package definitions offline due
> to licensing issues. You could use those as a starting point. If you
> wish I can dig out my local copies of the repos once I get home..
>
> Regards,
> Flo
>
--
https://fps.io
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: mozilla.scm --]
[-- Type: text/x-scheme; name="mozilla.scm", Size: 9767 bytes --]
(define-module (nonfree packages mozilla)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system trivial)
#:use-module (guix licenses)
#:use-module (gnu packages base)
#:use-module (gnu packages xorg)
#:use-module (gnu packages elf)
#:use-module (gnu packages gcc)
#:use-module (gnu packages linux)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages bash))
(define-public firefox
(let*
((archive-base-name
"firefox-42.0")
(archive-name
(string-append archive-base-name ".tar.bz2"))
(archive-uri
(string-append "https://download-installer.cdn.mozilla.net/pub/firefox/releases/42.0/linux-x86_64/en-US/" archive-name)))
(package
(name "firefox")
(version "42.0")
(source
(origin
(method url-fetch)
(uri archive-uri)
(sha256
(base32
"1mrghfdkzyxpainnqgl76m08cs6cwy4l89iamnn58q94malpq1z3"))))
(supported-systems '("x86_64-linux"))
(inputs
`(("tar" ,tar)
("bzip2" ,bzip2)
("coreutils" ,coreutils)
("glibc" ,glibc)
("gcc" ,gcc-4.9 ,"lib")
("libstdc++" ,libstdc++-4.9)
("libx11" ,libx11)
("libxext" ,libxext)
("libxdamage" ,libxdamage)
("libxfixes" ,libxfixes)
("libxcomposite" ,libxcomposite)
("libxrender" ,libxrender)
("libxt" ,libxt)
("alsa-lib" ,alsa-lib)
("freetype" ,freetype)
("fontconfig" ,fontconfig)
("dbus-glib" ,dbus-glib)
("glib" ,glib)
("gtk+" ,gtk+-2)
("atk" ,atk)
("pango" ,pango)
("cairo" ,cairo)
("gdk-pixbuf" ,gdk-pixbuf)
("dbus" ,dbus)
("patchelf" ,patchelf)))
(build-system trivial-build-system)
(arguments
'(#:modules
((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let*
((out (assoc-ref %outputs "out"))
(source (assoc-ref %build-inputs "source"))
(tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
(patchelf (string-append (assoc-ref %build-inputs "patchelf") "/bin/patchelf"))
(ld (string-append (assoc-ref %build-inputs "glibc") "/lib/"))
(PATH
(string-append
(assoc-ref %build-inputs "bzip2")
"/bin"
":"
(assoc-ref %build-inputs "tar")
"/bin"
))
(RPATH
(string-append
(assoc-ref %build-inputs "freetype") "/lib" ":"
(assoc-ref %build-inputs "fontconfig") "/lib" ":"
(assoc-ref %build-inputs "libx11") "/lib" ":"
(assoc-ref %build-inputs "libxrender") "/lib" ":"
(assoc-ref %build-inputs "libxext") "/lib" ":"
(assoc-ref %build-inputs "libxdamage") "/lib" ":"
(assoc-ref %build-inputs "libxfixes") "/lib" ":"
(assoc-ref %build-inputs "libxt") "/lib" ":"
(assoc-ref %build-inputs "libxcomposite") "/lib" ":"
(assoc-ref %build-inputs "alsa-lib") "/lib" ":"
(assoc-ref %build-inputs "dbus-glib") "/lib" ":"
(assoc-ref %build-inputs "glib") "/lib" ":"
(assoc-ref %build-inputs "gtk+") "/lib" ":"
(assoc-ref %build-inputs "atk") "/lib" ":"
(assoc-ref %build-inputs "pango") "/lib" ":"
(assoc-ref %build-inputs "cairo") "/lib" ":"
(assoc-ref %build-inputs "gdk-pixbuf") "/lib" ":"
(assoc-ref %build-inputs "dbus") "/lib" ":"
(assoc-ref %build-inputs "libstdc++") "/lib" ":"
(assoc-ref %build-inputs "glibc") "/lib" ":"
(assoc-ref %build-inputs "gcc") "/lib"))
(ln (string-append (assoc-ref %build-inputs "coreutils") "/bin/ln")))
(mkdir-p out)
(mkdir-p (string-append out "/bin"))
(with-directory-excursion out
(setenv "PATH" PATH)
(system* tar "xf" source)
(system* patchelf "--set-interpreter" (string-append ld "/ld-linux-x86-64.so.2") (string-append out "/firefox/firefox"))
(system* patchelf "--set-rpath" RPATH (string-append out "/firefox/firefox"))
(system* patchelf "--set-rpath" RPATH (string-append out "/firefox/libxul.so"))
(system* ln "-s" (string-append out "/firefox/firefox") (string-append out "/bin/firefox")))))))
(synopsis "Firefox")
(description "Pretty cool")
(home-page "http://mozilla.com/firefox")
(license "somewhat shaky"))))
(define-public thunderbird
(let*
((archive-base-name
"thunderbird-38.4.0")
(archive-name
(string-append archive-base-name ".tar.bz2"))
(archive-uri
(string-append "http://download.cdn.mozilla.net/pub/thunderbird/releases/38.4.0/linux-x86_64/en-US/" archive-name)))
(package
(name "thunderbird")
(version "38.4.0")
(source
(origin
(method url-fetch)
(uri archive-uri)
(sha256
(base32
"10bpvajf4r7588pgzh7kalzanwsxcmp10wk3xkpr3nx66was7ng8"))))
(supported-systems '("x86_64-linux"))
(inputs
`(("tar" ,tar)
("bzip2" ,bzip2)
("coreutils" ,coreutils)
("glibc" ,glibc)
("gcc" ,gcc-4.9 ,"lib")
("libstdc++" ,libstdc++-4.9)
("libx11" ,libx11)
("libxext" ,libxext)
("libxdamage" ,libxdamage)
("libxfixes" ,libxfixes)
("libxcomposite" ,libxcomposite)
("libxrender" ,libxrender)
("libxt" ,libxt)
("alsa-lib" ,alsa-lib)
("freetype" ,freetype)
("fontconfig" ,fontconfig)
("dbus-glib" ,dbus-glib)
("glib" ,glib)
("gtk+" ,gtk+-2)
("atk" ,atk)
("pango" ,pango)
("cairo" ,cairo)
("gdk-pixbuf" ,gdk-pixbuf)
("dbus" ,dbus)
("patchelf" ,patchelf)))
(build-system trivial-build-system)
(arguments
'(#:modules
((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let*
((out (assoc-ref %outputs "out"))
(source (assoc-ref %build-inputs "source"))
(tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
(patchelf (string-append (assoc-ref %build-inputs "patchelf") "/bin/patchelf"))
(ld (string-append (assoc-ref %build-inputs "glibc") "/lib/"))
(PATH
(string-append
(assoc-ref %build-inputs "bzip2")
"/bin"
":"
(assoc-ref %build-inputs "tar")
"/bin"
))
(RPATH
(string-append
(assoc-ref %build-inputs "freetype") "/lib" ":"
(assoc-ref %build-inputs "fontconfig") "/lib" ":"
(assoc-ref %build-inputs "libx11") "/lib" ":"
(assoc-ref %build-inputs "libxrender") "/lib" ":"
(assoc-ref %build-inputs "libxext") "/lib" ":"
(assoc-ref %build-inputs "libxdamage") "/lib" ":"
(assoc-ref %build-inputs "libxfixes") "/lib" ":"
(assoc-ref %build-inputs "libxt") "/lib" ":"
(assoc-ref %build-inputs "libxcomposite") "/lib" ":"
(assoc-ref %build-inputs "alsa-lib") "/lib" ":"
(assoc-ref %build-inputs "dbus-glib") "/lib" ":"
(assoc-ref %build-inputs "glib") "/lib" ":"
(assoc-ref %build-inputs "gtk+") "/lib" ":"
(assoc-ref %build-inputs "atk") "/lib" ":"
(assoc-ref %build-inputs "pango") "/lib" ":"
(assoc-ref %build-inputs "cairo") "/lib" ":"
(assoc-ref %build-inputs "gdk-pixbuf") "/lib" ":"
(assoc-ref %build-inputs "dbus") "/lib" ":"
(assoc-ref %build-inputs "libstdc++") "/lib" ":"
(assoc-ref %build-inputs "glibc") "/lib" ":"
(assoc-ref %build-inputs "gcc") "/lib"))
(ln (string-append (assoc-ref %build-inputs "coreutils") "/bin/ln")))
(mkdir-p out)
(mkdir-p (string-append out "/bin"))
(with-directory-excursion out
(setenv "PATH" PATH)
(system* tar "xf" source)
(system* patchelf "--set-interpreter" (string-append ld "/ld-linux-x86-64.so.2") (string-append out "/thunderbird/thunderbird"))
(system* patchelf "--set-rpath" RPATH (string-append out "/thunderbird/thunderbird"))
(system* patchelf "--set-rpath" RPATH (string-append out "/thunderbird/libxul.so"))
(system* ln "-s" (string-append out "/thunderbird/thunderbird") (string-append out "/bin/thunderbird")))))))
(synopsis "Thunderbird")
(description "Pretty cool")
(home-page "http://mozilla.com/thunderbird")
(license "somewhat shaky"))))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-06-22 13:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 23:21 General Question: Execution of binaries not built for GuixSD christoph vogelsberg
2016-06-22 10:50 ` Florian Paul Schmidt
2016-06-22 13:27 ` Florian Paul Schmidt [this message]
2016-06-22 13:53 ` Thompson, David
2016-06-22 14:06 ` ng0
2016-06-22 14:12 ` Florian Paul Schmidt
2016-06-22 12:44 ` Thompson, David
2016-06-24 18:19 ` General Question: What if Binary Building breaks? christoph vogelsberg
2016-06-24 18:55 ` ng0
2016-06-25 17:36 ` Leo Famulari
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=576A925E.20107@gmx.net \
--to=mista.tapas@gmx.net \
--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.
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.