[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#44736] [Shepherd PATCH] build: Add guix.scm helper file.
From: |
Ludovic Courtès |
Subject: |
[bug#44736] [Shepherd PATCH] build: Add guix.scm helper file. |
Date: |
Mon, 11 Jan 2021 13:36:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hello!
Efraim Flashner <efraim@flashner.co.il> skribis:
> * build-aux/guix.scm: New file.
Could you (1) add a copyright header, and (2) add this file to
‘EXTRA_DIST’ in ‘Makefile.am’?
> +(define (keep-file? file stat)
> + (not (any (lambda (my-string)
> + (string-contains file my-string))
> + (list ".git" ".dir-locals.el" "build-aux"))))
FWIW, I’m never quite sure what to do here. In Guile-zstd, I wrote
something that works even from a tarball (not a Git checkout), but it’s
a bit verbose:
https://notabug.org/guile-zstd/guile-zstd/src/master/guix.scm
> +(define (build-from-git base)
> + (package
> + (inherit base)
> + (version (git-version (package-version base) "HEAD" %git-commit))
> + (source (local-file %source-dir
> + #:recursive? #t
> + #:select? keep-file?))
[…]
> +(list (build-from-git (specification->package "shepherd"))
> + (build-from-git (specification->package "guile2.2-shepherd"))
> + ;; This version FTBFS due to an import of '(ice-9 threads)' in
> modules/shepherd.scm
> + ;(build-from-git (specification->package "guile2.0-shepherd"))
> + )
Should it be a manifest instead, so that ‘guix build -f’ works?
The downside of returning several packages is that ‘guix environment -l
guix.scm’ won’t work.
Thanks,
Ludo’.
- [bug#44736] [Shepherd PATCH] build: Add guix.scm helper file.,
Ludovic Courtès <=