mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
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
This commit is contained in:
parent
7bc6207a11
commit
43498d3ea1
1 changed files with 17 additions and 0 deletions
|
|
@ -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")))))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue