aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Scherer <roman@burningswell.com>2025-04-21 12:37:34 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-04-21 15:27:24 +0100
commitbca0016e9b785bba3947a9e9ec5aa88c289ec521 (patch)
tree1a56abc6c03f32f74bb3ee2cfeaa8ff8e37b8a47
parent6adfb380871e06ea464bce42778380e8617851b8 (diff)
downloadguix-bca0016e9b785bba3947a9e9ec5aa88c289ec521.tar.gz
guix-bca0016e9b785bba3947a9e9ec5aa88c289ec521.zip
gnu: kitty: Fix build.
* gnu/packages/terminals.scm (kitty) [phases]{build}: Add extra CFLAGS to prevent build to fail on deprecation warning. {check}: Ignore some failing tests. Change-Id: I4324526936c2a104b3c2f85f75344f54813c089a Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/terminals.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 3931811024..682af3dcf8 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -43,6 +43,7 @@
;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
;;; Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2025 Roman Scherer <roman@burningswell.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1338,6 +1339,8 @@ tmux.")
(delete 'configure) ;no configure script
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
+ ;; Don't fail on deprecation warnings from GCC
+ (setenv "CFLAGS" "-Wno-error=deprecated-declarations")
;; The "kitty" sub-directory must be writable prior to
;; configuration (e.g., un-setting updates).
(for-each make-file-writable (find-files "kitty"))
@@ -1355,6 +1358,31 @@ tmux.")
;; tests.
(setenv "PATH" (string-append "linux-package/bin:"
(getenv "PATH")))
+ ;; Don't fail on deprecation warnings from Python
+ (substitute* "test.py"
+ (("'error'") "'ignore'"))
+ ;; Fails: No writable cache directories
+ (substitute* "kitty_tests/fonts.py"
+ ((" def test_box_drawing")
+ (string-append
+ " @unittest.skip('No writable cache directories')\n"
+ " def test_box_drawing")))
+ ;; Fails: Permission denied
+ (substitute* "kitty_tests/parser.py"
+ (("import time")
+ "import time\nimport unittest\n")
+ ((" def test_graphics_command")
+ (string-append
+ " @unittest.skip('Permission denied')\n"
+ " def test_graphics_command")))
+ ;; TypeError: expected bytes, str found
+ (substitute* "kitty_tests/tui.py"
+ (("from . import BaseTest")
+ "from . import BaseTest\nimport unittest\n")
+ ((" def test_multiprocessing_spawn")
+ (string-append
+ " @unittest.skip('TypeError: expected bytes, str found')\n"
+ " def test_multiprocessing_spawn")))
(invoke "python3" "test.py"))))
(add-before 'install 'rm-pycache
;; created python cache __pycache__ are non deterministic