aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 (unmatched parenthesis <paren@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages vlang)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages node)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages xorg)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix packages))

(define-public vlang
  (package
   (name "vlang")
   (version "0.2.4")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/vlang/v")
           (commit version)))
     (file-name (git-file-name name version))
     (sha256
      (base32 "17wmjxssmg6kd4j8i6pgib452zzwvkyi3n1znd1jj3xkf2l92fw8"))))
   (build-system gnu-build-system)
   (arguments
    `(#:make-flags
      (list (string-append "CC=" ,(cc-for-target))
            "TMPTCC=tcc"
            (string-append "VC=" (assoc-ref %build-inputs "vc"))
            "GITCLEANPULL=true"
            "GITFASTCLONE=mkdir -p"
            "TCCREPO="
            "VCREPO="
            (string-append "VFLAGS=-cc " ,(cc-for-target))
            "VERBOSE=1")
      #:phases
      (modify-phases %standard-phases
        (delete 'configure)
        (add-before 'build 'change-home
          (lambda _
            (setenv "HOME" "/tmp")
            #t))
        (add-before 'build 'patch-makefile
          (lambda _
            (substitute* "Makefile"
              (("--branch thirdparty-unknown-unknown") "")
              (("rm -rf") "true"))
            #t))
        (add-before 'check 'delete-failing-tests
          ;; XXX As always, these should eventually be fixed and run.
          (lambda _
            (for-each delete-file
                      '("vlib/os/notify/notify_test.v"
                        "vlib/v/doc/doc_private_fn_test.v"
                        "vlib/v/live/live_test.v"
                        "vlib/v/tests/repl/repl_test.v"
                        "vlib/v/tests/valgrind/valgrind_test.v"))
            #t))
        (replace 'check
          (lambda* (#:key tests? #:allow-other-keys)
            (let* ((bin "tmp/bin")
                   (gcc (which "gcc")))
              (when tests?
                (mkdir-p bin)
                (symlink gcc (string-append bin "/cc"))
                (setenv "PATH" (string-append bin ":" (getenv "PATH")))
                (invoke "./v" "test-self")))
            #t))
        (replace 'install
          (lambda* (#:key outputs #:allow-other-keys)
            (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
                   (docs (string-append bin "/cmd/v/help"))
                   (tools (string-append bin "/cmd/tools"))
                   (thirdparty (string-append bin "/thirdparty"))
                   (vlib (string-append bin "/vlib"))
                   (vmod (string-append bin "/v.mod")))
              (mkdir-p bin)
              (copy-file "./v" (string-append bin "/v"))
              ;; v requires as of 0.2.4 that these other components are in the
              ;; same directory. In a future release we may be able to move
              ;; these into other output folders.
              (copy-recursively "cmd/tools" tools)
              (copy-recursively "cmd/v/help" docs)
              (copy-recursively "thirdparty" thirdparty)
              (copy-recursively "vlib" vlib)
              (copy-file "v.mod" vmod))
            #t)))))
   (inputs
    (list glib))
   (native-inputs
    `(("vc"
       ;; Versions are not consistently tagged, but the matching commit will
       ;; probably have ‘v0.x.y’ in the commit message.
       ,(let ((vc-version "5e876c1491db50b136499d3397b57b7c062040e5"))
          ;; v bootstraps from generated c source code from a dedicated
          ;; repository. It's readable, as generated source goes, and not at all
          ;; obfuscated, and it's about 15kb. The original source written in
          ;; golang is lost to the forces of entropy; modifying the generated c
          ;; source by hand has been a commonly used technique for iterating on
          ;; the codebase.
          (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/vlang/vc")
                  (commit vc-version)))
            (file-name (git-file-name "vc" vc-version))
            (sha256
             (base32 "1gxdkgc7aqw5f0fhch1n6nhzgzvgb49p77idx1zj7wcp53lpx5ng")))))
      ("git" ,git-minimal)
      ;; For the tests.
      ("libx11" ,libx11)
      ("node" ,node-lts)
      ("openssl" ,openssl)
      ("sqlite" ,sqlite)))
   (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)))
11gnu: tinyproxy: Update to 1.11.2. [security fixes]...This fixes CVE-2022-40468. * gnu/packages/web.scm (tinyproxy): Update to 1.11.2. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Nicolas Graves 2024-10-04gnu: miniflux: Update to 2.2.1....* gnu/packages/web.scm (miniflux): Update to 2.2.1. Change-Id: Id7628dde9d07c040a0878aeeda39244ef54d5fe0 Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn> Rodion Goritskov 2024-09-07gnu: Add libdatachannel....* gnu/packages/web.scm (libdatachannel): New variable. Change-Id: Idc8996eec5160574649575a5519c6510baf194a5 Signed-off-by: Andrew Tropin <andrew@trop.in> 宋文武 2024-09-07gnu: Add libjuice....* gnu/packages/web.scm (libjuice): New variable. Change-Id: I5ad910e687cc20d356800e5c4ac02d5158f122f3 Signed-off-by: Andrew Tropin <andrew@trop.in> 宋文武 2024-08-31gnu: nginx-accept-language-module: Add libxcrypt dependency....* gnu/packages/web.scm (nginx-accept-language-module)[inputs]: Add libxcrypt. Change-Id: I7f9102b0b93566fea5992c1a4fec305ad8f3db1f 宋文武 2024-08-31gnu: hiawatha: Add libxcrypt dependency....* gnu/packages/web.scm (hiawatha)[inputs]: Add libxcrypt. Change-Id: Ie5cfed636bd8fa4e39aaf90e764539477d4e5f43 宋文武 2024-08-31gnu: nginx: Add libxcrypt dependency....* gnu/packages/web.scm (nginx)[inputs]: Add libxcrypt. Change-Id: Ifd6e6a4c0d9d18c2c47355e9f0625641dfb9dbc5 宋文武 2024-08-31gnu: httpd: Add libxcrypt dependency....* gnu/packages/web.scm (httpd): Add libxcrypt dependency. Change-Id: I8ef010b0c37bae90493f2f19dd25987c32fd687e Josselin Poiret 2024-08-31gnu: liboauth: Use C unicode locale in tests....* gnu/packages/web.scm (liboauth): Use C unicode locale in tests. Change-Id: I1ff7da64912fbba5ae427f77b912dd9dff4e239a Josselin Poiret 2024-08-31gnu: httpd: Rewrite using G-Expressions....* gnu/packages/web.scm (httpd): Rewrite using G-Expressions. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Bruno Victal 2024-08-31gnu: web: Add 'bash' input for 'wrap-program'....It is required for cross-compilation. * gnu/packages/web.scm (krona-tools)[inputs]: Add 'bash-minimal'. (guix-data-service)[inputs]: Likewise. (ikiwiki): Delete trailing #t. [inputs]: Likewise. (hiawatha)[inputs]: Likewise. (hpcguix-web)[inputs]: Likewise. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I3fa7dbf05a72bc41a089ba62160dbe1fb82ec7e1 Maxime Devos 2024-08-31build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-mod......Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee Maxim Cournoyer 2024-08-29gnu: uriparser: Fix cross-compilation....* gnu/packages/web.scm (uriparser)[arguments]: When cross-compilation, Set -DURIPARSER_BUILD_TESTS=OFF. Change-Id: I003fbc37e82ed308998490b7bbba2aad6a0b7f55 Zheng Junjie 2024-08-29gnu: uriparser: Update to 0.9.8....* gnu/packages/web.scm (uriparser): Update to 0.9.8. [source]: Switch to git-fetch. Change-Id: I12ed35eebd9719aac83e5838cdec6e81529763ae Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn> Artyom V. Poptsov 2024-08-28gnu: nghttp3: Update to 1.5.0....* gnu/packages/web.scm (nghttp3): Update to 1.5.0. Change-Id: Ic43e41bf5335267c9a669425e37b62ff369e466b Signed-off-by: Ludovic Courtès <ludo@gnu.org> Tomas Volf 2024-08-26gnu: castor: Update to 0.9.0....* gnu/packages/web.scm (castor): Update to 0.9.0. [arguments]<#:phases>: Relax Cargo version requirements. <#:cargo-inputs>: Update rust-dirs to 3, rust-linkify to 0.7, and rust-textwrap to 0.14. Change-Id: I3508e35ab45315d394cb714e7ab3f7c508f2de14 Nicolas Goaziou 2024-08-26gnu: gmid: Update to 2.1.1....* gnu/packages/web.scm (gmid): Update to 2.1.1. Change-Id: I0b63f02de1d04dd987663f34f863b5da50867042 Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> cage 2024-08-18gnu: nginx-documentation: Update to 1.27.1-3114-051789a80bcb....* gnu/packages/web.scm (nginx-documentation): Update to 1.27.1-3114-051789a80bcb. Change-Id: I20c01eb56ecae391f011b6e818d7bc41ee28f195 Tobias Geerinckx-Rice 2024-08-18gnu: nginx: Update to 1.27.1 [fixes CVE-2024-7347]....* gnu/packages/web.scm (nginx): Update to 1.27.1. Change-Id: Ie7aeca1299427d1e35a779c40c99a04e4facfab8 Tobias Geerinckx-Rice 2024-08-22gnu: miniflux: Update to 2.2.0....* gnu/packages/web.scm (miniflux): Update to 2.2.0. Change-Id: Id4408bb63c9b6523348071ebec730a23000f4438 Signed-off-by: John Kehayias <john.kehayias@protonmail.com> Rodion Goritskov 2024-08-22gnu: guix-data-service: Update to 0.0.1-54.a204bda....* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-54.a204bda. Change-Id: Ifc46f60ae9f0493c1eab08de806c4e107a866b69 Christopher Baines 2024-08-22Merge remote-tracking branch 'origin/go-team'...Change-Id: Ie1a29192d144a59394bbacba3f6b9f110413e821 Sharlatan Hellseher 2024-08-14gnu: go-github-com-mikefarah-yq-v4: Update to 4.44.3....* gnu/packages/web.scm (go-github-com-mikefarah-yq-v4): Update to 4.44.3. [propagated-inputs]: Add go-github-com-alecthomas-repr, go-github-com-pkg-diff, go-github-com-spf13-pflag, and go-github-com-yuin-gopher-lua. Change-Id: Ic44ec552a3dc7fa045384c6537207e8e464dcb53 Sharlatan Hellseher 2024-08-14gnu: go-github-com-itchyny-gojq: Update to 0.12.16....* gnu/packages/web.scm (go-github-com-itchyny-gojq): Update to 0.12.16. Change-Id: I6f7cf1038adb392ce1b7510f01923689e5993eca Sharlatan Hellseher 2024-08-14gnu: go-github-com-itchyny-timefmt-go: Move to golang-xyz....* gnu/packages/web.scm (go-github-com-itchyny-timefmt-go): Move from here ... * gnu/packages/golang-xyz.scm: ... to here. Change-Id: Ifaca740ff1d46a74c7059fdeb8d56ba69195428e Sharlatan Hellseher 2024-08-14gnu: go-github-com-itchyny-timefmt-go: Update to 0.1.6....* gnu/packages/web.scm (go-github-com-itchyny-timefmt-go): Update to 0.1.6. Change-Id: Idf5477c28309c75bb4c99ff93a65a3867f4581ae Sharlatan Hellseher 2024-08-14gnu: go-github-com-itchyny-gojq: Fix indentation....* gnu/packages/web.scm (go-github-com-itchyny-gojq): Fix indentation. [inputs]: Place after [arguments]. Change-Id: Ic397ffe4ff641a50738d3a4dacef411136bc2d6b Sharlatan Hellseher 2024-08-11gnu: kiln: Update to 0.4.1....* gnu/packages/web.scm (kiln): Update to 0.4.1. Change-Id: I921259904527ec5144ccd32874f09c9cdb5d8ec2 Sharlatan Hellseher 2024-08-11gnu: ikiwiki: Update to 3.20200202.4....* gnu/packages/web.scm (ikiwiki): Update to 3.20200202.4. Signed-off-by: Christopher Baines <mail@cbaines.net> AwesomeAdam54321 2024-08-14gnu: guix-data-service: Update to 0.0.1-53.eeda1bf....* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-53.eeda1bf. Change-Id: I3bcf6e527228451d3e53024eea31369c92b90fa4 Christopher Baines 2024-08-08Merge remote-tracking branch 'origin/go-team'...Change-Id: Ib66e48c4cb84e9e97ebcec334ab0b9f3dbfb1457 Sharlatan Hellseher 2024-08-05Change email of Evgeny Pisemsky....* .mailmap: Add entry to Evgeny Pisemsky. * gnu/packages/emacs-xyz.scm, gnu/packages/engineering.scm, gnu/packages/guile-xyz.scm, gnu/packages/hardware.scm, gnu/packages/perl.scm, gnu/packages/python-xyz.scm, gnu/packages/sdl.scm, gnu/packages/web.scm: Adjust copyright line. Change-Id: I9a10be1ee7cc164f18d826b51348ee26eee2ca4b Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Evgeny Pisemsky 2024-07-25gnu: go-github-com-prometheus-client-golang: Move to prometheus....* gnu/packages/golang.scm (go-github-com-prometheus-client-golang): Move from here ... * gnu/packages/prometheus.scm: ... to here. * gnu/packages/backup.scm: Add (gnu packages prometheus) module. * gnu/packages/golang-xyz.scm: Likewise. * gnu/packages/ipfs.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/web.scm: Likewise. Change-Id: If3d78d31b1491f8a95616e59f50371c2914242d9 Sharlatan Hellseher 2024-07-25gnu: go-github-com-google-go-cmp-cmp: Rename variable....* gnu/packages/golang.scm (go-github-com-google-go-cmp-cmp): Rename variable to go-github-com-google-go-cmp, which reflects go.mod import path and improves importer performance. (go-github-com-zclconf-go-cty, go-golang-org-x-vuln, go-google-golang-org-protobuf, go-gotest-tools-assert, go-gotest-tools-internal-source, go-gotest-tools-internal-format, gofumpt, gopls, gotestsum): Swap go-github-com-google-go-cmp-cmp to go-github-com-google-go-cmp in inputs, propagated-inputs or native-inputs. * gnu/packages/golang-check.scm (go-github-com-frankban-quicktest, go-github-com-google-go-cmdtest): Likewise. * gnu/packages/golang-web.scm (go-github-com-aws-aws-sdk-go-v2, go-github-com-aws-aws-sdk-go-v2-config, go-github-com-aws-smithy-go, go-github-com-go-jose-go-jose-v3, go-github-com-makeworld-the-better-one-go-gemini, go-golang-org-x-oauth2, go-gopkg-in-square-go-jose-v2): Likewise. * gnu/packages/golang-xyz.scm (go-github-com-goccy-go-yaml): Likewise. * gnu/packages/check.scm (actionlint): Likewise. * gnu/packages/databases.scm (sqls): Likewise. * gnu/packages/ipfs.scm (go-github-com-ipld-go-ipld-prime, go-github-com-whyrusleeping-cbor-gen): Likewise. * gnu/packages/web.scm (go-github-com-itchyny-gojq): Likewise. Change-Id: Ie6eeba936f7da404d70fbbaad34f5b43aec4e05b Sharlatan Hellseher 2024-07-19gnu: monolith: Update to 2.8.1....* gnu/packages/web.scm (monolith): Update to 2.8.1. [cargo-inputs]: Replace rust-base64-0.13 with 0.21, rust-cssparser-0.29 with 0.33. Change-Id: I15e3c378ed2c35b313009ca1e66d239c1982b0d5 Efraim Flashner