-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.scm
More file actions
63 lines (54 loc) · 2.35 KB
/
manifest.scm
File metadata and controls
63 lines (54 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(use-modules (guix packages)
(guix download)
(guix gexp)
(guix utils)
(guix licenses)
(gnu packages)
(gnu packages base)
(gnu packages compression)
(guix build-system trivial)
((gnu packages) #:select (specifications->manifest))
(ice-9 eval-string)
(system base compile))
(define-public go-1.26
(package
(name "go")
(version "1.26.0")
(source (origin
(method url-fetch)
(uri (string-append "https://go.dev/dl/go" version ".linux-amd64.tar.gz"))
(sha256 (base32 "0dc2z11cv46yx502xmm3qpgha2qqb5xynnsmq6ky1i5h1y5b1hda"))))
(build-system trivial-build-system) ; apenas extrai sem compilar
(inputs (list coreutils)) ; general require
(native-inputs (list coreutils tar gzip)) ; require by "build"
(outputs '("out"))
(arguments
'(#:builder
(begin
; set path with deps
(setenv "PATH" (string-append (assoc-ref %build-inputs "coreutils") "/bin:"
(assoc-ref %build-inputs "tar") "/bin:"
(assoc-ref %build-inputs "gzip") "/bin:"
(getenv "PATH")))
(define out (assoc-ref %outputs "out"))
(mkdir out) ; Criar diretório de saída
; extract tar.gz to out
(system* "tar" "xzf" (assoc-ref %build-inputs "source") "-C" out) ; Extração do Go
; go links
(let ((bin-dir (string-append out "/bin")))
(mkdir bin-dir)
(system* "ln" "-sf" (string-append out "/go/bin/go") (string-append bin-dir "/go"))
(system* "ln" "-sf" (string-append out "/go/bin/godoc") (string-append bin-dir "/godoc"))
(system* "ln" "-sf" (string-append out "/go/bin/gofmt") (string-append bin-dir "/gofmt"))))))
(synopsis "Go programming language")
(description "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.")
(home-page "https://go.dev/")
(license bsd-3)))
(packages->manifest
(list
(specification->package "bash")
(specification->package "grep")
(specification->package "git")
(specification->package "coreutils")
(specification->package "node@22")
go-1.26))