.
This commit is contained in:
parent
747f34bd98
commit
54fea37c23
3 changed files with 724 additions and 6 deletions
81
zilti/packages/chicken-template.scm
Normal file
81
zilti/packages/chicken-template.scm
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
;; -*- geiser-scheme-implementation: guile; mode: scheme; -*-
|
||||||
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
|
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
|
||||||
|
;;; Copyright © 2020 Evan Hanson <evhan@foldling.org>
|
||||||
|
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
|
||||||
|
;;; Copyright © 2024 Daniel Ziltener <dziltener@lyrion.ch>
|
||||||
|
;;;
|
||||||
|
;;; 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 (zilti packages chicken)
|
||||||
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (zilti build-system chicken)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix svn-download)
|
||||||
|
#:use-module (gnu packages commencement)
|
||||||
|
#:use-module (gnu packages chicken)
|
||||||
|
#:use-module ((guix licenses)
|
||||||
|
#:prefix license:))
|
||||||
|
|
||||||
|
(define-public chicken
|
||||||
|
(package
|
||||||
|
(name "chicken")
|
||||||
|
(version "5.3.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://code.call-cc.org/releases/"
|
||||||
|
version "/chicken-" version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0xhdvcdwlv9vbhxh7k0fzd32ybhc7fn83y9fj48dhzp1z7c9kbf3"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:modules ((guix build gnu-build-system)
|
||||||
|
(guix build utils)
|
||||||
|
(srfi srfi-1))
|
||||||
|
|
||||||
|
;; No `configure' script; run "make check" after "make install" as
|
||||||
|
;; prescribed by README.
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'check)
|
||||||
|
(add-after 'install 'check
|
||||||
|
(assoc-ref %standard-phases 'check)))
|
||||||
|
|
||||||
|
#:make-flags (let ((out (assoc-ref %outputs "out")))
|
||||||
|
(list "PLATFORM=linux"
|
||||||
|
(string-append "PREFIX=" out)
|
||||||
|
(string-append "VARDIR=" out "/var/lib")))
|
||||||
|
|
||||||
|
;; Parallel builds are not supported, as noted in README.
|
||||||
|
#:parallel-build? #f))
|
||||||
|
(native-search-paths
|
||||||
|
(list (search-path-specification
|
||||||
|
(variable "CHICKEN_REPOSITORY_PATH")
|
||||||
|
;; TODO extract binary version into a module level definition.
|
||||||
|
(files (list "var/lib/chicken/11")))))
|
||||||
|
(propagated-inputs (list gcc-toolchain))
|
||||||
|
(home-page "https://www.call-cc.org/")
|
||||||
|
(synopsis "R5RS Scheme implementation that compiles native code via C")
|
||||||
|
(description
|
||||||
|
"CHICKEN is a compiler for the Scheme programming language. CHICKEN
|
||||||
|
produces portable and efficient C, supports almost all of the R5RS Scheme
|
||||||
|
language standard, and includes many enhancements and extensions.")
|
||||||
|
(license license:bsd-3)))
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,8 @@
|
||||||
;; -*- geiser-scheme-implementation: chicken; mode: scheme; -*-
|
;; -*- geiser-scheme-implementation: chicken; mode: scheme; -*-
|
||||||
|
|
||||||
(import (rss)
|
(import (rss)
|
||||||
|
(chicken file)
|
||||||
|
(chicken format)
|
||||||
(chicken io)
|
(chicken io)
|
||||||
(chicken port)
|
(chicken port)
|
||||||
(chicken pretty-print)
|
(chicken pretty-print)
|
||||||
|
@ -46,16 +48,18 @@
|
||||||
(define egg-blacklist
|
(define egg-blacklist
|
||||||
'(("procedural-macros" . #f)))
|
'(("procedural-macros" . #f)))
|
||||||
|
|
||||||
|
(define egg-replacement-procs
|
||||||
|
`(("")))
|
||||||
|
|
||||||
(define (process-egg? eggrec)
|
(define (process-egg? eggrec)
|
||||||
(alist-ref (egg-name eggrec) egg-blacklist
|
(alist-ref (egg-name eggrec) egg-blacklist
|
||||||
string=? #t))
|
string=? #t))
|
||||||
|
|
||||||
(define dependency-blacklist
|
(define dependency-blacklist
|
||||||
'(("srfi-4" . #f)))
|
'((srfi-4 . #f)))
|
||||||
|
|
||||||
(define (keep-dependency? str)
|
(define (keep-dependency? str)
|
||||||
(alist-ref str dependency-blacklist
|
(alist-ref str dependency-blacklist eqv? #t))
|
||||||
string=? #t))
|
|
||||||
|
|
||||||
(define (rss-feed-item->title+version+desc feed-item)
|
(define (rss-feed-item->title+version+desc feed-item)
|
||||||
(let ((chunks (string-split (rss:item-title feed-item)))
|
(let ((chunks (string-split (rss:item-title feed-item)))
|
||||||
|
@ -89,6 +93,20 @@
|
||||||
|
|
||||||
(define-record egg name version description checksum dependencies test-dependencies build-dependencies foreign-dependencies license)
|
(define-record egg name version description checksum dependencies test-dependencies build-dependencies foreign-dependencies license)
|
||||||
|
|
||||||
|
(set-record-printer!
|
||||||
|
egg
|
||||||
|
(lambda (x out)
|
||||||
|
(fprintf out "#,(egg ~S ~S ~S ~S ~S ~S ~S ~S ~S)"
|
||||||
|
(egg-name x)
|
||||||
|
(egg-version x)
|
||||||
|
(egg-description x)
|
||||||
|
(egg-checksum x)
|
||||||
|
(egg-dependencies x)
|
||||||
|
(egg-test-dependencies x)
|
||||||
|
(egg-build-dependencies x)
|
||||||
|
(egg-foreign-dependencies x)
|
||||||
|
(egg-license x))))
|
||||||
|
|
||||||
(define (parse-rss)
|
(define (parse-rss)
|
||||||
(let
|
(let
|
||||||
((eggrecs (map rss-feed-item->title+version+desc
|
((eggrecs (map rss-feed-item->title+version+desc
|
||||||
|
@ -107,6 +125,8 @@
|
||||||
(define (generate-guix-package eggrec)
|
(define (generate-guix-package eggrec)
|
||||||
(when (process-egg? eggrec)
|
(when (process-egg? eggrec)
|
||||||
(print "Generating " (egg-name eggrec) " version " (egg-version eggrec))
|
(print "Generating " (egg-name eggrec) " version " (egg-version eggrec))
|
||||||
|
(print eggrec)
|
||||||
|
(print " ")
|
||||||
(with-output-to-file "chicken.scm"
|
(with-output-to-file "chicken.scm"
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(pretty-print
|
(pretty-print
|
||||||
|
@ -137,8 +157,10 @@
|
||||||
(home-page ,(string-append
|
(home-page ,(string-append
|
||||||
"https://wiki.call-cc.org/eggref/5/" (egg-name eggrec)))
|
"https://wiki.call-cc.org/eggref/5/" (egg-name eggrec)))
|
||||||
(description ,(egg-description eggrec))
|
(description ,(egg-description eggrec))
|
||||||
(license ,(egg-license eggrec))))))
|
(license ,(egg-license eggrec)))))
|
||||||
|
(display "\n"))
|
||||||
#:text #:append)))
|
#:text #:append)))
|
||||||
|
|
||||||
(define (main #!optional args)
|
(define (main #!optional args)
|
||||||
|
(copy-file "chicken-template.scm" "chicken.scm" #t)
|
||||||
(map generate-guix-package (parse-rss)))
|
(map generate-guix-package (parse-rss)))
|
||||||
|
|
Loading…
Reference in a new issue