guix-kakafarm-channel

Kaka Farm's GNU Guix channel.
git clone https://kaka.farm/~git/guix-kakafarm-channel
Log | Files | Refs | README | LICENSE

guile-xyz.scm (19426B)


      1 ;;; Kakafarm's Guix Channel
      2 ;;; Copyright © 2023-2024 Yuval Langer <yuval.langer@gmail.com>
      3 ;;;
      4 ;;; This file is part of Kakafarm's Guix Channel.
      5 ;;;
      6 ;;; Kakafarm's Guix Channel is free software; you can redistribute it
      7 ;;; and/or modify it under the terms of the GNU General Public License
      8 ;;; as published by the Free Software Foundation; either version 3 of
      9 ;;; the License, or (at your option) any later version.
     10 ;;;
     11 ;;; Kakafarm's Guix Channel is distributed in the hope that it will be
     12 ;;; useful, but WITHOUT ANY WARRANTY; without even the implied
     13 ;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     14 ;;; See the GNU General Public License for more details.
     15 ;;;
     16 ;;; You should have received a copy of the GNU General Public License
     17 ;;; along with Kakafarm's Guix Channel.  If not, see
     18 ;;; <http://www.gnu.org/licenses/>.
     19 
     20 (define-module (kakafarm packages guile-xyz)
     21   #:use-module (ice-9 textual-ports)
     22 
     23   #:use-module (gnu packages base)
     24   #:use-module (gnu packages bash)
     25   #:use-module (gnu packages gettext)
     26   #:use-module (gnu packages glib)
     27   #:use-module (gnu packages gtk)
     28   #:use-module (gnu packages gnome)
     29   #:use-module (gnu packages xorg)
     30   #:use-module ((gnu packages guile)
     31                 #:prefix gnu:packages:guile:)
     32   #:use-module ((gnu packages guile-xyz)
     33                 #:prefix gnu:packages:guile-xyz:)
     34   #:use-module (gnu packages image)
     35   #:use-module (gnu packages linux)
     36   #:use-module (gnu packages speech)
     37   #:use-module (gnu packages xdisorg)
     38   #:use-module (gnu packages)
     39 
     40   #:use-module (guix build-system gnu)
     41   #:use-module (guix build-system guile)
     42   #:use-module (guix gexp)
     43   #:use-module (guix git-download)
     44   #:use-module ((guix licenses)
     45                 #:prefix license:)
     46   #:use-module (guix packages))
     47 
     48 (define-public guile-clipboard-speaker
     49   (let ((commit "36e87dee6f0ea51df62b1c52ff570f778ea18d95")
     50         (revision "2")
     51         (base32-string "1gz5fq8acw0nxr5nyarcrnxy75brjyr3ir5x6kj3mbdiijyqnagh")
     52         (git-repository-url
     53          "https://codeberg.org/kakafarm/guile-clipboard-speaker/"))
     54     (package
     55       (name "guile-clipboard-speaker")
     56       (version (git-version "1.0.2" revision commit))
     57       (source
     58        (origin
     59          (uri (git-reference
     60                (url git-repository-url)
     61                (commit commit)))
     62          (method git-fetch)
     63          (file-name (git-file-name name version))
     64          (sha256
     65           (base32 base32-string))))
     66       (native-inputs (list gnu:packages:guile:guile-3.0))
     67       (inputs (list bash
     68                     coreutils
     69                     espeak-ng
     70                     gnu:packages:guile-xyz:guile-config
     71                     gnu:packages:guile-xyz:guile-srfi-145
     72                     gnu:packages:guile-xyz:guile-srfi-180
     73                     gnu:packages:guile:guile-3.0
     74                     util-linux
     75                     xsel))
     76       (build-system guile-build-system)
     77       (arguments
     78        (list
     79         #:phases #~(modify-phases %standard-phases
     80                      (add-after 'install-documentation 'link-and-wrap-executable
     81                        (lambda _
     82                          (use-modules (ice-9 pretty-print))
     83                          (let* ((bin (string-append #$output "/bin"))
     84                                 (script (string-append bin
     85                                                        "/clipboard-speaker"))
     86                                 (site-version (target-guile-effective-version))
     87                                 (scm (string-append "/share/guile/site/"
     88                                                     site-version))
     89                                 (go (string-append "/lib/guile/" site-version
     90                                                    "/site-ccache"))
     91                                 (guile-config #$(this-package-input
     92                                                  "guile-config"))
     93                                 (guile-srfi-145 #$(this-package-input
     94                                                    "guile-srfi-145"))
     95                                 (guile-srfi-180 #$(this-package-input
     96                                                    "guile-srfi-180")))
     97                            (mkdir-p bin)
     98                            (symlink (string-append #$output scm
     99                                                    "/clipboard-speaker.scm")
    100                                     script)
    101                            (wrap-program script
    102                              #:sh (which "bash")
    103                              (list "GUILE_LOAD_PATH"
    104                                    'prefix
    105                                    (list (string-append #$output scm)
    106                                          (string-append guile-config scm)
    107                                          (string-append guile-srfi-145 scm)
    108                                          (string-append guile-srfi-180 scm)))
    109                              (list "GUILE_LOAD_COMPILED_PATH"
    110                                    'prefix
    111                                    (list (string-append #$output go)
    112                                          (string-append guile-config go)
    113                                          (string-append guile-srfi-145 go)
    114                                          (string-append guile-srfi-180 go))))))))))
    115       (home-page git-repository-url)
    116       (synopsis
    117        "Accessibility tool that reads the contents of your clipboard buffer")
    118       (description
    119        "This package installs the clipboard-speaker executable.
    120 An accessibility tool that reads the contents of the clipboard.  I can
    121 read the current selection or the clipboard.  Select a bunch of text,
    122 press a keybinding / shortcut you've set in the windows manager, and
    123 clipboard-speaker would read that aloud.")
    124       (license license:agpl3+))))
    125 
    126 (define-public guile-rsv
    127   (let ((commit "41b04c85eef31d4d51001c6d66e8fd339fcc614c")
    128         (revision "1")
    129         (base32-string "1w9jbkpmh13zrxkj915nm3l537smm0jsrdzrzcxylb6w59vqpw6l")
    130         (git-repository-url "https://codeberg.org/kakafarm/guile-rsv/"))
    131     (package
    132       (name "guile-rsv")
    133       (version (git-version "0.2.0" revision commit))
    134       (source
    135        (origin
    136          (uri (git-reference
    137                (url git-repository-url)
    138                (commit commit)))
    139          (method git-fetch)
    140          (file-name (git-file-name name version))
    141          (sha256
    142           (base32 base32-string))))
    143       (inputs (list gnu:packages:guile:guile-3.0 bash))
    144       (build-system guile-build-system)
    145       (arguments
    146        (list
    147         #:phases #~(modify-phases %standard-phases
    148                      (add-after 'install 'link-and-wrap-executable
    149                        (lambda _
    150                          (let* ((bin (string-append #$output "/bin"))
    151                                 ;; bin directory for PATH.
    152                                 (site-version (target-guile-effective-version))
    153                                 (scm (string-append "/share/guile/site/"
    154                                                     site-version))
    155                                 (go (string-append "/lib/guile/" site-version
    156                                                    "/site-ccache")))
    157                            (mkdir-p bin)
    158                            (for-each (lambda (command-name)
    159                                        (let ((source-script (string-append #$output
    160                                                              scm "/"
    161                                                              command-name
    162                                                              ".scm"))
    163                                              (target-command (string-append
    164                                                               bin "/"
    165                                                               command-name)))
    166                                          (symlink source-script target-command)
    167                                          (wrap-program target-command
    168                                            #:sh (which "bash")
    169                                            `("GUILE_LOAD_PATH" prefix
    170                                              (,(string-append #$output scm)))
    171                                            `("GUILE_LOAD_COMPILED_PATH" prefix
    172                                              (,(string-append #$output go))))))
    173                                      (list "scm2rsv" "rsv2scm"))))))))
    174       (home-page git-repository-url)
    175       (synopsis
    176        "Library for reading and writing Rows of String Values data format")
    177       (description
    178        "R7RS-small Scheme library for reading and writing RSV (Rows of String
    179 Values) data format, a very simple binary format for storing tables of
    180 strings.  It is a competitor for e.g. CSV (Comma Seperated Values),
    181 and TSV (Tab Separated Values).  Its main benefit is that the strings
    182 are represented as Unicode encoded as UTF-8, and the value and row
    183 separators are byte values that are never used in UTF-8, so the
    184 strings do not need any error prone escaping and thus can be written
    185 and read verbatim.
    186 
    187 Specified in https://github.com/Stenway/RSV-Specification and
    188 demonstrated in https://www.youtube.com/watch?v=tb_70o6ohMA.")
    189       (license (list license:gpl3+ license:expat-0)))))
    190 
    191 (define-public guile-srfi-133
    192   (let ((version "0.0.1")
    193         (revision "1")
    194         (commit "db81a114cd3e23375f024baec15482614ec90453")
    195         (git-repository-url
    196          "https://github.com/scheme-requests-for-implementation/srfi-133"))
    197     (package
    198       (name "guile-srfi-133")
    199       (version (git-version version revision commit))
    200       (source
    201        (origin
    202          (method git-fetch)
    203          (uri (git-reference
    204                (url
    205                 "https://github.com/scheme-requests-for-implementation/srfi-133")
    206                (commit commit)))
    207          (file-name (git-file-name name version))
    208          (sha256
    209           (base32 "0a7srl72291yah0aj6rwddhj041v2spximhknjj7hczlparsrm7f"))))
    210       (build-system guile-build-system)
    211       (arguments
    212        (list
    213         #:phases #~(modify-phases %standard-phases
    214                      (add-after 'unpack 'move-create-and-delete-files
    215                        (lambda _
    216                          (rename-file "vectors" "srfi")
    217                          (rename-file "srfi/vectors-test.scm"
    218                                       "srfi/srfi-test.scm")
    219                          (rename-file "srfi/vectors-impl.scm"
    220                                       "srfi/srfi-impl.scm")
    221                          (with-output-to-file "srfi/srfi-133.scm"
    222                            (lambda ()
    223                              (display
    224                               "(define-module (srfi srfi-133)
    225   #:replace (;; Constructors
    226              vector-copy
    227 
    228              ;; Mutators
    229              vector-fill! vector-copy!
    230 
    231              ;; Conversion
    232              vector->list list->vector)
    233   #:export (;; Constructors
    234             vector-unfold vector-unfold-right vector-reverse-copy
    235             vector-append vector-concatenate vector-append-subvectors
    236 
    237             ;; Predicates
    238             vector-empty? vector=
    239 
    240             ;; Iteration
    241             vector-fold vector-fold-right vector-map vector-map!
    242             vector-for-each vector-count vector-cumulate
    243 
    244             ;; Searching
    245             vector-index vector-index-right vector-skip vector-skip-right
    246             vector-binary-search vector-any vector-every vector-partition
    247 
    248             ;; Mutators
    249             vector-swap! vector-reverse!
    250             vector-reverse-copy! vector-unfold! vector-unfold-right!
    251 
    252             ;; Conversion
    253             reverse-vector->list reverse-list->vector
    254             vector->string string->vector))
    255 
    256 (include \"srfi-impl.scm\")")))
    257                          (for-each (lambda (filename)
    258                                      (delete-file filename))
    259                                    '("tests/run.scm" "srfi/vectors.sld"
    260                                      "srfi/vectors.scm")))))))
    261       (native-inputs (list gnu:packages:guile:guile-3.0))
    262       (home-page git-repository-url)
    263       (synopsis "Vector Library (R7RS-compatible)")
    264       (description "A comprehensive library of vector operations.")
    265       (license license:expat))))
    266 
    267 (define-public guile-srfi-232
    268   (let ((version "0.0.1")
    269         (revision "1")
    270         (commit "c3f580d220778cd71492aba4fdd0c7040968e705")
    271         (git-repository-url
    272          "https://github.com/scheme-requests-for-implementation/srfi-232"))
    273     (package
    274       (name "guile-srfi-232")
    275       (version (git-version version revision commit))
    276       (source
    277        (origin
    278          (method git-fetch)
    279          (uri (git-reference
    280                (url
    281                 "https://github.com/scheme-requests-for-implementation/srfi-232")
    282                (commit commit)))
    283          (file-name (git-file-name name version))
    284          (sha256
    285           (base32 "0lp4zcqjjj6hwfh3ix71wak1nffgg4npzsg7cdxfn9hf6iwf9xby"))))
    286       (build-system guile-build-system)
    287       (arguments
    288        (list
    289         #:phases #~(modify-phases %standard-phases
    290                      (add-after 'unpack 'move-and-delete-things
    291                        (lambda _
    292                          (let* ((srfi-directory (string-append #$output
    293                                                                "/srfi")))
    294                            (mkdir-p "srfi")
    295                            (with-output-to-file "srfi/srfi-232.scm"
    296                              (lambda ()
    297                                (display "(define-library (srfi srfi-232)
    298  (export curried define-curried)
    299  (import (only (guile) import)
    300          (scheme base))
    301  (include \"../srfi-232.scm\"))")))
    302                            (for-each (lambda (filename)
    303                                        (delete-file filename))
    304                                      '("test-body.scm" "test-chibi.scm"
    305                                        "test-srfi-64.scm"))))))))
    306       (native-inputs (list gnu:packages:guile:guile-3.0))
    307       (home-page git-repository-url)
    308       (synopsis "Flexible curried procedures")
    309       (description
    310        "Scheme lacks a flexible way to create and apply curried
    311 procedures.  This SRFI describes curried, a variant of lambda that
    312 creates true curried procedures which also behave just like ordinary
    313 Scheme procedures.  They can be applied to their arguments one by one,
    314 all at once, or anywhere in between, without any novel syntax.
    315 curried also supports nullary and variadic procedures, and procedures
    316 created with it have predictable behavior when applied to surplus
    317 arguments.")
    318       (license license:expat))))
    319 
    320 (define-public guile-srfi-235
    321   (let ((version "1.0.0")
    322         (revision "1")
    323         (commit "643a44aa9d6872962257995ecb0a31eb06a71d88"))
    324     (package
    325       (name "guile-srfi-235")
    326       (version (git-version version revision commit))
    327       (source
    328        (origin
    329          (method git-fetch)
    330          (uri (git-reference
    331                (url
    332                 "https://github.com/scheme-requests-for-implementation/srfi-235")
    333                (commit commit)))
    334          (file-name (git-file-name name version))
    335          (sha256
    336           (base32 "1slkcr67ad12ipkbhjdzjhbnsyvq5wi7cssvgv110fr2dy4rciwp"))))
    337       (build-system guile-build-system)
    338       (arguments
    339        (list
    340         #:phases #~(modify-phases %standard-phases
    341                      (add-after 'unpack 'move-create-and-delete-files
    342                        (lambda _
    343                          (substitute* "srfi/235.sld"
    344                            (("srfi 235")
    345                             "srfi srfi-235"))
    346                          (rename-file "srfi/235.sld" "srfi/srfi-235.scm"))))))
    347       (native-inputs (list gnu:packages:guile:guile-3.0))
    348       (home-page
    349        "https://github.com/scheme-requests-for-implementation/srfi-235")
    350       (synopsis "Combinators for Guile Scheme")
    351       (description
    352        "This SRFI contains various procedures that accept and return procedures, as
    353 well as a few others, drawn from an earlier version of Chicken.
    354 Common Lisp has a few of them too, and more come from the Standard
    355 Prelude from Programming Praxis.  Using these procedures helps to keep
    356 code terse and reduce the need for ad hoc lambdas.")
    357       (license license:expat))))
    358 
    359 (define-public guile-srfi-253
    360   (let ((version "0.0.1")
    361         (revision "3")
    362         (commit "f72830bb9b8fd20b05145a7a0b78765ff9a571b0")
    363         (git-repository-url
    364          "https://github.com/scheme-requests-for-implementation/srfi-253"))
    365     (package
    366       (name "guile-srfi-253")
    367       (version (git-version version revision commit))
    368       (source
    369        (origin
    370          (method git-fetch)
    371          (uri (git-reference
    372                (url
    373                 "https://github.com/scheme-requests-for-implementation/srfi-253")
    374                (commit commit)))
    375          (file-name (git-file-name name version))
    376          (sha256
    377           (base32 "0ni137rar3w8wr329br82z2h2nq3qnmxfg8vkw5lzkg0vapa8z3w"))))
    378       (build-system guile-build-system)
    379       (arguments
    380        (list
    381         #:phases #~(modify-phases %standard-phases
    382                      (add-after 'unpack 'move-create-and-delete-files
    383                        (lambda _
    384                          (use-modules (ice-9 textual-ports))
    385                          (let* ((impl (call-with-input-file "srfi/impl.scm"
    386                                         get-string-all)))
    387                            (with-output-to-file "srfi/srfi-253.scm"
    388                              (lambda ()
    389                                (display "(define-module (srfi srfi-253)
    390   #:export (
    391    case-lambda-checked
    392    check-arg
    393    define-checked
    394    define-optionals-checked
    395    lambda-checked
    396    opt-lambda-checked
    397    values-checked
    398    ))
    399 ")
    400                                (display impl))))
    401 
    402                          (for-each (lambda (filename)
    403                                      (delete-file filename))
    404                                    '("existing-practice.scm" "srfi/253.sld"
    405                                      "srfi/253.sls" "srfi/impl.scm" "test.scm")))))))
    406       (native-inputs (list gnu:packages:guile:guile-3.0))
    407       (home-page git-repository-url)
    408       (synopsis "Data (Type-)Checking.")
    409       (description
    410        "Data validation and type checking (supposedly) make for more correct code. And faster code too, sometimes. And, in rare cases, code that's easier to follow than the un-checked one. Unfortunately, Scheme does not have many (type-)checking primitives out of the box. This SRFI provides some, with the aim of allowing more performant and correct code with minimum effort on the user side. Both (manual) argument checking/validation (check-arg) and return value(s) (values-checked) checking/coercion are provided. Syntax sugar like lambda-checked and define-checked is added on top.")
    411       (license license:expat))))
    412 
    413 (define-public guile-websocket-next
    414   (let ((version "0.2")
    415         (revision "1")
    416         (commit "438d87675d9ef18695475685ff36ff75a5506466"))
    417     (package
    418       (inherit gnu:packages:guile-xyz:guile-websocket)
    419       (name "guile-websocket-next")
    420       (home-page "https://dthompson.us/projects/guile-websocket.html")
    421       (version (git-version version revision commit))
    422       (source
    423        (origin
    424          (method git-fetch)
    425          (uri (git-reference
    426                (url "https://git.dthompson.us/guile-websocket.git")
    427                (commit commit)))
    428          (file-name (git-file-name name version))
    429          (sha256
    430           (base32 "1qqwjhpqc615sxjnmx8jbpjqczfanfjvhrl1lxd3h738pnjr7fbq")))))))