;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2016, 2023 Ludovic Courtès ;;; Copyright © 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017, 2021 Efraim Flashner ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; ;;; 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 P
aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018, 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
;;; Copyright © 2019, 2020, 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2019, 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 Sarthak Shah <shahsarthakw@gmail.com>
;;;
;;; 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 (gnu packages toys)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages man)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pretty-print)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system meson)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils))

(define-public daikichi
  (package
    (name "daikichi")
    (version "0.3.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://gitlab.com/lilyp/daikichi")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "139kjf14ayqrwzd0hzw2qhfp47ngyimibzgfyqy6i7y8lhwsjs1v"))))
    (build-system meson-build-system)
    (arguments
     (list #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'hard-code-test-paths
                 (lambda* (#:key inputs #:allow-other-keys)
                   (substitute* (list "test-dat.in" "test-strings.in")
                     (("(basename|cmp|diff|mktemp|rm|sed|seq)" cmd)
                      (search-input-file inputs
                                         (string-append "bin/" cmd)))))))))
    (inputs (list bash-minimal coreutils sed
                  diffutils
                  fmt gmp))
    (native-inputs (list pkg-config))
    (home-page "https://gitlab.com/lilyp/daikichi")
    (synopsis "Display random fortunes")
    (description "Daikichi is an alternative implementation of
@command{fortune}, which displays random quotes from a database.
This package provides just the utilities and no quotes.")
    (license license:gpl3+)
    (native-search-paths
     (list (search-path-specification
            (variable "DAIKICHI_FORTUNE_PATH")
            (files '("share/fortunes")))))))

(define-public fortunes-jkirchartz
  ;; No public release.
  ;; Note to updaters: Please ensure that new quotes do not bring harm
  ;; rather than fortune.
  (let ((commit "2e32ba0a57e3842dc06c8128d880ab4c8ec3aefc")
        (revision "0"))
    (package
      (name "fortunes-jkirchartz")
      (version (git-version "0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/JKirchartz/fortunes")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1ym4ldzww5yfd76q7zvhi