Skip to content
Snippets Groups Projects
Commit 2d4f7bb6 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Maxim Cournoyer
Browse files

Makefile: Fix Guix-generated debian bundles (deb-packs).

* Makefile (SUPPORTED_GNU_ARCHS): Remove i686; qtbase 6 doesn't build
for it.
(output): Delete the store output after copying the archive, to avoid
accumulating too much cruft under /gnu/store.
* guix/guix-pack-manifest.scm: Adjust comment.  Rename "libring" to
"libjami".  Delete libringclient related variables.  Rename jami-qt to
jami.
(jami-with-certs): Express more concisely via G-Expressions and
search-input-file or search-input-directory.

Change-Id: I37f1482ed79599536fb42818ef32f4861a32c1da
parent fa19d4d1
Branches
Tags
No related merge requests found
...@@ -234,7 +234,7 @@ $(foreach target,$(DISTRIBUTIONS),\ ...@@ -234,7 +234,7 @@ $(foreach target,$(DISTRIBUTIONS),\
# #
# Guix-generated Debian packages (deb packs) targets. # Guix-generated Debian packages (deb packs) targets.
# #
SUPPORTED_GNU_ARCHS = x86_64 i686 SUPPORTED_GNU_ARCHS = x86_64
DEB_PACK_TARGETS = DEB_PACK_TARGETS =
define guix-pack-command define guix-pack-command
...@@ -256,7 +256,8 @@ deb-pack-$(subst _,-,$(1)): $$(deb-file-name) ...@@ -256,7 +256,8 @@ deb-pack-$(subst _,-,$(1)): $$(deb-file-name)
$$(deb-file-name): has-guix-p $(RELEASE_TARBALL_FILENAME) $$(deb-file-name): has-guix-p $(RELEASE_TARBALL_FILENAME)
output=$$$$($(guix-pack-command) --system=$(1)-linux $$(GUIX_PACK_ARGS)) && \ output=$$$$($(guix-pack-command) --system=$(1)-linux $$(GUIX_PACK_ARGS)) && \
mkdir -p "$$$$(dirname "$$@")" && \ mkdir -p "$$$$(dirname "$$@")" && \
cp --reflink=auto "$$$$output" "$$@" cp --reflink=auto "$$$$output" "$$@" && \
guix gc --delete "$$$$output"
chmod +w "$$@" chmod +w "$$@"
endef endef
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
(gnu packages jami) (gnu packages jami)
(gnu packages python) (gnu packages python)
(guix base32) (guix base32)
(guix gexp)
(guix packages) (guix packages)
(guix transformations) (guix transformations)
(guix store) (guix store)
...@@ -30,9 +31,8 @@ ...@@ -30,9 +31,8 @@
;;; XXX: Below is a rather strenuous way to specify something that ;;; XXX: Below is a rather strenuous way to specify something that
;;; would have been nicer if it could have been specified via: ;;; would have been nicer if it could have been specified via:
;;; ;;;
;;; --with-source=libring=$(RELEASE_TARBALL_FILENAME) \ ;;; --with-source=libjami=$(RELEASE_TARBALL_FILENAME) \
;;; --with-source=libringclient=$(RELEASE_TARBALL_FILENAME) \ ;;; --with-source=jami=$(RELEASE_TARBALL_FILENAME) in the Makefile.
;;; --with-source=jami-qt=$(RELEASE_TARBALL_FILENAME) in the Makefile.
;;; ;;;
;;; The above doesn't currently rewrite the dependency graph ;;; The above doesn't currently rewrite the dependency graph
;;; recursively, hence why it is not sufficient. ;;; recursively, hence why it is not sufficient.
...@@ -68,53 +68,31 @@ ...@@ -68,53 +68,31 @@
`((with-source . ,(format #f "~a@~a=~a" name `((with-source . ,(format #f "~a@~a=~a" name
%release-version %release-file-name))))) %release-version %release-file-name)))))
(define libring/latest ((with-latest-sources "libring") libring)) (define libjami/latest ((with-latest-sources "libjami") libjami))
(define with-libring/latest (define with-libjami/latest
(package-input-rewriting `((,libring . ,libring/latest)))) (package-input-rewriting `((,libjami . ,libjami/latest))))
(define libringclient/latest ((with-latest-sources "libringclient")
(with-libring/latest libringclient)))
(define libringclient/latest+libwrap
(package/inherit libringclient/latest
(arguments
(substitute-keyword-arguments (package-arguments libringclient/latest)
((#:configure-flags flags ''())
`(cons "-DENABLE_LIBWRAP=true"
(delete "-DENABLE_LIBWRAP=false" ,flags)))))))
(define with-libringclient/latest+libwrap
(package-input-rewriting
`((,libringclient . ,libringclient/latest+libwrap))))
;;; Bundling the TLS certificates with Jami enables a fully ;;; Bundling the TLS certificates with Jami enables a fully
;;; functional, configuration-free experience, useful in the context ;;; functional, configuration-free experience, useful in the context
;;; of Guix packs. ;;; of Guix packs.
(define jami-qt-with-certs (define jami-with-certs
(package/inherit jami-qt (package/inherit jami
(inputs (cons `("nss-certs" ,nss-certs) (inputs (modify-inputs (package-inputs jami)
(package-inputs jami-qt))) (append nss-certs)))
(native-inputs (cons `("python" ,python)
(package-native-inputs jami-qt)))
(arguments (arguments
(substitute-keyword-arguments (package-arguments jami-qt) (substitute-keyword-arguments (package-arguments jami)
((#:phases phases '%standard-phases) ((#:phases phases '%standard-phases)
`(modify-phases ,phases #~(modify-phases #$phases
(add-after 'qt-wrap 'wrap-ssl-cert-dir (add-after 'qt-wrap 'wrap-ssl-cert-dir
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (substitute* (search-input-file outputs "bin/jami-qt")
(wrapper (string-append out "/bin/jami-qt"))
(nss-certs (assoc-ref inputs "nss-certs")))
(substitute* wrapper
(("^exec.*" exec-line) (("^exec.*" exec-line)
(string-append "export SSL_CERT_DIR=" (format #f "export SSL_CERT_DIR=~a~%"
nss-certs (search-input-directory inputs "etc/ssl/certs")
"/etc/ssl/certs\n" exec-line)))))))))))
exec-line))))))))))))
(define jami-qt-with-certs/latest (define jami-with-certs/latest
((with-latest-sources "jami-qt") ((with-latest-sources "jami") jami-with-certs))
(with-libringclient/latest+libwrap jami-qt-with-certs)))
(packages->manifest (list jami-qt-with-certs/latest)) (packages->manifest (list jami-with-certs/latest))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment