summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guix/packages.scm112
1 files changed, 57 insertions, 55 deletions
diff --git a/src/guix/packages.scm b/src/guix/packages.scm
index 2fd97bd..4e38fb7 100644
--- a/src/guix/packages.scm
+++ b/src/guix/packages.scm
@@ -40,61 +40,63 @@
textual-ports:get-string-all)))
(define (go-package name inputs)
- (package
- (name name)
- (version (slurp (string-append "src/versions/" name "/version")))
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "https://papo.im/git/"
- name
- "/snapshot/"
- name
- "-"
- version
- ".tar.xz"))
- (sha256
- (base32 (slurp (string-append "src/versions/" name "/sha256"))))))
- (build-system gnu-build-system)
- (arguments
- (list
- #:strip-binaries? #f
- #:make-flags
- #~(list
- (string-append "PREFIX=" #$output)
- (string-append "CC=" #$(cc-for-target)))
- #:phases
- #~(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'setenv-golang
- (lambda _
- (define (path->flags option)
- (let ((search-path (getenv "GOLIBPACKPATH")))
- (string-join
- (map (lambda (path)
- (string-append option " " path))
- (if search-path
- (string-split search-path #\:)
- '()))
- " ")))
- (setenv "GOCFLAGS" (path->flags "-I"))
- (setenv "GOLDFLAGS" (path->flags "-L")))))))
- (native-inputs
- (append
- (format-inputs
- (list queue:go-full))
- inputs))
- (native-search-paths
- (list
- (search-path-specification
- (variable "GOLIBPACKPATH")
- (files
- (list "lib/go")))))
- (synopsis #f) ;; FIXME: get
- (description #f) ;; from
- (home-page #f) ;; tarball!
- (license licenses:agpl3+)))
+ (let ((version (slurp (string-append "src/versions/" name "/version"))))
+ (package
+ (name name)
+ (version version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://papo.im/git/"
+ name
+ "/snapshot/"
+ name
+ "-"
+ version
+ ".tar.xz"))
+ (sha256
+ (base32 (slurp (string-append "src/versions/" name "/sha256"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:strip-binaries? #f
+ #:make-flags
+ #~(list
+ (string-append "PREFIX=" #$output)
+ (string-append "VERSION=" #$version)
+ (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'setenv-golang
+ (lambda _
+ (define (path->flags option)
+ (let ((search-path (getenv "GOLIBPACKPATH")))
+ (string-join
+ (map (lambda (path)
+ (string-append option " " path))
+ (if search-path
+ (string-split search-path #\:)
+ '()))
+ " ")))
+ (setenv "GOCFLAGS" (path->flags "-I"))
+ (setenv "GOLDFLAGS" (path->flags "-L")))))))
+ (native-inputs
+ (append
+ (format-inputs
+ (list queue:go-full))
+ inputs))
+ (native-search-paths
+ (list
+ (search-path-specification
+ (variable "GOLIBPACKPATH")
+ (files
+ (list "lib/go")))))
+ (synopsis #f) ;; FIXME: get
+ (description #f) ;; from
+ (home-page #f) ;; tarball!
+ (license licenses:agpl3+))))
(define gobang (go-package "gobang" '()))