@@ -7431,13 +7431,27 @@ and @code{ioutil} packages that is easy to test.")
(url "https://github.com/godbus/dbus")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Disable tests which require a system D-Bus instance.
+ (substitute* "conn_test.go"
+ (("func TestSystemBus")
+ "func DisabledTestSystemBus")
+ (("func TestConnectSystemBus")
+ "func DisabledTestConnectSystemBus"))))
(sha256
(base32
"0znax8kskb5gmp5fj75w56bc9p7b22wrdswzlh4d04sprlc471yi"))))
(build-system go-build-system)
(arguments
- `(#:tests? #f ;no /var/run/dbus/system_bus_socket
- #:import-path "github.com/godbus/dbus"))
+ `(#:import-path "github.com/godbus/dbus"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (invoke "dbus-run-session" "--" "go" "test" import-path)))))))
(native-inputs
`(("dbus" ,dbus))) ;dbus-launch
(home-page "https://github.com/godbus/dbus/")