* [bug#61027] [PATCH] Add flatpak-builder.
@ 2023-01-23 12:06 Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 1/3] gnu: Add debugedit Nicolas Graves via Guix-patches via
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-01-23 12:06 UTC (permalink / raw)
To: 61027
3 patches to add the tool flatpak-builder, useful for building flatpaks.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#61027] [PATCH 1/3] gnu: Add debugedit.
2023-01-23 12:06 [bug#61027] [PATCH] Add flatpak-builder Nicolas Graves via Guix-patches via
@ 2023-01-23 12:21 ` Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 2/3] gnu: Add libglnx Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder Nicolas Graves via Guix-patches via
0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-01-23 12:21 UTC (permalink / raw)
To: 61027; +Cc: ngraves
* gnu/packages/debug.scm (debugedit): New variable.
---
gnu/packages/debug.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 1c4f570fe4..48b927b89d 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -47,6 +47,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages check)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages flex)
#:use-module (gnu packages gdb)
#:use-module (gnu packages glib)
@@ -56,6 +57,8 @@ (define-module (gnu packages debug)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages m4)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ninja)
#:use-module (gnu packages perl)
@@ -795,6 +798,38 @@ (define-public cgdb
using cgdb.")
(license license:gpl2+)))
+(define-public debugedit
+ (package
+ (name "debugedit")
+ (version "5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://sourceware.org/git/debugedit.git")
+ (commit (string-append name "-" version) )))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1jxiizzzvx89dhs99aky48kl5s49i5zr9d7j4753gp0knk4pndjm"))))
+ (build-system gnu-build-system)
+ (arguments '(#:tests? #f))
+ (propagated-inputs (list elfutils))
+ (inputs (list zlib xz))
+ (native-inputs
+ (list
+ autoconf automake m4 util-linux libtool help2man pkg-config))
+ (home-page "https://sourceware.org/git/debugedit.git")
+ (synopsis "Tool for debugging")
+ (description
+ "The debugedit project provides programs and scripts for creating
+debuginfo and source file distributions, collect build-ids and rewrite
+source paths in DWARF data for debugging, tracing and profiling.
+
+It is based on code originally from the rpm project plus libiberty and
+binutils. It depends on the elfutils libelf and libdw libraries to
+read and write ELF files, DWARF data and build-ids.")
+ (license license:lgpl2.1)))
+
(define-public mspdebug
;; Last official release was 24 July 2017
(let ((commit "4c4d94e43bc4a18ecf82070ff81cd38dd5641e3b")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61027] [PATCH 2/3] gnu: Add libglnx.
2023-01-23 12:21 ` [bug#61027] [PATCH 1/3] gnu: Add debugedit Nicolas Graves via Guix-patches via
@ 2023-01-23 12:21 ` Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder Nicolas Graves via Guix-patches via
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-01-23 12:21 UTC (permalink / raw)
To: 61027; +Cc: ngraves
* gnu/packages/package-management.scm (libglnx): New variable.
---
gnu/packages/package-management.scm | 48 +++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 708e06dfe7..6210be4d5c 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1924,6 +1924,54 @@ (define-public libostree
the boot loader configuration.")
(license license:lgpl2.0+)))
+(define-public libglnx
+ (let ((commit "4e44fd9c174e4196a86fb6d954722feaff612c88")
+ (revision "0"))
+ (package
+ (name "libglnx")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.gnome.org/GNOME/libglnx.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0b1aqrls3ql2c820plwg0vnxh4xkixvxbkn8mxbyqar7ni8nz0wj"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ ;; Using a "release" build is recommended for performance
+ #:build-type "release"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'prepare-install
+ (lambda _
+ ;; Install lib.
+ (substitute* "meson.build"
+ (("^ install : false)")
+ (string-append
+ " install : true)" "\n"
+ "install_headers("
+ (string-join
+ (map (lambda (x) (string-append "'" x "'"))
+ (delete "config.h" (find-files "." "\\.h$")))
+ ", ")
+ ")" )))))
+ (add-after 'install 'install-linglnx-config
+ (lambda _
+ (install-file "libglnx-config.h"
+ (string-append #$output "/include")))))))
+ (native-inputs (list cmake pkg-config))
+ (propagated-inputs (list glib))
+ (home-page "https://gitlab.gnome.org/GNOME/libglnx.git")
+ (synopsis "libglnx is an extension to glib")
+ (description
+ "libglnx is the successor to libgsystem. It is used for modules which
+depend on both Glib and Linux.")
+ (license license:lgpl2.1))))
+
(define-public flatpak
(package
(name "flatpak")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder.
2023-01-23 12:21 ` [bug#61027] [PATCH 1/3] gnu: Add debugedit Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 2/3] gnu: Add libglnx Nicolas Graves via Guix-patches via
@ 2023-01-23 12:21 ` Nicolas Graves via Guix-patches via
2023-04-04 21:05 ` Jelle Licht
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-01-23 12:21 UTC (permalink / raw)
To: 61027; +Cc: ngraves
* gnu/packages/package-management.scm (flatpak-builder): New variable.
---
gnu/packages/package-management.scm | 103 ++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 6210be4d5c..bfba2eeacf 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -59,9 +59,11 @@ (define-module (gnu packages package-management)
#:use-module (gnu packages crypto)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
+ #:use-module (gnu packages debug)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages dbm)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages file)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages flex)
@@ -83,6 +85,7 @@ (define-module (gnu packages package-management)
#:use-module (gnu packages lisp)
#:use-module (gnu packages lua)
#:use-module (gnu packages man)
+ #:use-module (gnu packages m4)
#:use-module (gnu packages markup)
#:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
@@ -2077,6 +2080,106 @@ (define-public flatpak
sandboxed desktop applications on GNU/Linux.")
(license license:lgpl2.1+)))
+(define-public flatpak-builder
+ (package
+ (name "flatpak-builder")
+ (version "1.2.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/flatpak/flatpak-builder.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "07pih8v2i3jzyy8zccdljgi3pgj52bgycrh4h5s20lwdxgnh2hb3"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags
+ (list
+ "--enable-documentation=no"
+ "--with-system-debugedit")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-submodules
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((llibglnx (assoc-ref inputs "libglnx")))
+ (substitute* "autogen.sh"
+ (("^if ! test -f libglnx/README.md; then")
+ "if test -f libglnx/README.md; then")
+ ((".*subprojects/libglnx.*") ""))
+ (substitute* "configure.ac"
+ (("LIBGLNX_CONFIGURE") ""))
+ (substitute* "src/Makefile.am.inc"
+ (("libglnx.la") "-lglnx"))
+ (substitute* "Makefile.am"
+ (("^include subprojects/libglnx/Makefile-libglnx.am.inc")
+ "")
+ ((".*libglnx_srcpath.*") "")
+ ((".*/subprojects/debugedit.*") "")
+ (("-I subprojects/libglnx")
+ (string-append "-I " llibglnx "/include"))
+ ((".*subprojects/libglnx.*")
+ (string-append " -I " llibglnx "/include"))
+ (("noinst_LTLIBRARIES .=.*") "")
+ (("libglnx_libs :=.*")
+ (string-append "LDFLAGS += -L" llibglnx " -lglnx -static" "\n"))
+ (("libglnx_cflags :=") "LIBGLNX_CFLAGS = -lglnx"))
+ (substitute*
+ '("src/builder-cache.c"
+ "src/builder-cache.h"
+ "src/builder-extension.c"
+ "src/builder-flatpak-utils.c"
+ "src/builder-flatpak-utils.h"
+ "src/builder-main.c"
+ "src/builder-manifest.c"
+ "src/builder-module.c"
+ "src/builder-post-process.c")
+ (("\"libglnx/libglnx.h\"") "<libglnx.h>")
+ (("<libglnx/libglnx.h>") "<libglnx.h>")))))
+ ;; Test are supposed to be done in /var/tmp because of the need for
+ ;; xattrs. Nonetheless, moving it back to /tmp makes tests suceed.
+ (add-before 'check 'allow-tests
+ (lambda _
+ (substitute* '("buildutil/tap-test" "tests/libtest.sh")
+ (("\\/var\\/tmp\\/")
+ "/tmp/")))))))
+ (propagated-inputs (list flatpak debugedit libglnx elfutils))
+ (inputs
+ (list libsoup-minimal-2
+ libostree
+ json-glib
+ curl
+ libyaml))
+ (native-inputs
+ (list autoconf
+ automake
+ m4
+ libtool
+ pkg-config
+ gettext-minimal
+ which))
+ (home-page "https://github.com/flatpak/flatpak-builder.git")
+ (synopsis "Tool to build flatpaks from source")
+ (description "@code{flatpak-builder} is a wrapper around the flatpak build
+command that automates the building of applications and their dependencies.
+It is one option you can use to build applications.
+
+The goal of flatpak-builder is to push as much knowledge about how to build
+modules to the individual upstream projects. An invocation of flatpak-builder
+proceeds in these stages, each being specified in detail in json format in
+the file MANIFEST :
+
+@itemize
+@item Download all sources
+@item Initialize the application directory with flatpak build-init
+@item Build and install each module with flatpak build
+@item Clean up the final build tree by removing unwanted files and
+e.g. stripping binaries
+@item Finish the application directory with flatpak build-finish
+@end itemize")
+ (license license:lgpl2.1)))
+
(define-public akku
(package
(name "akku")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder.
2023-01-23 12:21 ` [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder Nicolas Graves via Guix-patches via
@ 2023-04-04 21:05 ` Jelle Licht
2023-04-04 21:07 ` Jelle Licht
0 siblings, 1 reply; 6+ messages in thread
From: Jelle Licht @ 2023-04-04 21:05 UTC (permalink / raw)
To: 61027; +Cc: ngraves
Hi Nicolas,
This particular patch does not apply cleanly (anymore).
I think it may introduce module import cycles as well; any chance you
could have a look at that? If it becomes too much of a mess, moving this
package (and eventually other packages as well) into a new
'gnu/packages/flatpak.scm' file could work.
Some additional nitpicks follow inline.
Nicolas Graves via Guix-patches via <guix-patches@gnu.org> writes:
> * gnu/packages/package-management.scm (flatpak-builder): New variable.
> ---
> gnu/packages/package-management.scm | 103 ++++++++++++++++++++++++++++
> 1 file changed, 103 insertions(+)
>
> diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
> index 6210be4d5c..bfba2eeacf 100644
> --- a/gnu/packages/package-management.scm
> +++ b/gnu/packages/package-management.scm
You are missing a copyright line :-)
> @@ -59,9 +59,11 @@ (define-module (gnu packages package-management)
> #:use-module (gnu packages crypto)
> #:use-module (gnu packages curl)
> #:use-module (gnu packages databases)
> + #:use-module (gnu packages debug)
> #:use-module (gnu packages dejagnu)
> #:use-module (gnu packages dbm)
> #:use-module (gnu packages docbook)
> + #:use-module (gnu packages elf)
> #:use-module (gnu packages file)
> #:use-module (gnu packages freedesktop)
> #:use-module (gnu packages flex)
> @@ -83,6 +85,7 @@ (define-module (gnu packages package-management)
> #:use-module (gnu packages lisp)
> #:use-module (gnu packages lua)
> #:use-module (gnu packages man)
> + #:use-module (gnu packages m4)
> #:use-module (gnu packages markup)
> #:use-module (gnu packages nettle)
> #:use-module (gnu packages networking)
> @@ -2077,6 +2080,106 @@ (define-public flatpak
> sandboxed desktop applications on GNU/Linux.")
> (license license:lgpl2.1+)))
>
> +(define-public flatpak-builder
> + (package
> + (name "flatpak-builder")
> + (version "1.2.3")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/flatpak/flatpak-builder.git")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "07pih8v2i3jzyy8zccdljgi3pgj52bgycrh4h5s20lwdxgnh2hb3"))))
> + (build-system gnu-build-system)
> + (arguments
> + '(#:configure-flags
> + (list
> + "--enable-documentation=no"
Enabling documentation should be workable in a way similar to what we do
for gtk-doc, and I've noticed nix already has a similar patch as well as
the one both us and them use for gtk-doc [1].
Adding docbook-xsl, docbook-xml-4.3, libxslt and libxml2 to
native-inputs should do the trick afterwards (untested).
> + "--with-system-debugedit")
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'disable-submodules
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((llibglnx (assoc-ref inputs "libglnx")))
> + (substitute* "autogen.sh"
> + (("^if ! test -f libglnx/README.md; then")
> + "if test -f libglnx/README.md; then")
Instead of inverting the test, why not substitute with something like
"if false; then" (untested)?
> + ((".*subprojects/libglnx.*") ""))
> + (substitute* "configure.ac"
> + (("LIBGLNX_CONFIGURE") ""))
> + (substitute* "src/Makefile.am.inc"
> + (("libglnx.la") "-lglnx"))
> + (substitute* "Makefile.am"
> + (("^include subprojects/libglnx/Makefile-libglnx.am.inc")
> + "")
> + ((".*libglnx_srcpath.*") "")
> + ((".*/subprojects/debugedit.*") "")
> + (("-I subprojects/libglnx")
> + (string-append "-I " llibglnx "/include"))
> + ((".*subprojects/libglnx.*")
> + (string-append " -I " llibglnx "/include"))
> + (("noinst_LTLIBRARIES .=.*") "")
> + (("libglnx_libs :=.*")
> + (string-append "LDFLAGS += -L" llibglnx " -lglnx -static" "\n"))
> + (("libglnx_cflags :=") "LIBGLNX_CFLAGS = -lglnx"))
> + (substitute*
> + '("src/builder-cache.c"
> + "src/builder-cache.h"
> + "src/builder-extension.c"
> + "src/builder-flatpak-utils.c"
> + "src/builder-flatpak-utils.h"
> + "src/builder-main.c"
> + "src/builder-manifest.c"
> + "src/builder-module.c"
> + "src/builder-post-process.c")
> + (("\"libglnx/libglnx.h\"") "<libglnx.h>")
> + (("<libglnx/libglnx.h>") "<libglnx.h>")))))
> + ;; Test are supposed to be done in /var/tmp because of the need for
> + ;; xattrs. Nonetheless, moving it back to /tmp makes tests suceed.
> + (add-before 'check 'allow-tests
> + (lambda _
> + (substitute* '("buildutil/tap-test" "tests/libtest.sh")
> + (("\\/var\\/tmp\\/")
> + "/tmp/")))))))
> + (propagated-inputs (list flatpak debugedit libglnx elfutils))
> + (inputs
> + (list libsoup-minimal-2
> + libostree
> + json-glib
> + curl
> + libyaml))
> + (native-inputs
> + (list autoconf
> + automake
> + m4
> + libtool
> + pkg-config
> + gettext-minimal
> + which))
> + (home-page "https://github.com/flatpak/flatpak-builder.git")
> + (synopsis "Tool to build flatpaks from source")
> + (description "@code{flatpak-builder} is a wrapper around the flatpak build
> +command that automates the building of applications and their dependencies.
> +It is one option you can use to build applications.
This
> +
> +The goal of flatpak-builder is to push as much knowledge about how to build
> +modules to the individual upstream projects. An invocation of flatpak-builder
> +proceeds in these stages, each being specified in detail in json format in
> +the file MANIFEST :
> +
> +@itemize
> +@item Download all sources
> +@item Initialize the application directory with flatpak build-init
> +@item Build and install each module with flatpak build
> +@item Clean up the final build tree by removing unwanted files and
> +e.g. stripping binaries
> +@item Finish the application directory with flatpak build-finish
> +@end itemize")
> + (license license:lgpl2.1)))
> +
> (define-public akku
> (package
> (name "akku")
> --
> 2.39.1
[1]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/flatpak-builder/respect-xml-catalog-files-var.patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-04 21:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-23 12:06 [bug#61027] [PATCH] Add flatpak-builder Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 1/3] gnu: Add debugedit Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 2/3] gnu: Add libglnx Nicolas Graves via Guix-patches via
2023-01-23 12:21 ` [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder Nicolas Graves via Guix-patches via
2023-04-04 21:05 ` Jelle Licht
2023-04-04 21:07 ` Jelle Licht
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.