Skip to content

Commit

Permalink
Adds v package
Browse files Browse the repository at this point in the history
It doesn't work - complains right now about something that "should not happen"
during the self-compilation stage. I'm not sure whether I broke something with
my cc patching or choose an inopportune commit or what.
  • Loading branch information
ryanprior committed May 18, 2020
1 parent f4bc47a commit 1e70089
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
5 changes: 1 addition & 4 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,10 @@ Emacs integration for importmagic

- Issue tracker :: https://issues.guix.gnu.org/41366





** Testing
- [[testing/harvey.scm][Harvey]] checks a given set of colors for WCAG contrast compliance.
- [[testing/hugo.scm][Hugo]] is a fast static site generator.
- [[testing/mkcert.scm][mkcert]] creates TLS certificates for local testing and manage them using a CA.
- [[testing/proton.scm][protonvpn-cli]] is a command-line clinet for ProtonVPN.
- [[testing/ecere.scm][Ecere]] is an SDK with GUI, 2D/3D graphics, networking, and an IDE
- [[testing/v.scm][v]] is a compiler for the v programming language
64 changes: 64 additions & 0 deletions testing/v.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ryan Prior <[email protected]>

(define-module (testing v)
#:use-module (gnu packages c)
#:use-module (gnu packages glib)
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))

(define-public v
(package
(name "v")
(version "0.1.27")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/vlang/v.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1d9qhacllvkqif42jaayixhjyhx7pzslh8p1yr5p19447q763fq1"))))
(build-system gnu-build-system)
(arguments
'(#:make-flags (list "TMPVC=vc/"
"VERBOSE=1")
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(let ((vc-in (string-append (assoc-ref inputs "vc") "/v.c"))
(vc "vc/v.c"))
(setenv "CC" (which "tcc"))
(mkdir-p "vc/")
(copy-file vc-in vc)
(substitute* vc
(("tos_lit\\(\"cc\"\\)") "tos_lit(\"gcc\")"))
#t)))
(add-before 'build 'patch-makefile
(lambda _
(substitute* "Makefile"
(("latest_(tcc|vc)") ""))
#t)))))
(native-inputs
`(("tcc" ,tcc)
("glib" ,glib)
("vc" ,(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/vlang/vc.git")
(commit "c3c337aa3ab2f9279f2a97ba759f8fa4da8f70c6")))
(file-name (git-file-name "vc" "c3c337aa3ab2f9279f2a97ba759f8fa4da8f70c6"))
(sha256
(base32 "07318idrfkxfxf6zw5qsshx7ljd8gbvfic61mr3zrgsrd7hwwx4n"))))))
(home-page "https://vlang.io/")
(synopsis "Compiler for the V programming language")
(description
"V is a systems programming language. It provides memory safety and thread
safety guarantees with minimal abstraction.")
(license license:expat)))

v

0 comments on commit 1e70089

Please sign in to comment.