From patchwork Fri Sep 1 03:44:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 53358 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2285927BBEA; Fri, 1 Sep 2023 04:46:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B7EE227BBE2 for ; Fri, 1 Sep 2023 04:46:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbv6Z-0007aG-KB; Thu, 31 Aug 2023 23:45:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbv6Y-0007a1-9x for guix-patches@gnu.org; Thu, 31 Aug 2023 23:45:54 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbv6X-0000uO-UM for guix-patches@gnu.org; Thu, 31 Aug 2023 23:45:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbv6g-0007iC-Ek for guix-patches@gnu.org; Thu, 31 Aug 2023 23:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65669] [PATCH] gnu: Add book-sparc. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Sep 2023 03:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65669 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65669@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169353990629567 (code B ref -1); Fri, 01 Sep 2023 03:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Sep 2023 03:45:06 +0000 Received: from localhost ([127.0.0.1]:59577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbv5k-0007go-Q3 for submit@debbugs.gnu.org; Thu, 31 Aug 2023 23:45:05 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbv5g-0007fy-Ag for submit@debbugs.gnu.org; Thu, 31 Aug 2023 23:45:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbv5Q-0007QE-Eg for guix-patches@gnu.org; Thu, 31 Aug 2023 23:44:44 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbv5N-0000aj-H0 for guix-patches@gnu.org; Thu, 31 Aug 2023 23:44:44 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5009969be25so2616957e87.3 for ; Thu, 31 Aug 2023 20:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693539879; x=1694144679; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=vhnfQLaBtETABmoqu0yPdrSbwD+4ol0QO42Tonj8YBY=; b=nLDr+w9AXEQACC74Pv03Z2gp23qlwBnI5nntB8h6B/NOcI9x97Hia3f6k9PNy6Forn 4nq+pY8GpdPuJ0uPzedWh5JfQGDoMZRxiz7ejskWe0GOEk9sDulD7T51eGKgfC2ZxtP4 3uvKnrmIDnyZFkusykHoAXzFuVHw/bXRpiPr1O7QbX47gNIz6EUvzrV/kIiDWXDtWbl0 Ebvw4fDxO33LpLcJEvCHZl+dJv3jEt6V+5lqHwvRZjm2dzBTZKGc5SRLWXvG/AhVp2X1 MxS2BLb1MVjATTEd/KbqWT2kHih7+zCI3ZFimEpk3ZccNTCrYaCV6oqaJw2ANUibG7CF StYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693539879; x=1694144679; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vhnfQLaBtETABmoqu0yPdrSbwD+4ol0QO42Tonj8YBY=; b=YQwR2TtsasHUEHQhAwXbO4Uav8NwD31Vu29fgJt3AZfBuvxYlPvLcWMWIyog4Tskxc xNEreNZNkgPr1V65Z/NnM7D+w0pYvWKzQhyunE21LJ+hccSQqyKsrc7BJAV0cl9Zwjf1 L5cY/LyDCQLUK7kKZFLQOZIeVeT+T6WGKmq/+cLLKzdcziVONtbAZpdQdIqS5mFH7Nov pYo6dqh1LA1vO9VRayuCR6JN6opjwSzCDqThacIRjouUw1Hg8P6DMAgvofh1ZFNfkrOi B/opPHtZMk8sreJ03NS9mfvxk7apgi4Cih6NIm+W/+J9HAH+GV4oNE/5M4swNqNZ9gpI RFLQ== X-Gm-Message-State: AOJu0Yzis376lKpI0lcHBhcilZA69iCE0uAx+B8J7n7PuDA1tWKK4+4h hHGROe2O7y272IkP6alhenDNIWD0Skk= X-Google-Smtp-Source: AGHT+IG93VFA0Rmy/07TAIlBhLGfunkgfU4ViFHb8YzkwgZOLxzx5C8cb9xQ9WG9NFcv5JZa9o3oMg== X-Received: by 2002:a05:6512:2e9:b0:4fe:8c4:44fb with SMTP id m9-20020a05651202e900b004fe08c444fbmr642035lfq.38.1693539879355; Thu, 31 Aug 2023 20:44:39 -0700 (PDT) Received: from elephant ([5.3.217.147]) by smtp.gmail.com with ESMTPSA id t8-20020ac24c08000000b004fe1900e934sm507797lfq.147.2023.08.31.20.44.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 20:44:38 -0700 (PDT) From: "Artyom V. Poptsov" Date: Fri, 01 Sep 2023 06:44:34 +0300 Message-ID: <87v8cumual.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, this patch adds my CreativeCommons-licensed book "Science, Programming, Art and Radioelectronics Club (SPARC)"[1] that covers such topics as basic electronics, programming, music and game development on Arduino controllers. The book is available only in Russian for now. I thought that it is a neat idea to make a reproducible version of the book in Guix, so I did. Not sure if there's any book packaging policy here, but at least a saw "Free as in Freedom" packaged in Guix, so I decided to package mine book as well. I created a separate module named "books.scm" as I couldn't figure out a better place for the new package (and maybe there will be other books in Guix as well in the future.) And yes, the repository contains a PDF version of the book, but that's not the vibe of reproducibility, right? Maybe I'll remove the PDF version from the repository in the future. Many thanks to Nicolas Goaziou who helped[2] me with figuring out how to make to work the LaTeX black magic in GNU Guix, and for packaging so many LaTeX packages for GNU Guix. - avp References: 1. https://github.com/artyom-poptsov/SPARC 2. https://mail.gnu.org/archive/html/help-guix/2023-08/msg00075.html From 8bae40efa9dbb151a68e4c22698bc635cdf2e5ba Mon Sep 17 00:00:00 2001 Message-Id: <8bae40efa9dbb151a68e4c22698bc635cdf2e5ba.1693539611.git.poptsov.artyom@gmail.com> From: "Artyom V. Poptsov" Date: Thu, 31 Aug 2023 20:11:29 +0300 Subject: [PATCH] gnu: books: Add book-sparc. * gnu/packages/books.scm: New module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add 'books.scm'. --- gnu/local.mk | 1 + gnu/packages/books.scm | 119 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 gnu/packages/books.scm diff --git a/gnu/local.mk b/gnu/local.mk index 9b493df8d5..034a666074 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -153,6 +153,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/bioinformatics.scm \ %D%/packages/bittorrent.scm \ %D%/packages/bison.scm \ + %D%/packages/books.scm \ %D%/packages/boost.scm \ %D%/packages/bootloaders.scm \ %D%/packages/bootstrap.scm \ diff --git a/gnu/packages/books.scm b/gnu/packages/books.scm new file mode 100644 index 0000000000..7e0e2e069b --- /dev/null +++ b/gnu/packages/books.scm @@ -0,0 +1,119 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Artyom V. Poptsov +;;; +;;; 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 . + +(define-module (gnu packages books) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix build-system copy) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages music) + #:use-module (gnu packages inkscape) + #: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) + #:use-module (gnu packages fonts) + #:use-module (gnu packages fontutils)) + +(define-public book-sparc + (package + (name "book-sparc") + (version "1.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/artyom-poptsov/SPARC") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0dswwwkb3h88cl3mhiy79s8i7sa9lmw6fxaj782vxgif795lcpxs")) + (file-name (git-file-name name version)))) + (build-system copy-build-system) + (native-inputs (list python-pygments bash-minimal perl which fontconfig)) + (inputs (list font-liberation + git + gnu-make + inkscape + lilypond + texlive + texlive-fontspec + texlive-koma-script + texlive-trimspaces + texlive-acronym + texlive-adjustbox + texlive-bibtex + texlive-bibtexperllibs + texlive-bigfoot + texlive-circuitikz + texlive-collection-langcyrillic + texlive-glossaries + texlive-glossaries-extra + texlive-lilyglyphs + texlive-minted + texlive-multirow + texlive-pgf + texlive-pgfplots + texlive-subfiles + texlive-svg + texlive-t1utils + texlive-textpos + texlive-transparent + texlive-xetex)) + (arguments + (list #:install-plan #~'(("sparc.pdf" "share/doc/sparc/")) + #:phases #~(modify-phases %standard-phases + (delete 'check) + (delete 'configure) + (add-before 'install 'build + (lambda* (#:key inputs parallel-build? + #:allow-other-keys) + (use-modules (ice-9 regex) + (srfi srfi-1)) + (let* ((src (assoc-ref inputs "source")) + (rx (make-regexp + "/gnu/store/(.*)-book-sparc.*")) + (src-hash (match:substring (regexp-exec rx + src) 1)) + (random-seed (fold (lambda (ch prev) + (+ (char->integer ch) + prev)) 0 + (string->list src-hash)))) + (setenv "RANDOMSEED" + (number->string random-seed)) + (setenv "REPRODUCIBILITY" "yes")) + (invoke "make" "-j" + (if parallel-build? + (number->string (parallel-job-count)) + "1"))))))) + (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))) base-commit: e5ce59e2120d186730727b8fe5a8a4aeb276a82e prerequisite-patch-id: 74efcf51192ed8535c1b2d06b98acc271719facc -- 2.34.1