mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Add sicp.
* gnu/packages/scheme.scm (sicp): New variable. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
a56be436d0
commit
b9b447be64
1 changed files with 55 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
||||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
|
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -25,8 +26,10 @@ (define-module (gnu packages scheme)
|
||||||
#:use-module (guix licenses)
|
#:use-module (guix licenses)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
#:use-module (gnu packages m4)
|
#:use-module (gnu packages m4)
|
||||||
#:use-module (gnu packages multiprecision)
|
#:use-module (gnu packages multiprecision)
|
||||||
#:use-module (gnu packages databases)
|
#:use-module (gnu packages databases)
|
||||||
|
@ -34,6 +37,7 @@ (define-module (gnu packages scheme)
|
||||||
#:use-module (gnu packages texinfo)
|
#:use-module (gnu packages texinfo)
|
||||||
#:use-module (gnu packages texlive)
|
#:use-module (gnu packages texlive)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages avahi)
|
#:use-module (gnu packages avahi)
|
||||||
#:use-module (gnu packages libphidget)
|
#:use-module (gnu packages libphidget)
|
||||||
|
@ -714,3 +718,54 @@ (define* (copy-files-to-directory files dir
|
||||||
support teaching and research in mathematical physics and electrical
|
support teaching and research in mathematical physics and electrical
|
||||||
engineering.")
|
engineering.")
|
||||||
(license gpl2+))))
|
(license gpl2+))))
|
||||||
|
|
||||||
|
(define-public sicp
|
||||||
|
(let ((commit "5b52db566968d28a89fbbaf338d207f01cc81cac"))
|
||||||
|
(package
|
||||||
|
(name "sicp")
|
||||||
|
(version (string-append "20160220-1." (string-take commit 7)))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/sarabander/sicp")
|
||||||
|
(commit commit)))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"10h6h7szwlfbshwh18bnl2hvyddj5i7106l79s145l0sjjv15cxb"))
|
||||||
|
(file-name (string-append name "-" version "-checkout"))))
|
||||||
|
(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" "-9n" <>)
|
||||||
|
(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 programming.")
|
||||||
|
(license cc-by-sa4.0))))
|
||||||
|
|
Loading…
Reference in a new issue