Derive([("out","/nix/store/yd0v41r8kj49xcjric62gk47lss9vdyg-hurd-qemu-test-build","","")],[("/nix/store/2fgw8gkxs1k8hfcsvir3q9wnkifdzs2s-bash-4.2-p20.drv",["out"]),("/nix/store/31n2fn5h1gydqs3a9zm5g40d2f886i7g-gnused-4.2.1-i586-pc-gnu.drv",["out"]),("/nix/store/34y69yzzb9a1v1fmixiqfhip9s57pybf-gnugrep-2.10-i586-pc-gnu.drv",["out"]),("/nix/store/6n80yhr7cwip45w8rccyk4bp7g7zlkwq-gnu-global-user-environment.drv",["out"]),("/nix/store/88ymj8xwrkmadyabbc1z96x4prabkhsx-gnumake-3.82-i586-pc-gnu.drv",["out"]),("/nix/store/8c61y42zw57axxixl0wikq6vszjbf9bw-qemu-kvm-0.15.1.drv",["out"]),("/nix/store/8dd520i02y7pkh5ynm7d5jb2lk0m7wzn-mig-20100512-i586-pc-gnu.drv",["out"]),("/nix/store/b4lcngrsl838jg37yn510g888nlf0f1v-gawk-4.0.0-i586-pc-gnu.drv",["out"]),("/nix/store/c4bq6crxpl4y9wd18fkvn81vj93m9wph-findutils-4.4.2-i586-pc-gnu.drv",["out"]),("/nix/store/dgbh8qzl4rr89jsrlsy382z84lmfwsj1-bzip2-1.0.6-i586-pc-gnu.drv",["out"]),("/nix/store/dsplzdbcqwgi9ybb7pfk5z9w6vxbn48h-diffutils-3.2-i586-pc-gnu.drv",["out"]),("/nix
aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2019 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020, 2021, 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2024 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
;;; 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 minetest)
  #:use-module (gnu packages)
  #:use-module (gnu packages audio)
  #:use-module (gnu packages base)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages image)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages xiph)
  #:use-module (gnu packages xorg)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system minetest)
  #:use-module ((guix licenses) #:prefix license:))

(define-public minetest
  (package
    (name "minetest")
    (version "5.10.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/minetest/minetest")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1nsnsf1axiazb8zz51c0742kh0qx2b298pr5mr91m0l9r6dv1sdj"))
       (modules '((guix build utils)
                  (srfi srfi-26)
                  (ice-9 ftw)))
       ;; Delete bundled libraries.
       ;; - Keep lib/sha256 because there's no good upstream, see:
       ;;   https://github.com/openssl/openssl/blob/master/crypto/sha/sha512.c
       ;;   "SHA512 low level APIs are deprecated for public use,
       ;;   but still ok for internal use." Also asked MT devs on IRC for this.
       ;; - tiniergltf is intended for Minetest and diverged from upstream.
       (snippet
        '(let ((keep '("." ".." "sha256" "tiniergltf")))
           (with-directory-excursion "lib"
             (for-each delete-file-recursively
                       (scandir "." (negate (cut member <> keep)))))
           ;; IrrlichtMT includes
           (delete-file-recursively "irr/include/KHR")
           (delete-file-recursively &quo