~ruther/guix-local

43498d3ea1e96540b725e137cc6188a00ecf5140 — Ricardo Wurmus 5 months ago 7bc6207
gnu: xandikos: Fix entry point script.

Fixes <https://codeberg.org/guix/guix/issues/5514>.

* gnu/packages/dav.scm (xandikos)[arguments]: Replace phase
'create-entrypoints.

Change-Id: I78b1c222026d71297ec912cf9442f2e74a963b34
1 files changed, 17 insertions(+), 0 deletions(-)

M gnu/packages/dav.scm
M gnu/packages/dav.scm => gnu/packages/dav.scm +17 -0
@@ 7,6 7,7 @@
;;; Copyright © 2022, 2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2025 Junker <dk@junkeria.club>
;;; Copyright © 2026 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 129,6 130,22 @@ clients.")
      #:test-backend #~'unittest
      #:phases
      #~(modify-phases %standard-phases
          (replace 'create-entrypoints
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((sitedir (site-packages inputs outputs))
                    (interpreter (which "python"))
                    (file-path (string-append #$output "/bin/xandikos")))
                (mkdir-p (string-append #$output "/bin"))
                (call-with-output-file file-path
                  (lambda (port)
                    (format port "#!~a -sP
# Auto-generated entry point script.
import sys
import asyncio
from xandikos.__main__ import main
if __name__ == '__main__':
    sys.exit(asyncio.run(main(sys.argv[1:])))~%" interpreter)))
                (chmod file-path #o755))))
          (add-before 'check 'check-setup
            (lambda _
              (setenv "XANDIKOSPATH" (mkdtemp "/tmp/xandikospath-XXXXXX")))))))