@@ 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
+;;; 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 (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"))
+ (package
+ (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))
+ (sha256
+ (base32
+ "00c6y15f10pq6lx2v1g85vvg4fax3vwpgb5hf7x89svfwv7pvdgk"))))
+ (arguments
+ `(#:phases
+ (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))
+ (native-search-paths
+ (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)))))))