From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 61027@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder.
Date: Mon, 23 Jan 2023 13:21:52 +0100 [thread overview]
Message-ID: <20230123122152.5115-3-ngraves@ngraves.fr> (raw)
In-Reply-To: <20230123122152.5115-1-ngraves@ngraves.fr>
* 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
next prev parent reply other threads:[~2023-01-23 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Nicolas Graves via Guix-patches via [this message]
2023-04-04 21:05 ` [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder Jelle Licht
2023-04-04 21:07 ` Jelle Licht
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=20230123122152.5115-3-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=61027@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/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).