[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/34: gnu: Add go-github-com-mitchellh-go-homedir.
From: |
Pierre Neidhardt |
Subject: |
22/34: gnu: Add go-github-com-mitchellh-go-homedir. |
Date: |
Wed, 24 Oct 2018 06:28:52 -0400 (EDT) |
ambrevar pushed a commit to branch master
in repository guix.
commit 8cb912817363a87ae9d6e3ec858a3f7aa715a913
Author: Pierre Neidhardt <address@hidden>
Date: Wed Oct 24 11:56:01 2018 +0200
gnu: Add go-github-com-mitchellh-go-homedir.
* gnu/packages/golang.scm (go-github-com-mitchellh-go-homedir): New
variable.
---
gnu/packages/golang.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 29181ed..ad914d5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3005,3 +3005,42 @@ required by Go's standard Hash interface.")
(description "A connection wrapper for @command{go-libp2p} that provides
bandwidth
statistics for wrapped connections.")
(license license:expat))))
+
+(define-public go-github-com-mitchellh-go-homedir
+ (let ((commit "ae18d6b8b3205b561c79e8e5f69bff09736185f4")
+ (revision "0"))
+ (package
+ (name "go-github-com-mitchellh-go-homedir")
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mitchellh/go-homedir.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq"))))
+ (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)))
+ (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
+directory without the use of @command{cgo}, so the library can be used in
+cross-compilation environments.
+
+Usage is simple, just call homedir.Dir() to get the home directory for a user,
+and homedir.Expand() to expand the @command{~} in a path to the home
+directory.
+
+Why not just use @command{os/user}? The built-in @command{os/user} package
+requires cgo on Darwin systems. This means that any Go code that uses that
+package cannot cross compile. But 99% of the time the use for
address@hidden/user} is just to retrieve the home directory, which we can do for
+the current user without cgo. This library does that, enabling
+cross-compilation.")
+ (license license:expat))))
- 12/34: gnu: Add go-github-com-minio-sha256-simd., (continued)
- 12/34: gnu: Add go-github-com-minio-sha256-simd., Pierre Neidhardt, 2018/10/24
- 10/34: gnu: Add go-github-com-btcsuite-btclog., Pierre Neidhardt, 2018/10/24
- 09/34: gnu: Add go-github-com-davecgh-go-spew., Pierre Neidhardt, 2018/10/24
- 01/34: gnu: Move go-github-com-gogo-protobuf* from syncthing.scm to golang.scm, Pierre Neidhardt, 2018/10/24
- 19/34: gnu: Add go-github-com-libp2p-go-libp2p-peer., Pierre Neidhardt, 2018/10/24
- 11/34: gnu: Add go-github-com-btcsuite-btcd-btcec., Pierre Neidhardt, 2018/10/24
- 14/34: gnu: Add go-github-com-mr-tron-base58., Pierre Neidhardt, 2018/10/24
- 15/34: gnu: Add go-github-com-gxed-hashland-keccakpg., Pierre Neidhardt, 2018/10/24
- 18/34: gnu: Add go-github-com-multiformats-go-multihash., Pierre Neidhardt, 2018/10/24
- 17/34: gnu: Add go-github-com-spaolacci-murmur3., Pierre Neidhardt, 2018/10/24
- 22/34: gnu: Add go-github-com-mitchellh-go-homedir.,
Pierre Neidhardt <=
- 26/34: gnu: Add go-github-com-cheekybits-is., Pierre Neidhardt, 2018/10/24
- 31/34: gnu: Add go-github-com-whyrusleeping-stump., Pierre Neidhardt, 2018/10/24
- 33/34: gnu: Add go-github-com-ipfs-go-ipfs-api., Pierre Neidhardt, 2018/10/24
- 34/34: gnu: Add gx., Pierre Neidhardt, 2018/10/24
- 32/34: gnu: Add go-github-com-ipfs-go-ipfs-cmdkit-files., Pierre Neidhardt, 2018/10/24
- 16/34: gnu: Add go-github-com-minio-blake2b-simd., Pierre Neidhardt, 2018/10/24
- 24/34: gnu: Add go-github-com-multiformats-go-multiaddr-net., Pierre Neidhardt, 2018/10/24
- 20/34: gnu: Add go-github-com-libp2p-go-libp2p-protocol., Pierre Neidhardt, 2018/10/24
- 25/34: gnu: Add go-github-com-whyrusleeping-tar-utils., Pierre Neidhardt, 2018/10/24
- 21/34: gnu: Add go-github-com-libp2p-go-libp2p-metrics., Pierre Neidhardt, 2018/10/24