aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; 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 bison)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages m4)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages flex)
  #:use-module (srfi srfi-1))

(define-public bison
  (package
    (name "bison")
    (version "3.8.2")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://gnu/bison/bison-"
                          version ".tar.xz"))
      (sha256
       (base32
        "1wjvbbzrr16k1jlby3l436an3kvv492h08arbnf0gwgprha05flv"))))
    (build-system gnu-build-system)
    (arguments
     '(;; Building in parallel on many-core systems may cause an error such as
       ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
       ;; directory".  See <https://bugs.gnu.org/36238>.
       #:parallel-build? #f
       ;; Similarly, when building tests in parallel, Make may produce this error:
       ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
       ;; or directory".  Full log in <https://bugs.gnu.org/36238>.
       #:parallel-tests? #f))
    (native-inputs (list perl
                         ;; m4 is not present in PATH when cross-building.
                         m4))
    (inputs (list flex))
    (propagated-inputs (list m4))
    (home-page "https://www.gnu.org/software/bison/")
    (synopsis "Yacc-compatible parser generator")
    (description
     "GNU Bison is a general-purpose parser generator.  It can build a
deterministic or generalized LR parser from an annotated, context-free
grammar.  It is versatile enough to have many applications, from parsers for
simple tools through complex programming languages.

Bison also provides an implementation of @command{yacc}, as specified by POSIX.")
    (license gpl3+)))

(define-public bison-3.0
  (package
    (inherit bison)
    (version "3.0.5")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://gnu/bison/bison-"
                          version ".tar.xz"))
      (sha256
       (base32
        "0f7kjygrckkx8vas2nm673592jif0a9mw5g8207f6hj6h4pfyp07"))))))
/packages/rust.scm (rust-1.74)[arguments]: When building for riscv64-linux delete 'revert-riscv-pause-instruction phase. Change-Id: I59120e8dae995fca52b192b07e265db20d9281e7 2024-02-20gnu: rust-bootstrap: Fix building on riscv64-linux.Efraim Flashner * gnu/packages/rust-bootstrap.scm [properties]: Increase timeout to 36 hours. [inputs]: When building for riscv64 add clang-13. [arguments]: When building for riscv64 start the build using clang and then switch to gcc later. Change-Id: I661934ff6862e5c8d826dd637ceeaf316b877c23 2024-02-20gnu: rust-1.72: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.72)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: If8e6b5c4d0c29d2ee2fdfe58fa7d4d2c1585740e 2024-02-20gnu: rust-1.71: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.71)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: I1661ebd9071b3dba92e0f871fad9ed5bcbef38ea 2024-02-20gnu: rust-1.70: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.70)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: Ic9f57e00c8602cd400db65e5b2c2499e972bef17 2024-02-20gnu: rust-1.69: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.69)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: I541767f19740b954e8c0f631bd5e77743ae3fb14 2024-02-20gnu: rust-1.67: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.67)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: I3bfd30d541574daae6223066c57c2d311e436075 2024-02-20gnu: rust-1.64: Fix building on powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-1.64)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: Iaa1f1b0ac70b36b6ac8a46e6789ce14d057fde08 2024-02-20gnu: rust-bootstrap: Add support for powerpc64le-linux.Efraim Flashner * gnu/packages/rust.scm (rust-bootstrap)[inputs]: When building for powerpc64le-linux add clang-13. [arguments]: When building for powerpc64le-linux add a phase adjusting the llvm output. Adjust the 'configure phase to start the build with clang as the C/C++ compiler and switch to GCC after building rustc. Change-Id: Iad5c8b5bba03289595f18e242392aa7feb249888 2024-02-20gnu: rust: Use more system libraries.Efraim Flashner * gnu/packages/rust.scm (rust)[source]: Adjust inherited source to also unbundle curl, libffi, nghttp2 and zlib. [inputs]: Add libffi, nghttp2:lib, zlib. Change-Id: I97932b9afda507a4c655027df494a70cf8c11509 2024-02-20gnu: rust: Use %gcc-search-paths.Efraim Flashner * gnu/packages/rust.scm (rust-1.55)[native-search-paths]: Replace list with factorized %gcc-search-paths. Change-Id: I0052aa748d45b2302e86589e0e9bfe1ddc0c6aa3 2024-02-20gnu: rust-1.56: Adjust inherited package arguments.Efraim Flashner * gnu/packages/rust.scm (rust-1.56)[arguments]: Strip inherited validate-runpath flag from inherited arguments. Change-Id: Iccd742f722ae3013f2ab4eac2234ea923c7af95a 2024-02-20gnu: rust: Unbundle openssl.Efraim Flashner * gnu/packages/rust.scm (rust-bootstrap)[source]: In snippet also remove bundled openssl, jemalloc. (rust-1.55, rust-1.61, rust-1.69, rust-1.72, rust-1.73, rust-1.74) [source]: In snippet also remove bundled openssl. Change-Id: I6da91820942c36be17f106b426b82d8e068b751c 2024-02-20gnu: rust-bootstrap: Clean-up code.Efraim Flashner * gnu/packages/rust.scm (rust-bootstrap)[arguments]: Remove custom 'patch-reference-to-cc phase which didn't do any substitutions. Join two substitutions preventing downloading during the build. Remove unneeded variable in let statement. Change-Id: Iff0262bdff3cb1257afeb83f33c40c54db02dc64 2024-02-20gnu: mrustc: Update to 0.10.1.Efraim Flashner * gnu/packages/rust.scm (%mrustc-commit, %mrustc-source): Update. [snippet]: Adjust snippet to make sure to get all the '-g' flags. (rust-bootstrap)[arguments]: Remove substitution adjusting the number of parallel builds. Remove unneeded substitution. * gnu/packages/patches/rustc-1.54.0-src.patch: Refresh from upstream. Change-Id: I6f806ee89dcb8e95e8bd2d443328844079ee533e 2024-02-20gnu: make-rust-sysroot: Remove unneeded input.Efraim Flashner * gnu/packages/rust.scm (make-rust-sysroot/implementation)[inputs]: When building targeting mingw32 don't add libunwind. Change-Id: I4623bf3c034c488d7f836f64ea0d7924899ce6ad 2024-02-20gnu: rust-1.55: Build with fewer packages.Efraim Flashner * gnu/packages/rust.scm (rust-1.55)[inputs]: Remove libssh2, curl. [native-inputs]: Remove cmake-minimal, which. (rust)[inputs]: Add curl. Change-Id: Icf2355e0f84a50ea44bb057c6d6ccd89eead0191 2024-02-20gnu: rust-bootstrap: Build with fewer packages.Efraim Flashner Use more of the bundled libraries so we have fewer dependencies causing rebuilds in the future. * gnu/packages/rust.scm (rust-bootstrap)[inputs]: Remove curl. [native-inputs]: Remove bison, flex. Change-Id: Ibc743a48536e1474b9ef343962e27d8128e6a20f 2024-02-20gnu: rust: Update to 1.75.0.Efraim Flashner * gnu/packages/rust.scm (rust-1.75): New variable. (rust): Update to 1.75.0. [arguments]: Adjust substitutions in custom phases for changes in source code. Change-Id: I0065d09a297e227e58998455bb90d18304fd6729 2024-02-20gnu: rust-1.55: Build without jemalloc.Efraim Flashner * gnu/packages/rust.scm (rust-1.55)[arguments]: Remove references to jemalloc in custom 'configure phase and set rust to build without jemalloc. [inputs]: Remove jemalloc. Change-Id: I388688111c897b15feb6ccee3374219b82f64169 2024-02-20gnu: rust: Use platform-rust-target.Efraim Flashner * gnu/packages/rust.scm (nix-system->gnu-triplet-for-rust): Remove procedure. (rust-bootstrap)[arguments]: Adjust make-flags, custom 'install phase to use platform-rust-target. (rust-1.55)[arguments]: Adjust custom 'configure and 'install phases to use platform-rust-target. (make-rust-sysroot)[arguments]: Adjust custom 'configure phase to use platform-rust-target. Change-Id: I102d44231c1411ea14ca75170f4884304d11bee1 2024-02-20gnu: rust: Update to 1.74.1.Efraim Flashner * gnu/packages/rust.scm (rust-1.74): New variable. (rust): Inherit from rust-1.74. [arguments]: Don't inherit #:tests. Change-Id: I9724ccbc93bbfd4e1bdf1d6a20dfa7a4d0ea3a5e 2024-02-20gnu: rust: Move remove-uninstall-script to rust.Efraim Flashner * gnu/packages/rust.scm (rust)[arguments]: Add 'remove-uninstall-script phase. (make-rust-sysroot)[arguments]: Remove 'remove-uninstall-script phase. Change-Id: I45bcaaa89003693b490b914efbfa34236a8f4db6 2024-01-14gnu: Make intermediate packages public but hidden.Ludovic Courtès This makes those packages visible to (gnu ci), giving them first class in the eyes of Cuirass and similar tools, in turn ensuring substitutes are available (this was discovered by running ‘guix weather -c 10’). * gnu/packages/rust.scm (rust-bootstrap, rust-1.55) (rust-1.56, rust-1.57, rust-1.58, rust-1.59, rust-1.60) (rust-1.61, rust-1.62, rust-1.63, rust-1.64, rust-1.65) (rust-1.66, rust-1.67, rust-1.68, rust-1.69, rust-1.70) (rust-1.71, rust-1.72, rust-1.73): Make variable public and add ‘hidden?’ property. (rust): Remove ‘hidden?’ property. * gnu/packages/java.scm (java-hamcrest-parent-pom) (java-org-ow2-parent-pom-1.3, java-asm-bootstrap): Make variable public and add ‘hidden?’ property. * gnu/packages/ocaml.scm (dune-bootstrap) (ocaml4.09-dune-bootstrap, ocaml5.0-dune-bootstrap): Likewise. Change-Id: I32b0ea639a4f1c39466875acdbc9cbadf75c7668 2024-01-12packages: rust: Memoize make-rust-sysroot results.Christopher Baines To ensure that it just returns a single package record for some given arguments, as this helps to avoid poor performance of the store connection object cache. Performance with computing the cross derivations is important for the data service, as it's currently very slow to process revisions. * gnu/packages/rust.scm (make-rust-sysroot): Move code to make-rust-sysroot/implementation. (make-rust-sysroot/implementation): New variable. Change-Id: Ibb30c7398328c87c032bb8828635a34ada935167 2023-12-13gnu: rust-1.64: Don't make package public.Efraim Flashner * gnu/packages/rust.scm (rust-1.64): Use define, not define-public. Change-Id: I475e8b1028a716f1d04a4aea5da4d6e7ca2a87d7 2023-11-28gnu: rust: Add triplets for Windows.Efraim Flashner * gnu/packages/rust.scm (nix-system->gnu-triplet-for-rust): Add entries for i686-mingw and x86_64-mingw. Change-Id: I13615c1548d96863bc32620269d82975e4599c08 2023-11-28gnu: rust: Add triplet for the Hurd.Efraim Flashner * gnu/packages/rust.scm (nix-system->gnu-triplet-for-rust): Add entries for i586-pc, i686-pc. Change-Id: I0b7bdc3c0445430b5f4ea79d8e052b6ef276f11b 2023-11-28gnu: Add make-rust-sysroot.Efraim Flashner * gnu/packages/rust.scm (make-rust-sysroot): New procedure. Change-Id: I5ce4b7a3aab0a9e8d254159e2fbc6cf6b3442c32 2023-11-28gnu: rust: Allow using custom rust-src for rust-analyzer.Efraim Flashner * gnu/packages/rust.scm (rust)[arguments]: Rewrite 'wrap-rust-analyzer phase to allow using a custom RUST_SRC_PATH. Change-Id: Id811bc8d09c0f955ece9c9e6267a0ae96e61f105 2023-11-28gnu: rust-analyzer: Move to rust.scm.Efraim Flashner * gnu/packages/rust-apps.scm (rust-analyzer): Move ... * gnu/packages/rust.scm (rust-analyzer): ... to here. Change-Id: I24db3731370f6e798b919409a32abec4a115c913 2023-11-28gnu: Remove rust-src-1.64.Efraim Flashner * gnu/packages/rust.scm (rust-src-1.64): Remove variable. Change-Id: I88f7ebed18e478f3982cad3c8586cff64dada1bb 2023-11-28gnu: rust: Update to 1.73.0.Efraim Flashner * gnu/packages/rust.scm (rust): Update to 1.73.0. [arguments]: Add phase to skip some tests using cargo publish. Change-Id: I3b0539ce036805f606bfbc1a1bba98a95d4a22fe 2023-10-23gnu: Add rust-1.73.Herman Rimm * gnu/packages/rust.scm (rust-1.73): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I97ab62112cd9386427d3cf8f9f6e1700492966b1 2023-10-18gnu: Add rust-1.72.Efraim Flashner * gnu/packages/rust.scm (rust-1.72): New variable. 2023-10-18gnu: Add rust-1.71.Efraim Flashner * gnu/packages/rust.scm (rust-1.71): New variable. 2023-10-18gnu: rust: Fix test failures on some architectures.Efraim Flashner * gnu/packages/rust.scm (rust)[arguments]: Adjust custom phase 'patch-process-tests to enable tests to pass on all architectures. 2023-10-18gnu: rust: Wrap rust-analyzer with rust source.Efraim Flashner * gnu/packages/rust.scm (rust)[outputs]: Add rust-src output. [arguments]: Add a phase to install the rust sources and a phase to wrap the rust-analyzer binary with the path to the rust sources. 2023-10-18gnu: rust: Build more tools.Efraim Flashner * gnu/packages/rust.scm (rust)[outputs]: Rename 'rustfmt' output to 'tools'. [arguments]: Adjust 'build, 'check and 'install phases to also provide clippy and rust-analyzer. 2023-10-18gnu: rust: Update to 1.70.0.Efraim Flashner * gnu/packages/rust.scm (rust): Update to 1.70.0. [arguments]: Remove 'patch-cargo-env-shebang phase. Adjust custom phases 'disable-tests-requiring-git, disable-tests-requiring-mercurial, 'patch-command-uid-gid-test for changes in the source. Simplify custom phases 'disable-tests-broken-on-aarch64, 'patch-process-tests, 'patch-command-exec-tests, 'disable-interrupt-tests. 2023-10-18gnu: rust: Add make-ignore-test-list function.Fries A little helper function to make creating a list to ignore tests easier. * gnu/packages/rust.scm (make-ignore-test-list): New function. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> 2023-10-18gnu: Add rust-1.70.Fries * gnu/packages/rust.scm (rust-1.70): New variable. * gnu/packages/patches/rust-1.70-fix-rustix-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register file. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> 2023-10-18gnu: Add rust-1.69.Fries * gnu/packages/rust.scm (rust-1.69): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> 2023-09-16gnu: rust-1.55: Remove i586-gnu from supported-systems.Christopher Baines * gnu/packages/rust.scm (rust-1.55)[supported-systems]: Remove i586-gnu. 2023-09-09gnu: rust-analyzer: Fix build of version 2022-01-10.Distopico * gnu/packages/rust-apps.scm (rust-analyzer): Update dependency rust-notify-5-pre.13. This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned version of `rust-notify` (`rust-notify-5-pre.13`) to compile and rust >= 1.64. Signed-off-by: Ludovic Courtès <ludo@gnu.org>