aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2023 Adam Faiz <adam.faiz@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 books)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages fonts)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages inkscape)
  #:use-module (gnu packages music)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages tex)
  #:use-module (gnu packages texlive)
  #:use-module (gnu packages version-control))

(define-public book-sparc
  (package
    (name "book-sparc")
    (version "2.1.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/artyom-poptsov/SPARC")
                    (commit (string-append "v" version))))
              (sha256
               (base32
                "1ns2vs5yb9z1hj9gq5y55qz7c9azzhr866b665s8fq50q5m4yhbc"))
              (file-name (git-file-name name version))
              (modules '((guix build utils)))
              (snippet
               #~(begin
                   (substitute* "version.tex.in"
                     (("@COMMIT@") ""))
                   (substitute* "Makefile"
                     (("all: sparc.pdf") "all: install")
                     (("^sparc.pdf:") "install:")
                     (("(cp out/sparc.pdf) sparc.pdf" all cp)
                      (string-append
                       "mkdir -p $(DESTDIR)$(PREFIX)/share/doc/book-sparc"
                       " && " cp
                       " $(DESTDIR)$(PREFIX)/share/doc/book-sparc/sparc.pdf")))))))
    (build-system gnu-build-system)
    (native-inputs
     (list bash-minimal
           fontconfig
           inkscape
           lilypond
           perl
           python-pygments
           which))
    (inputs
     (list font-liberation
           texlive-acronym
           texlive-adjustbox
           texlive-biblatex
           texlive-bibtex
           texlive-bibtexperllibs
           texlive-bigfoot
           texlive-chngcntr
           texlive-circuitikz
           texlive-collection-langcyrillic
           texlive-fontspec
           texlive-glossaries
           texlive-glossaries-english
           texlive-glossaries-extra
           texlive-koma-script
           texlive-lilyglyphs
           texlive-minted
           texlive-multirow
           texlive-pgf
           texlive-pgfplots
           texlive-subfiles
           texlive-svg
           texlive-t1utils
           texlive-textpos
           texlive-transparent
           texlive-trimspaces
           texlive-xetex))
    (arguments
     (list #:phases
           #~(modify-phases %standard-phases
               (delete 'check)
               (delete 'configure)
               (add-before 'build 'set-envs
                 (lambda _
                   (setenv "REPRODUCIBILITY" "yes")
                   (setenv "PREFIX" #$output))))))
    (home-page "https://github.com/artyom-poptsov/SPARC")
    (synopsis "Book on combining art and technology")
    (description
     "Science, Programming, Art and Radioelectronics Club (SPARC) is a book that
explains how to combine the topics mentined in the title to build projects.  The
book can be used to teach programming classes in colleges and to organize
workshops in hackerspaces or other community-driven spaces.  Currently the book
is available only in Russian.")
    (license license:cc-by-sa4.0)))
cc-12-aarch64-micro-architectures, %gcc-12-armhf-micro-architectures, %gcc-12-x86_64-micro-architectures, %gcc-13-aarch64-micro-architectures, %gcc-13-armhf-micro-architectures, %gcc-13-x86_64-micro-architectures): New variables. (gcc-12)[properties]: Use new compiler-cpu-architectures. * guix/cpu.scm (cpu->gcc-architecture): Update entries for Intel, AMD, x86_64 fallback and aarch64. Efraim Flashner 2023-05-09gnu: gcc-12: Update to 12.3.0....* gnu/packages/gcc.scm (gcc-12): Update to 12.3.0. Efraim Flashner 2023-05-07Revert "gnu: gcc-11: Adapt patching for hurd to not use gexp's."...This reverts commit 08acdd0765b5f4fbfafa699a823ea7985d4d35a7. This change is now unnecessary now that gcc-boot0 uses gexps (a795a02a9d988be5a762886620f7bb6a95e7ffdb). * gnu/packages/gcc.scm (gcc-11)[arguments]: Use gexp for modify-phases. [native-inputs]: Remove. * gnu/packages/commencement.scm (gcc-boot0)[native-inputs]: Remove. Christopher Baines 2023-05-07gnu: Use gexps for gcc-boot0 and related packages....There are currently problems with native or cross building for i586-gnu, and one factor mixed up with this is that some of the gcc packages use sexp's for the phases, and thus introducing gexp's has caused problems. As part of the going in circles with this, this commit switches gcc-boot0 to use gexp's in it's arguments, and then also modifies libstdc++-boot0, libstdc++-boot0-gcc7, cross-gcc-wrapper, gcc-final and make-libstdc++ to handle this change. If done correctly, this change shouldn't affect any derivations. * gnu/packages/commencement.scm (libstdc++-boot0, libstdc++-boot0-gcc7, gcc-boot0, gcc-final)[arguments]: Use gexps. (cross-gcc-wrapper): Use gexps in the generated package. * gnu/packages/gcc.scm (make-libstdc++): Use gexps in the generated package. Christopher Baines 2023-05-05gnu: gcc-11: Fix patch-hurd-libpthread phase....It didn't work when it was introduced in 08acdd0765b5f4fbfafa699a823ea7985d4d35a7. * gnu/packages/gcc.scm (gcc-11)[arguments]: Remove the procedure arguments, and use %build-inputs rather than inputs. * gnu/packages/commencement.scm (gcc-boot0)[native-inputs]: Add hurd-patch, as this package inherits from gcc-11. Christopher Baines 2023-05-04gnu: gcc-11: Adapt patching for hurd to not use gexp's....As this causes issues with gcc-cross-boot0, since it doesn't use gexp's and that means the builder script ends up broken. I'm not testing this properly, I've only confirmed that with this change, you can generate a derivation for hello for i586-gnu where that derivation and all inputs don't have broken builder scripts. Plus the output for hello on x86_64-linux is unchanged. * gnu/packages/gcc.scm (gcc-11)[arguments]: Rewrite to not use gexps. [native-inputs]: Add a patch for the hurd if that's the target. Christopher Baines 2023-04-25gnu: gcc: Do not build gcov on MinGW....* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Disable gcov when targetting mingw. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Vivien Kraus 2023-04-18gnu: gcc-7, gcc-10, gcc-11: Hide packages....* gnu/packages/gcc.scm (gcc-7, gcc-10, gcc-11): Also inherit 'hidden?' properties. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Simon Tournier 2023-04-14gnu: gcc-11: Fix build on powerpc64le....* gnu/packages/patches/gcc-11-libstdc++-powerpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gcc.scm (make-libstdc++): Apply patch for gcc versions >= 11 and < 12 on ppc64le. Co-authored-by: Christopher Baines <mail@cbaines.net> Signed-off-by: Christopher Baines <mail@cbaines.net> Andreas Enge 2023-04-14Revert "gnu: gcc-11: Fix build on powerpc64le."...This reverts commit 9900f9e9b86550e7d336b04ad46fba088e28cbd6. Andreas Enge 2023-04-13gnu: gcc-11: Fix build on powerpc64le....* gnu/packages/patches/gcc-11-libstdc++-powerpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gcc.scm (make-libstdc++): Apply patch for gcc versions >= 11 and < 12 on ppc64le. Co-authored-by: Christopher Baines <mail@cbaines.net> Andreas Enge 2023-03-30gnu: gcc@11: Patch libpthread on GNU/Hurd....* gnu/packages/gcc.scm (gcc-11)[arguments]: Add 'patch-hurd-libpthread' phase. * gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Josselin Poiret 2023-03-09gnu: libstdc++: Fix cross-compilation....* gnu/packages/gcc.scm (make-libstdc++): Adjust 'hide-gcc-headers' for cross-compiled libstdc++. Ludovic Courtès 2023-03-03gnu: gcc@4.9, gcc@5.5: Build with '-std=c++11'....These two compilers would fail to build with GCC 11.3.0 because it defaults to C++17, which triggers some incompatibilities. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Augment #:configure-flags for 4.9 and 5.0. (gcc-4.9)[arguments]: Define 'parent' so that (package-arguments parent) correctly evaluates the version-dependent parts. Ludovic Courtès 2023-03-02Merge remote-tracking branch 'savannah/master' into core-updates...Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm Christopher Baines