gnu: flightgear: Use G-expressions.

This fixes the build by removing broken usage of %outputs.

* gnu/packages/games.scm (flightgear)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2022-02-27 01:00:01 +01:00
parent 7620dacc8b
commit 3a72ee1046
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -9178,39 +9178,39 @@ (define-public flightgear
#t)))) #t))))
(build-system qt-build-system) (build-system qt-build-system)
(arguments (arguments
`(#:configure-flags (list #:configure-flags
(list "-DSYSTEM_SQLITE=ON" #~(list "-DSYSTEM_SQLITE=ON"
"-DSYSTEM_CPPUNIT=ON" "-DSYSTEM_CPPUNIT=ON"
(string-append "-DFG_DATA_DIR=" (string-append "-DFG_DATA_DIR=" #$output "/share/flightgear"))
(assoc-ref %outputs "out") ;; TODO: test suite segfaults.
"/share/flightgear")) #:tests? #f
;; TODO: test suite segfaults. #:phases
#:tests? #f #~(modify-phases %standard-phases
#:phases (add-after 'unpack 'skip-some-tests
(modify-phases %standard-phases (lambda _
(add-after 'unpack 'skip-some-tests (substitute*
(lambda _ "test_suite/unit_tests/Instrumentation/test_gps.hxx"
(substitute* "test_suite/unit_tests/Instrumentation/test_gps.hxx" (("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
(("CPPUNIT_TEST\\(testLongLegWestbound\\);" all) (string-append "// " all))
(string-append "// " all)) (("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
(("CPPUNIT_TEST\\(testFinalLegCourse\\);" all) (string-append "// " all)))))
(string-append "// " all))))) (add-after 'build 'build-test-suite
(add-after 'build 'build-test-suite (lambda* args
(lambda* args ((assoc-ref %standard-phases 'build)
((assoc-ref %standard-phases 'build) #:make-flags (list "fgfs_test_suite"))))
#:make-flags (list "fgfs_test_suite")))) ;; Test suite needs access to FGData so run it after 'install.
;; Test suite needs access to FGData so run it after 'install. (delete 'check)
(delete 'check) (add-after 'install-data 'check
(add-after 'install-data 'check (assoc-ref %standard-phases 'check))
(assoc-ref %standard-phases 'check)) (add-after 'install 'install-data
(add-after 'install 'install-data (lambda _
(lambda* (#:key inputs outputs #:allow-other-keys) (let ((share (string-append #$output "/share/flightgear")))
(let ((share (string-append (assoc-ref outputs "out") "/share/flightgear"))) (mkdir-p share)
(mkdir-p share) (with-directory-excursion share
(with-directory-excursion share (invoke "tar" "xf"
(invoke "tar" "xf" (assoc-ref inputs "flightgear-data") #$(this-package-native-input "flightgear-data")
"--strip-components=1"))) "--strip-components=1")))
#t))))) #t)))))
(inputs (inputs
(list boost (list boost
dbus dbus