all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: 48205@debbugs.gnu.org, ludo@gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#48205] [PATCH] gnu: emacs-org: Don't use release tar
Date: Fri, 26 Nov 2021 00:12:25 -0500	[thread overview]
Message-ID: <BYAPR05MB402332594AFD396371C61822C5639@BYAPR05MB4023.namprd05.prod.outlook.com> (raw)
In-Reply-To: <BYAPR05MB40239B904A0A20F4BFB8B2A6C55B9@BYAPR05MB4023.namprd05.prod.outlook.com>

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/emacs-xyz.scm (emacs-org):
[source]: Use git repository
[arguments]: Added phases to help with building
[native-inputs]: Added texinfo
---

So I still have no clue why the current emacs-org package is not reproducible,
but I made a package that is reproducible.  It also is building from the
development source so people can use package transformations easier and it
actually runs the tests.


 gnu/packages/emacs-xyz.scm | 46 +++++++++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0cc66b6787..ab7b6fcf6a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -12439,24 +12439,44 @@ (define-public emacs-org
     (version "9.5")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://elpa.gnu.org/packages/org-" version ".tar"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.savannah.gnu.org/git/emacs/org-mode.git")
+             (commit (string-append "release_" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "16cflg5nms5nb8w86nvwkg49zkl0rvdhigkf4xpvbs0v7zb5y3ky"))))
+        (base32
+         "1gnzx53gkg2c6ljam31bvbibkra66lfx0w04jqmsv2gk8613527r"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
+     `(#:tests? #t
+       #:test-command '("make" "test-dirty")
+       #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'install-documentation
+         (delete 'build)
+         (add-before 'check 'make
+           (lambda _
+             (invoke "make" (string-append "ORGVERSION=" ,version))))
+         (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((share (string-append (assoc-ref outputs "out") "/share"))
-                    (info-dir (string-append share "/info"))
-                    (doc-dir (string-append share "/doc/" ,name "-" ,version)))
-               (install-file "org.info" info-dir)
-               (install-file "orgguide.info" info-dir)
-               ;; XXX: "orgcard.pdf" is not built in Org 9.5.
-               ;; (install-file "orgcard.pdf" doc-dir)
-               ))))))
+             (substitute* "local.mk"
+               (("^prefix.*") (string-append "prefix = " (assoc-ref outputs "out")))
+               (("^lispdir.*")
+                (string-append "lispdir = " (elpa-directory (assoc-ref outputs "out")))))
+             (invoke "make" "install")))
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             ;; These files are modified during testing
+             (make-file-writable "testing/examples/babel.org")
+             (make-file-writable "testing/examples/ob-awk-test.org")
+             (make-file-writable "testing/examples/ob-sed-test.org")
+             (make-file-writable "testing/examples/ob-shell-test.org")
+
+             ;; Specify where sh is
+             (substitute* "testing/examples/babel.org"
+               (("/bin/sh") (which "sh"))))))))
+    (native-inputs
+     `(("texinfo" ,texinfo)))
     (home-page "https://orgmode.org/")
     (synopsis "Outline-based notes management and organizer")
     (description "Org is an Emacs mode for keeping notes, maintaining TODO
-- 
2.34.0





  parent reply	other threads:[~2021-11-26  5:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 20:54 [bug#48205] [PATCH] gnu: emacs-org: Make build reproducible Morgan.J.Smith
2021-05-11 10:28 ` Ludovic Courtès
2021-06-09 15:32 ` [bug#48205] [PATCH v2] " Morgan.J.Smith
2021-06-11 22:54   ` Ludovic Courtès
2021-11-26  5:12 ` Morgan.J.Smith [this message]
2021-11-28 21:01   ` bug#48205: [PATCH] gnu: emacs-org: Don't use release tar Nicolas Goaziou
2021-12-02  1:57     ` [bug#48205] " Michael Rohleder
2021-12-02 17:38 ` [bug#48205] [PATCH] gnu: emacs-org: Preserve version information Morgan.J.Smith
2021-12-03 20:15   ` Nicolas Goaziou

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=BYAPR05MB402332594AFD396371C61822C5639@BYAPR05MB4023.namprd05.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=48205@debbugs.gnu.org \
    --cc=ludo@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.