Subject: [PATCH 11/28] gnu: Add go-github-com-cli-safeexec.

From: Xinglu Chen <[email-masked]>
Date: Thu, 01 Apr 2021 10:02:29 +0200

* gnu/packages/golang.scm (go-github-com-cli-safeexec): New variable.
---
This is only used on Windows, but is needed by the 'gh' package so it is
marked as hidden.

 gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a2c203dafa..9265083978 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7290,3 +7290,28 @@ files in the system default web browser.")
 application flow in Go client apps.")
     (license license:expat)))
 
+;; Needed by the 'gh' GitHub CLI tool
+(define-public go-github-com-cli-safeexec
+  (hidden-package
+   (package
+     (name "go-github-com-cli-safeexec")
+     (version "1.0.0")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/cli/safeexec.git")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1q80va3721dyw33lrnv7x3gd66kcnbsm38dv3lk7xqhii2adawmk"))))
+     (build-system go-build-system)
+     (arguments
+      '(#:import-path "github.com/cli/safeexec"))
+     (home-page "https://github.com/cli/safeexec")
+     (synopsis "Safer alternative to exec.LookPath() on Windows")
+     (description "This library provides a safer alternative to
+@code{exec.LookPath()} on Windows.")
+     (license license:bsd-2))))
+
-- 
2.31.1