gnu: go-github-com-mitchellh-go-homedir: Enable tests.
authorEfraim Flashner <efraim@flashner.co.il>
Mon, 25 May 2020 18:18:17 +0000 (21:18 +0300)
committerEfraim Flashner <efraim@flashner.co.il>
Tue, 26 May 2020 06:54:35 +0000 (09:54 +0300)
* gnu/packages/golang.scm (go-github-com-mitchellh-go-homedir)
[arguments]: Enable tests. Add custom phase to set HOME environment
variable.

gnu/packages/golang.scm

index fa62a9a..44481ed 100644 (file)
@@ -2356,9 +2356,13 @@ statistics for wrapped connections.")
          "0ydzkipf28hwj2bfxqmwlww47khyk6d152xax4bnyh60f4lq3nx1"))))
     (build-system go-build-system)
     (arguments
-     (quote (#:import-path "github.com/mitchellh/go-homedir"
-             ;; TODO: Tests fail because it tries to access home.
-             #:tests? #f)))
+     `(#:import-path "github.com/mitchellh/go-homedir"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-home-directory
+           (lambda _
+             (setenv "HOME" "/")
+             #t)))))
     (home-page "https://github.com/mitchellh/go-homedir")
     (synopsis "Go library for detecting and expanding the user's home directory without cgo")
     (description "This is a Go library for detecting the user's home