diff mbox series

[bug#35627] Add golang-importer

Message ID 87lfzhjx1s.fsf@disroot.org
State Accepted
Headers show
Series [bug#35627] Add golang-importer | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Amar M. Singh May 8, 2019, 6:10 a.m. UTC
Hi. I've attached some patches for a golang importer

To use:
1. (load "golang.scm")
2. (define gopkg (make-go-package go-name*))
3. (package-sexp gopkg)
;; go-name looks like "golang.org/auth/pkg"

;; TODO
1. reliant on github urls
2. extract license
3. Recursive?

Suggestions welcome

Thanks,
Amar

Comments

Maxim Cournoyer Aug. 6, 2021, 3:40 a.m. UTC | #1
Hello Amar,

nly <nly@disroot.org> writes:

> Hi. I've attached some patches for a golang importer
>
> To use:
> 1. (load "golang.scm")
> 2. (define gopkg (make-go-package go-name*))
> 3. (package-sexp gopkg)
> ;; go-name looks like "golang.org/auth/pkg"
>
> ;; TODO
> 1. reliant on github urls
> 2. extract license
> 3. Recursive?
>
> Suggestions welcome
>
> Thanks,
> Amar

Thank you for your efforts.  Perhaps others have built on it, as we now
have a relatively featureful Go importer in Guix, as you probably saw!

Closing,

Maxim
diff mbox series

Patch

From 05b03042d1bd20969ff8d352372e3a9e58977276 Mon Sep 17 00:00:00 2001
From: Amar Singh <nly@disroot.org>
Date: Thu, 2 May 2019 19:52:51 +0530
Subject: [PATCH 10/10] Bootstrap: don't use (gnu packages golang)

---
 guix/import/golang.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/import/golang.scm b/guix/import/golang.scm
index 3eb74d4984..b51d496602 100644
--- a/guix/import/golang.scm
+++ b/guix/import/golang.scm
@@ -26,10 +26,11 @@ 
  (guix download)       ;; download-to-store
  ((guix import utils) #:prefix utils:)   ;; hash
  (guix packages)       ;; packages
+ ((guix licenses) #:prefix license:) ;; licenses
  (guix build-system)   ;; build-system printer
  (guix build-system go)  ;; go-build-system
  (guix store)          ;; with-store
- (gnu packages golang) ;; inherit (simple) go package
+ ;; (gnu packages golang) ;; inherit (simple) go package
  (ice-9 textual-ports) ;; to parse readme.md
  (ice-9 popen) ;; open-input-ouput-pipe
  (web uri) ;; uri->string
@@ -153,7 +154,8 @@ 
   (let* ((version (latest-release go-name))
          (sha256 (go-name->sha256 go-name version))
          (readme-string (go-name->readme-string go-name)))
-    (package (inherit go-github-com-alsm-ioprogress)
+    (package
+      ;; (inherit go-github-com-alsm-ioprogress)
       (name
        (string-append "go-" go-name))
       (version version)
@@ -173,6 +175,7 @@ 
       (synopsis (go-name->synopsis go-name))
       (description (go-name->description go-name))
       ;; TODO: license
+      (license license:expat)
       )))
 
 (define (filter-newlines string)
-- 
2.21.0