d604b0d493d2d18cca83a8df8b98bddfdf16a97d — unwox 2 months ago 4c17944
add toys package
1 files changed, 72 insertions(+), 0 deletions(-)

A guixrus/packages/toys.scm
A guixrus/packages/toys.scm => guixrus/packages/toys.scm +72 -0
@@ 0,0 1,72 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 unwox <me@unwox.com>
;;; This file is not 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
;;; 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 (guixrus packages toys)
  #:use-module (guix build-system guile)
  #:use-module (guix build utils)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix search-paths)
  #:use-module ((guixrus contributors) #:prefix contributor:)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages package-management))

(define-public toys
  (let ((commit "1d542fd9742d84f08a1f77a8680cb157e5ef9bc3")
        (revision "0"))
     (name "toys")
     (version (git-version "0.0" revision commit))
     (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://git.sr.ht/~whereiseveryone/toys")
                     (commit commit)))
              (file-name (git-file-name name version))
       (modify-phases %standard-phases
         (add-after 'unpack 'register-guix-extension
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (ext-path (string-append out "/share/guix/extensions")))
              (mkdir-p ext-path)
              (copy-recursively "guix/extensions" ext-path))))
         (add-after 'register-guix-extension 'clean-up
           (lambda* _
             (delete-file "channels.scm")
             (delete-file-recursively "guix"))))))
     (build-system guile-build-system)
     (native-inputs (list guile-3.0))
     (inputs (list guix))
     (propagated-inputs (list guile-json-4))
       (list (search-path-specification
               (variable "GUILE_LOAD_PATH")
               (files '("share/guile/site/3.0")))))
     (home-page "https://git.sr.ht/~whereiseveryone/toys")
     (synopsis "Webring for Guix channels")
     (description "toys is an experiment to create a JSON API for exploring
Guix channels on the internets.")
     (license license:gpl3)
     (properties `((maintainers . (,contributor:unwox)))))))