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 (15219B)


      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 "ba5fa866087b93fae966640eed37387ea5a74e32")
     50         (base32-string "1q8c1x0ansx9519lry9spl923bzc9yrs675fyjmxkhyrwi52i8p2")
     51         (git-repository-url
     52          "https://codeberg.org/kakafarm/guile-clipboard-speaker/"))
     53     (package
     54       (name "guile-clipboard-speaker")
     55       (version "1.0.1")
     56       (source
     57        (origin
     58          (uri (git-reference
     59                (url git-repository-url)
     60                (commit commit)))
     61          (method git-fetch)
     62          (file-name (git-file-name name version))
     63          (sha256
     64           (base32 base32-string))))
     65       (native-inputs (list gnu:packages:guile:guile-3.0))
     66       (inputs (list bash
     67                     coreutils
     68                     espeak-ng
     69                     gnu:packages:guile:guile-3.0
     70                     gnu:packages:guile-xyz:guile-config
     71                     gnu:packages:guile-xyz:guile-srfi-145
     72                     gnu:packages:guile-xyz:guile-srfi-180
     73                     util-linux
     74                     xsel))
     75       (build-system guile-build-system)
     76       (arguments
     77        (list
     78         #:phases #~(modify-phases %standard-phases
     79                      (add-after 'install 'link-and-wrap-executable
     80                        (lambda _
     81                          (let* ((bin (string-append #$output "/bin"))
     82                                 (script (string-append bin
     83                                                        "/clipboard-speaker"))
     84                                 (site-version (target-guile-effective-version))
     85                                 (scm (string-append "/share/guile/site/"
     86                                                     site-version))
     87                                 (go (string-append "/lib/guile/" site-version
     88                                                    "/site-ccache"))
     89                                 (guile-config #$(this-package-input
     90                                                  "guile-config"))
     91                                 (guile-srfi-145 #$(this-package-input
     92                                                    "guile-srfi-145"))
     93                                 (guile-srfi-180 #$(this-package-input
     94                                                    "guile-srfi-180")))
     95                            (mkdir-p bin)
     96                            (symlink (string-append #$output scm
     97                                                    "/clipboard-speaker.scm")
     98                                     script)
     99                            (wrap-program script
    100                              #:sh (which "bash")
    101                              `("GUILE_LOAD_PATH" prefix
    102                                (,(string-append #$output scm) ,(string-append
    103                                                                 guile-config
    104                                                                 scm)
    105                                 ,(string-append guile-srfi-145 scm)
    106                                 ,(string-append guile-srfi-180 scm)))
    107                              `("GUILE_LOAD_COMPILED_PATH" prefix
    108                                (,(string-append #$output go) ,(string-append
    109                                                                guile-config go)
    110                                 ,(string-append guile-srfi-145 go)
    111                                 ,(string-append guile-srfi-180 go))))))))))
    112       (home-page git-repository-url)
    113       (synopsis
    114        "Accessibility tool that reads the contents of your clipboard buffer")
    115       (description
    116        "This package installs the clipboard-speaker executable.
    117 An accessibility tool that reads the contents of the clipboard.  I can
    118 read the current selection or the clipboard.  Select a bunch of text,
    119 press a keybinding / shortcut you've set in the windows manager, and
    120 clipboard-speaker would read that aloud.")
    121       (license license:agpl3+))))
    122 
    123 (define-public guile-rsv
    124   (let ((commit "41b04c85eef31d4d51001c6d66e8fd339fcc614c")
    125         (revision "1")
    126         (base32-string "1w9jbkpmh13zrxkj915nm3l537smm0jsrdzrzcxylb6w59vqpw6l")
    127         (git-repository-url "https://codeberg.org/kakafarm/guile-rsv/"))
    128     (package
    129       (name "guile-rsv")
    130       (version (git-version "0.2.0" revision commit))
    131       (source
    132        (origin
    133          (uri (git-reference
    134                (url git-repository-url)
    135                (commit commit)))
    136          (method git-fetch)
    137          (file-name (git-file-name name version))
    138          (sha256
    139           (base32 base32-string))))
    140       (inputs (list gnu:packages:guile:guile-3.0 bash))
    141       (build-system guile-build-system)
    142       (arguments
    143        (list
    144         #:phases #~(modify-phases %standard-phases
    145                      (add-after 'install 'link-and-wrap-executable
    146                        (lambda _
    147                          (let* ((bin (string-append #$output "/bin"))
    148                                 ;; bin directory for PATH.
    149                                 (site-version (target-guile-effective-version))
    150                                 (scm (string-append "/share/guile/site/"
    151                                                     site-version))
    152                                 (go (string-append "/lib/guile/" site-version
    153                                                    "/site-ccache")))
    154                            (mkdir-p bin)
    155                            (for-each (lambda (command-name)
    156                                        (let ((source-script (string-append #$output
    157                                                              scm "/"
    158                                                              command-name
    159                                                              ".scm"))
    160                                              (target-command (string-append
    161                                                               bin "/"
    162                                                               command-name)))
    163                                          (symlink source-script target-command)
    164                                          (wrap-program target-command
    165                                            #:sh (which "bash")
    166                                            `("GUILE_LOAD_PATH" prefix
    167                                              (,(string-append #$output scm)))
    168                                            `("GUILE_LOAD_COMPILED_PATH" prefix
    169                                              (,(string-append #$output go))))))
    170                                      (list "scm2rsv" "rsv2scm"))))))))
    171       (home-page git-repository-url)
    172       (synopsis
    173        "Library for reading and writing Rows of String Values data format")
    174       (description
    175        "R7RS-small Scheme library for reading and writing RSV (Rows of String
    176 Values) data format, a very simple binary format for storing tables of
    177 strings.  It is a competitor for e.g. CSV (Comma Seperated Values),
    178 and TSV (Tab Separated Values).  Its main benefit is that the strings
    179 are represented as Unicode encoded as UTF-8, and the value and row
    180 separators are byte values that are never used in UTF-8, so the
    181 strings do not need any error prone escaping and thus can be written
    182 and read verbatim.
    183 
    184 Specified in https://github.com/Stenway/RSV-Specification and
    185 demonstrated in https://www.youtube.com/watch?v=tb_70o6ohMA.")
    186       (license (list license:gpl3+ license:expat-0)))))
    187 
    188 (define-public guile-srfi-133
    189   (let ((version "0.0.1")
    190         (revision "1")
    191         (commit "db81a114cd3e23375f024baec15482614ec90453")
    192         (git-repository-url
    193          "https://github.com/scheme-requests-for-implementation/srfi-133"))
    194     (package
    195       (name "guile-srfi-133")
    196       (version (git-version version revision commit))
    197       (source
    198        (origin
    199          (method git-fetch)
    200          (uri (git-reference
    201                (url
    202                 "https://github.com/scheme-requests-for-implementation/srfi-133")
    203                (commit commit)))
    204          (file-name (git-file-name name version))
    205          (sha256
    206           (base32 "0a7srl72291yah0aj6rwddhj041v2spximhknjj7hczlparsrm7f"))))
    207       (build-system guile-build-system)
    208       (arguments
    209        (list
    210         #:phases #~(modify-phases %standard-phases
    211                      (add-after 'unpack 'move-create-and-delete-files
    212                        (lambda _
    213                          (rename-file "vectors" "srfi")
    214                          (rename-file "srfi/vectors-test.scm"
    215                                       "srfi/srfi-test.scm")
    216                          (rename-file "srfi/vectors-impl.scm"
    217                                       "srfi/srfi-impl.scm")
    218                          (with-output-to-file "srfi/srfi-133.scm"
    219                            (lambda ()
    220                              (display
    221                               "(define-module (srfi srfi-133)
    222   #:replace (;; Constructors
    223              vector-copy
    224 
    225              ;; Mutators
    226              vector-fill! vector-copy!
    227 
    228              ;; Conversion
    229              vector->list list->vector)
    230   #:export (;; Constructors
    231             vector-unfold vector-unfold-right vector-reverse-copy
    232             vector-append vector-concatenate vector-append-subvectors
    233 
    234             ;; Predicates
    235             vector-empty? vector=
    236 
    237             ;; Iteration
    238             vector-fold vector-fold-right vector-map vector-map!
    239             vector-for-each vector-count vector-cumulate
    240 
    241             ;; Searching
    242             vector-index vector-index-right vector-skip vector-skip-right
    243             vector-binary-search vector-any vector-every vector-partition
    244 
    245             ;; Mutators
    246             vector-swap! vector-reverse!
    247             vector-reverse-copy! vector-unfold! vector-unfold-right!
    248 
    249             ;; Conversion
    250             reverse-vector->list reverse-list->vector
    251             vector->string string->vector))
    252 
    253 (include \"srfi-impl.scm\")")))
    254                          (for-each (lambda (filename)
    255                                      (delete-file filename))
    256                                    '("tests/run.scm" "srfi/vectors.sld"
    257                                      "srfi/vectors.scm")))))))
    258       (native-inputs (list gnu:packages:guile:guile-3.0))
    259       (home-page git-repository-url)
    260       (synopsis "Vector Library (R7RS-compatible)")
    261       (description "A comprehensive library of vector operations.")
    262       (license license:expat))))
    263 
    264 (define-public guile-srfi-232
    265   (let ((version "0.0.1")
    266         (revision "1")
    267         (commit "c3f580d220778cd71492aba4fdd0c7040968e705")
    268         (git-repository-url
    269          "https://github.com/scheme-requests-for-implementation/srfi-232"))
    270     (package
    271       (name "guile-srfi-232")
    272       (version (git-version version revision commit))
    273       (source
    274        (origin
    275          (method git-fetch)
    276          (uri (git-reference
    277                (url
    278                 "https://github.com/scheme-requests-for-implementation/srfi-232")
    279                (commit commit)))
    280          (file-name (git-file-name name version))
    281          (sha256
    282           (base32 "0lp4zcqjjj6hwfh3ix71wak1nffgg4npzsg7cdxfn9hf6iwf9xby"))))
    283       (build-system guile-build-system)
    284       (arguments
    285        (list
    286         #:phases #~(modify-phases %standard-phases
    287                      (add-after 'unpack 'move-and-delete-things
    288                        (lambda _
    289                          (let* ((srfi-directory (string-append #$output
    290                                                                "/srfi")))
    291                            (mkdir-p "srfi")
    292                            (with-output-to-file "srfi/srfi-232.scm"
    293                              (lambda ()
    294                                (display "(define-library (srfi srfi-232)
    295  (export curried define-curried)
    296  (import (only (guile) import)
    297          (scheme base))
    298  (include \"../srfi-232.scm\"))")))
    299                            (for-each (lambda (filename)
    300                                        (delete-file filename))
    301                                      '("test-body.scm" "test-chibi.scm"
    302                                        "test-srfi-64.scm"))))))))
    303       (native-inputs (list gnu:packages:guile:guile-3.0))
    304       (home-page git-repository-url)
    305       (synopsis "Flexible curried procedures")
    306       (description
    307        "Scheme lacks a flexible way to create and apply curried
    308 procedures.  This SRFI describes curried, a variant of lambda that
    309 creates true curried procedures which also behave just like ordinary
    310 Scheme procedures.  They can be applied to their arguments one by one,
    311 all at once, or anywhere in between, without any novel syntax.
    312 curried also supports nullary and variadic procedures, and procedures
    313 created with it have predictable behavior when applied to surplus
    314 arguments.")
    315       (license license:expat))))
    316 
    317 (define-public guile-websocket-next
    318   (let ((version "0.2")
    319         (revision "1")
    320         (commit "438d87675d9ef18695475685ff36ff75a5506466"))
    321     (package
    322       (inherit gnu:packages:guile-xyz:guile-websocket)
    323       (name "guile-websocket-next")
    324       (home-page "https://dthompson.us/projects/guile-websocket.html")
    325       (version (git-version version revision commit))
    326       (source
    327        (origin
    328          (method git-fetch)
    329          (uri (git-reference
    330                (url "https://git.dthompson.us/guile-websocket.git")
    331                (commit commit)))
    332          (file-name (git-file-name name version))
    333          (sha256
    334           (base32 "1qqwjhpqc615sxjnmx8jbpjqczfanfjvhrl1lxd3h738pnjr7fbq")))))))
    335 
    336 ;;; This allows you to run guix shell -f example.scm.
    337 ;;; Remove this line if you just want to define a package.
    338 ;;;guile-clipboard-speaker