From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: [PATCH] gnu: Add sicp. Date: Fri, 20 May 2016 00:06:49 +0200 Message-ID: <87lh358zye.fsf@drakenvlieg.flower> References: <87d1onafmy.fsf@drakenvlieg.flower> <87eg90wgj1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3W65-0000SC-Sb for guix-devel@gnu.org; Thu, 19 May 2016 18:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3W61-00056b-Az for guix-devel@gnu.org; Thu, 19 May 2016 18:07:12 -0400 In-Reply-To: <87eg90wgj1.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 17 May 2016 22:55:46 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: Hi Ludovic > What about putting it in (gnu packages scheme) instead? Sounds like a > natural home. Sure. >> + (version "2016-02-20") > Could you change the =E2=80=98version=E2=80=99 field according to the con= ventions > described at (info "(guix) Version Numbers")? Since there=E2=80=99s no r= elease > number, it=E2=80=99s OK to use =E2=80=9C20160220=E2=80=9D (no hyphens) be= fore the rest of the > version field. OK. >> + (arguments >> + `(#:modules ((guix build utils) >> + (srfi srfi-1) >> + (srfi srfi-26)) >> + #:builder > > #:builder should be aligned with #:modules. Sure, missed this. Edited by hand for now. =20=20 I've been fighting with this (i.e.: manually changing Emacs' indentation, something that feels just so wrong), and wondering about it. Isn't .dir-locals.el supposed to handle this automagically...what am I missing? I'm used to run indent-region on the whole file, but that often changes things in most files I ran it in. Also, for Guix I had to remove delete-trailing-whitespace from my before-save-variables, otherwise my patches try to delete lots of whitespace... >> + (let ((gzip (assoc-ref %build-inputs "gzip")) >> + (source (assoc-ref %build-inputs "source")) >> + (texinfo (assoc-ref %build-inputs "texinfo")) >> + (info-dir (string-append %output "/share/info"))) >> + (use-modules (guix build utils) >> + (srfi srfi-1) >> + (srfi srfi-26)) > > Please move =E2=80=98use-modules=E2=80=99 to the top: > > (begin > (use-modules (srfi =E2=80=A6) =E2=80=A6) > > (let (=E2=80=A6) =E2=80=A6)) OK. >> + (and >> + (system* "makeinfo" >> + "--output" (string-append info-dir "/sicp.= info") >> + (string-append source "/sicp-pocket.texi")) > > (zero? (system* =E2=80=A6)) Yes, better. >> +It was first published in 1985 by MIT Press and written by Massachusetts >> +Institute of Technology (MIT) professors Harold Abelson and Gerald Jay >> +Sussman, with Julie Sussman.") > > I would remove the last paragraph. Done. > Thanks for filling this gap! :-) :-) Greetings, Jan --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-sicp.patch Content-Transfer-Encoding: quoted-printable >From 44bcbdb30f6789d4bc460aa84dca27321c074cba Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 19 May 2016 23:50:09 +0200 Subject: [PATCH] gnu: Add sicp. * gnu/packages/scheme.scm (sicp): New variable. --- gnu/packages/scheme.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 6cf75c2..3539659 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2015 Federico Beffa ;;; Copyright =C2=A9 2016 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,8 +26,10 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (gnu packages m4) #:use-module (gnu packages multiprecision) #:use-module (gnu packages databases) @@ -34,6 +37,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages texlive) #:use-module (gnu packages base) + #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) #:use-module (gnu packages avahi) #:use-module (gnu packages libphidget) @@ -714,3 +718,54 @@ procedures, embedded in the programming language Schem= e, and intended to support teaching and research in mathematical physics and electrical engineering.") (license gpl2+)))) + +(define-public sicp + (package + (name "sicp") + (version "20160220-1.5b52db56") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sarabander/sicp") + (commit "5b52db566968d28a89fbbaf338d207f01cc81cac"))) + (sha256 + (base32 + "10h6h7szwlfbshwh18bnl2hvyddj5i7106l79s145l0sjjv15cxb")))) + (build-system trivial-build-system) + (native-inputs `(("gzip" ,gzip) + ("source" ,source) + ("texinfo" ,texinfo))) + (arguments + `(#:modules ((guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:builder + (begin + (use-modules (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + (let ((gzip (assoc-ref %build-inputs "gzip")) + (source (assoc-ref %build-inputs "source")) + (texinfo (assoc-ref %build-inputs "texinfo")) + (info-dir (string-append %output "/share/info"))) + (setenv "PATH" (string-append gzip "/bin" + ":" texinfo "/bin")) + (mkdir-p info-dir) + (and + (zero? + (system* "makeinfo" + "--output" (string-append info-dir "/sicp.info") + (string-append source "/sicp-pocket.texi"))) + (every zero? (map + (cut system* "gzip" <>) + (find-files info-dir)))))))) + (home-page "http://sarabander.github.io/sicp") + (synopsis "Structure and Interpretation of Computer Programs") + (description "Structure and Interpretation of Computer Programs (SICP)= is +a textbook aiming to teach the principles of computer programming. + +Using Scheme, a dialect of the Lisp programming language, the book explains +core computer science concepts such as abstraction in programming, +metalinguistic abstraction, recursion, interpreters, and modular programmi= ng.") + (license cc-by-sa4.0))) --=20 2.7.3 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--