unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57790: Strange behavior with emacs-build-system
@ 2022-09-14  2:59 Fredrik Salomonsson
  2022-10-11  9:51 ` zimoun
  0 siblings, 1 reply; 4+ messages in thread
From: Fredrik Salomonsson @ 2022-09-14  2:59 UTC (permalink / raw)
  To: 57790

Hi,

I encountered a strange behavior when using a guix.scm file to build and
run test in an emacs project. The project is called issue.el[0].

I have the following guix.scm:

---✀----------------------------------------------------------------------------
(use-modules
  ((guix licenses) #:prefix license:)
  (guix packages)
  (guix gexp)
  (guix download)
  (guix git-download)
  (guix build-system emacs)
  (guix build emacs-utils)
  (gnu packages)
  (gnu packages emacs)
  (gnu packages emacs-xyz)
  (ice-9 popen)
  (ice-9 rdelim)
  )

(define %git-commit
  (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f2" OPEN_READ)))

(define (skip-git-directory file stat)
  "Skip the `.git` directory when collecting the sources."
  (let ((name (basename file)))
    (not (string=? name ".git"))))

(package
 (name "emacs-issue-el")
 (version (git-version (emacs-header-parse "version" "issue.el") "HEAD" %git-commit))
 (source (local-file (dirname (current-filename))
                     #:recursive? #t
                     #:select? skip-git-directory))
 (build-system emacs-build-system)
 (arguments
  (list #:tests? (not (%current-target-system))
        #:test-command #~'("ert-runner")))
 (native-inputs (list emacs-ert-runner))
 (propagated-inputs
  (list
   emacs-org-jira))
 (home-page "https://sr.ht/~plattfot/issue.el")
 (synopsis "List issues from various issue trackers in emacs")
 (description
  "List issues from various issue trackers in a tabulated buffer in
@code{Emacs} and act on them.  Current supported issue tracker is
@code{jira}.")
 (license license:gpl3+))

--------------------------------------------------------------------------------

If I name the local clone `issue.el` (name of the directory);
`guix build -f guix.scm` will fail. It will just copy the file
`issue.el` and then `ert-runner` fails as there is no test directory.

But if I name the local clone something else, e.g. `issue-el` then it
will copy all the files, `ert-runner` will be happy and
`guix build -f guix.scm` will succeed.

I'm not sure if this is an issue in `emacs-build-system`, `local-file`
or plain old user error.

[0] https://git.sr.ht/~plattfot/issue.el

-- 
s/Fred[re]+i[ck]+/Fredrik/g




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-12  3:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  2:59 bug#57790: Strange behavior with emacs-build-system Fredrik Salomonsson
2022-10-11  9:51 ` zimoun
2022-10-11 17:32   ` Fredrik Salomonsson
2022-10-12  3:46     ` Fredrik Salomonsson

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).