From patchwork Fri Sep 1 15:16:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 53366 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 53A5227BBE9; Fri, 1 Sep 2023 16:17:09 +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_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 0A1C627BBE2 for ; Fri, 1 Sep 2023 16:17:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc5tK-0001gJ-CS; Fri, 01 Sep 2023 11:16:58 -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 1qc5tG-0001f6-Ih for guix-patches@gnu.org; Fri, 01 Sep 2023 11:16:56 -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 1qc5tE-0006oL-QH for guix-patches@gnu.org; Fri, 01 Sep 2023 11:16:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qc5tN-0005lV-PS for guix-patches@gnu.org; Fri, 01 Sep 2023 11:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65669] [PATCH] gnu: Add book-sparc. Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Sep 2023 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65669 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Artyom V. Poptsov" Cc: 65669@debbugs.gnu.org Received: via spool by 65669-submit@debbugs.gnu.org id=B65669.169358140722137 (code B ref 65669); Fri, 01 Sep 2023 15:17:01 +0000 Received: (at 65669) by debbugs.gnu.org; 1 Sep 2023 15:16:47 +0000 Received: from localhost ([127.0.0.1]:33667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc5t8-0005ky-NY for submit@debbugs.gnu.org; Fri, 01 Sep 2023 11:16:47 -0400 Received: from layka.disroot.org ([178.21.23.139]:50442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc5t6-0005ko-1K for 65669@debbugs.gnu.org; Fri, 01 Sep 2023 11:16:45 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 86A0640D45; Fri, 1 Sep 2023 17:16:33 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id esxi69MCcSY9; Fri, 1 Sep 2023 17:16:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1693581392; bh=78HrbtURzA2Rgt94jmHWRk8IC7xkwHtObPTOSf9j2sM=; h=Date:Subject:To:References:Cc:From:In-Reply-To; b=NrLB6LNcZFbNjsdspD634lmc/GCqXOgOissr9bU8PmOr5hqbq6UR6xOEXYQ/bOpsB PyPBylSUJ+OswdGwqUh2mt3AuU20wpQIr6V/u00VQo2dG/76mgivXYDHz/6rxJNzyV qQgLvaEycNZ/b5YLdmDJbclx4h5Zn+Hcbz4ZoELiqR+SAHMiMSMGok6mHynHFtF172 ZuSvEs626G7Qwcu6Wx2bkGpmCOzlrl9i52GY2QmL7+DfxDkucjzBh/ubyKFdFfLPRd 9/AnizuRkIS3j5SJR4BjPo+g6DTXAMLRmdPKv1puAS3mt5UjWvaJ7wQIwfrHBK5F4h BC079i7nnDbIQ== Message-ID: <633c262b-a490-f232-18cb-795735489ac2@disroot.org> Date: Fri, 1 Sep 2023 23:16:27 +0800 MIME-Version: 1.0 References: <87v8cumual.fsf@gmail.com> Content-Language: en-US In-Reply-To: <87v8cumual.fsf@gmail.com> 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: , Reply-to: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches X-Patchwork-Original-From: Adam Faiz via Guix-patches via From: Adam Faiz 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 Hi Artyom, On 9/1/23 11:44, Artyom V. Poptsov wrote: > 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. Cool, thanks for sharing your book! > 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.)I think books are accepted in Guix, it's just that there weren't any packaged until now. > 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. Right, I deleted the file in the package snippet, but it would be better to delete it in the future. I attached an improved patch, that has other changes in the snippet that you might also want to add to your repository. > 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 5967c109c2b224b4aaf7e8480816814c421c01b3 Mon Sep 17 00:00:00 2001 Message-ID: <5967c109c2b224b4aaf7e8480816814c421c01b3.1693581197.git.adam.faiz@disroot.org> From: "Artyom V. Poptsov" Date: Thu, 31 Aug 2023 20:11:29 +0300 Subject: [PATCH v1] gnu: books: Add book-sparc. * gnu/packages/books.scm: New module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add 'books.scm'. Co-authored-by: Adam Faiz --- gnu/local.mk | 1 + gnu/packages/books.scm | 120 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 gnu/packages/books.scm diff --git a/gnu/local.mk b/gnu/local.mk index 1773ef6f61..0720bcfdd3 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..97a7e3b45c --- /dev/null +++ b/gnu/packages/books.scm @@ -0,0 +1,120 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Artyom V. Poptsov +;;; Copyright © 2023 Adam Faiz +;;; +;;; 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 gnu) + #: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)) + (modules '((guix build utils))) + (snippet + #~(begin + (delete-file "sparc.pdf") + (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-bibtex + texlive-bibtexperllibs + texlive-bigfoot + texlive-circuitikz + texlive-collection-langcyrillic + texlive-fontspec + texlive-glossaries + 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))) base-commit: 4e531e55dcdc99c83bcfe3eec67c3fd95c7b6ca7 -- 2.41.0