diff options
Diffstat (limited to 'gnu/packages/education.scm')
-rw-r--r-- | gnu/packages/education.scm | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 4f4de1a834..9573a397fd 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -101,10 +101,9 @@ (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) (setenv "CPATH" - (string-append (assoc-ref inputs "sdl-mixer") - "/include/SDL:" - (or (getenv "CPATH") ""))) - #t))))) + (string-append + (search-input-directory inputs "include/SDL") + ":" (or (getenv "CPATH") "")))))))) (inputs `(("gtk+" ,gtk+-2) ("librsvg" ,librsvg) @@ -157,8 +156,7 @@ of categories with some of the activities available in that category. (add-before 'check 'start-xorg-server (lambda* (#:key inputs #:allow-other-keys) ;; The test suite requires a running X server. - (system (string-append (assoc-ref inputs "xorg-server") - "/bin/Xvfb :1 &")) + (system "Xvfb :1 &") (setenv "DISPLAY" ":1") ;; The test suite wants to write to /homeless-shelter (setenv "HOME" (getcwd)) @@ -339,17 +337,16 @@ easy.") ;; Replace the sole minified file in the package. (with-directory-excursion (string-append share "/src") (delete-file "FileSaver.min.js") - (symlink (string-append (assoc-ref %build-inputs "js-filesaver") - "/share/javascript/FileSaver.min.js") + (symlink (search-input-file %build-inputs + "/share/javascript/FileSaver.min.js") "FileSaver.min.js")) ;; Create a "snap" executable. (let* ((bin (string-append out "/bin")) (script (string-append bin "/snap")) (snap (string-append share "/snap.html")) - (bash (string-append (assoc-ref %build-inputs "bash") - "/bin/sh")) - (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils") - "/bin/xdg-open"))) + (bash (search-input-file %build-inputs "/bin/sh")) + (xdg-open (search-input-file %build-inputs + "/bin/xdg-open"))) (mkdir-p bin) (call-with-output-file script (lambda (port) @@ -498,8 +495,7 @@ specialized device.") #t))) (add-after 'install 'create-executable (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((python (string-append (assoc-ref inputs "python") - "/bin/python")) + (let* ((python (search-input-file inputs "/bin/python")) (out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (executable (string-append bin "/childsplay"))) @@ -592,10 +588,9 @@ letters of the alphabet, spelling, eye-hand coordination, etc.") ;; Install the launcher. (let* ((bin (string-append out "/bin")) (script (string-append bin "/omnitux")) - (bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (python (string-append (assoc-ref %build-inputs "python") - "/bin/python2"))) + (bash (search-input-file %build-inputs "/bin/bash")) + (python (search-input-file %build-inputs + "/bin/python2"))) (mkdir-p bin) (with-output-to-file script (lambda () @@ -854,8 +849,8 @@ stored and user can review his performance in any time.") (string-prefix? "python-" label))) inputs))) (qtwebengineprocess - (string-append (assoc-ref inputs "qtwebengine") - "/lib/qt5/libexec/QtWebEngineProcess"))) + (search-input-file inputs + "lib/qt5/libexec/QtWebEngineProcess"))) ;; The program fails to find the QtWebEngineProcess program, so ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is ;; wrapped to avoid declaring Python libraries as propagated @@ -867,7 +862,7 @@ stored and user can review his performance in any time.") `("PATH" prefix (,(string-append (assoc-ref inputs "mpv") "/bin"))) - `("PYTHONPATH" = ,site-packages))) + `("GUIX_PYTHONPATH" = ,site-packages))) (find-files bin "."))) #t))))) (native-inputs @@ -925,8 +920,13 @@ endless. For example: (file-name (git-file-name name version)) (sha256 (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp")) - (patches - (search-patches "t4k-common-libpng16.patch")))) + (patches (search-patches "t4k-common-libpng16.patch")) + (modules '((guix build utils))) + (snippet + `(begin + (substitute* "src/t4k_common.h" + (("char wrapped_lines") "extern char wrapped_lines")) + #t)))) (build-system cmake-build-system) (arguments `(#:tests? #f ;FIXME: cannot find how to run tests @@ -934,9 +934,10 @@ endless. For example: (modify-phases %standard-phases (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) - (setenv "CPATH" (string-append (assoc-ref inputs "sdl") - "/include/SDL:" - (or (getenv "CPATH") ""))))) + (setenv "CPATH" + (string-append + (search-input-directory inputs "/include/SDL") + ":" (or (getenv "CPATH") ""))))) (add-after 'unpack 'fix-andika-font-path (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/t4k_sdl.c" @@ -975,6 +976,9 @@ TuxMath and TuxType.") ;; Unbundle fonts. (snippet `(begin + ;; Remove duplicate definition. + (substitute* "src/menu_lan.c" + (("lan_player_type.*MAX_CLIENTS\\];") "")) (for-each delete-file (find-files "data/fonts" "\\.ttf$")) #t)))) (build-system gnu-build-system) @@ -985,10 +989,10 @@ TuxMath and TuxType.") (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) (setenv "CPATH" - (string-append (assoc-ref inputs "sdl") - "/include/SDL:" - (or (getenv "CPATH") ""))) - #t)) + (string-append + (search-input-directory inputs "/include/SDL") + ":" + (or (getenv "CPATH") ""))))) (add-after 'install 'install-desktop-file (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) |