aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2020-06-09 23:12:16 +0800
committerTing-Wei Lan <lantw44@gmail.com>2020-06-09 23:12:16 +0800
commit694dadb1add8391c33c218f2ca185c1df6fa9808 (patch)
tree6c909ffad26b64ff3512587e8de930eb1c7c5a2b
parent99dff50da7d7f1ac9471802a2b7cb0ad319ac4f5 (diff)
downloadcopr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar.gz
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar.bz2
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar.lz
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar.xz
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.tar.zst
copr-rpm-spec-694dadb1add8391c33c218f2ca185c1df6fa9808.zip
guix: Fix crash for emacs-guix
-rw-r--r--guix/emacs-guix/emacs-guix-0.5.2-guix-api-change.patch89
-rw-r--r--guix/emacs-guix/emacs-guix.spec9
2 files changed, 97 insertions, 1 deletions
diff --git a/guix/emacs-guix/emacs-guix-0.5.2-guix-api-change.patch b/guix/emacs-guix/emacs-guix-0.5.2-guix-api-change.patch
new file mode 100644
index 0000000..047737c
--- /dev/null
+++ b/guix/emacs-guix/emacs-guix-0.5.2-guix-api-change.patch
@@ -0,0 +1,89 @@
+From 5b65938f778907c672bfb2f47d4971cf515341d3 Mon Sep 17 00:00:00 2001
+From: Alex Kost <alezost@gmail.com>
+Date: Mon, 18 May 2020 18:44:21 +0300
+Subject: [PATCH] scheme/actions: Updates for a recent API change
+
+That was introduced by
+<https://git.savannah.gnu.org/cgit/guix.git/commit/?id=65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161>
+
+This should fix <https://gitlab.com/emacs-guix/emacs-guix/-/issues/18>.
+
+* scheme/emacs-guix/actions.scm (process-package-actions): Use the new
+'with-build-handler' macro instead of calling 'build-and-use-profile'
+with '#:dry-run?' and '#:use-substitutes?' keywords.
+(package-source-build-derivation): Likewise.
+---
+ scheme/emacs-guix/actions.scm | 44 +++++++++++++++++++----------------
+ 1 file changed, 24 insertions(+), 20 deletions(-)
+
+diff --git a/scheme/emacs-guix/actions.scm b/scheme/emacs-guix/actions.scm
+index 9e75318..472a7b3 100644
+--- a/scheme/emacs-guix/actions.scm
++++ b/scheme/emacs-guix/actions.scm
+@@ -1,6 +1,6 @@
+ ;;; actions.scm --- Various store actions on packages and generations
+
+-;; Copyright © 2014-2016 Alex Kost <alezost@gmail.com>
++;; Copyright © 2014–2016, 2020 Alex Kost <alezost@gmail.com>
+
+ ;; This file is part of Emacs-Guix.
+
+@@ -116,14 +116,15 @@ OUTPUTS is a list of package outputs (may be an empty list)."
+ (unless (and (null? install) (null? remove))
+ (parameterize ((%graft? (not dry-run?)))
+ (with-store store
+- (set-build-options store
+- #:print-build-trace #f
+- #:use-substitutes? use-substitutes?)
+- (show-manifest-transaction store manifest transaction
+- #:dry-run? dry-run?)
+- (build-and-use-profile store profile new-manifest
+- #:use-substitutes? use-substitutes?
+- #:dry-run? dry-run?))))))
++ (with-build-handler (build-notifier
++ #:use-substitutes? use-substitutes?
++ #:dry-run? dry-run?)
++ (set-build-options store
++ #:print-build-trace #f
++ #:use-substitutes? use-substitutes?)
++ (show-manifest-transaction store manifest transaction
++ #:dry-run? dry-run?)
++ (build-and-use-profile store profile new-manifest)))))))
+
+ (define (build-package* package . build-options)
+ "Build PACKAGE using BUILD-OPTIONS acceptable by 'set-build-options'.
+@@ -173,17 +174,20 @@ GENERATIONS is a list of generation numbers."
+ (with-store store
+ (let* ((derivation (package-source-derivation store source))
+ (derivations (list derivation)))
+- (set-build-options store
+- #:print-build-trace #f
+- #:use-substitutes? use-substitutes?)
+- (show-what-to-build store derivations
+- #:use-substitutes? use-substitutes?
+- #:dry-run? dry-run?)
+- (unless dry-run?
+- (build-derivations store derivations))
+- (format #t "The source store file name: ~a~%"
+- (package-source-derivation->store-file-name
+- derivation))))))
++ (with-build-handler (build-notifier
++ #:use-substitutes? use-substitutes?
++ #:dry-run? dry-run?)
++ (set-build-options store
++ #:print-build-trace #f
++ #:use-substitutes? use-substitutes?)
++ (show-what-to-build store derivations
++ #:use-substitutes? use-substitutes?
++ #:dry-run? dry-run?)
++ (unless dry-run?
++ (build-derivations store derivations))
++ (format #t "The source store file name: ~a~%"
++ (package-source-derivation->store-file-name
++ derivation)))))))
+
+ (define (package-build-log-file package-id)
+ "Return the build log file of a package PACKAGE-ID.
+--
+2.27.0
+
diff --git a/guix/emacs-guix/emacs-guix.spec b/guix/emacs-guix/emacs-guix.spec
index 25d249a..a97b4c0 100644
--- a/guix/emacs-guix/emacs-guix.spec
+++ b/guix/emacs-guix/emacs-guix.spec
@@ -3,13 +3,17 @@
Name: emacs-%{pkg}
Version: 0.5.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Emacs-Guix is an Emacs interface for GNU Guix package manager
License: GPLv3+
URL: https://emacs-guix.gitlab.io/website
Source0: https://emacs-guix.gitlab.io/website/releases/%{name}-%{version}.tar.gz
+# Fix crash when installing a package
+# https://gitlab.com/emacs-guix/emacs-guix/-/issues/18
+Patch0: emacs-guix-0.5.2-guix-api-change.patch
+
%global debug_package %{nil}
%global guile_source_dir %{_datadir}/guile/site/2.2
%global guile_ccache_dir %{_libdir}/guile/2.2/site-ccache
@@ -99,6 +103,9 @@ fi
%changelog
+* Tue Jun 09 2020 Ting-Wei Lan <lantw44@gmail.com> - 0.5.2-2
+- Add a patch from upstream to fix crash when installing a package
+
* Sun Apr 26 2020 Ting-Wei Lan <lantw44@gmail.com> - 0.5.2-1
- Update to 0.5.2