unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47765] [PATCH] gnu: minetest: Fix absolute path to 'rm' command.
@ 2021-04-14  3:53 Hass, Trevor Stenten
  2021-04-14  7:45 ` bug#47765: " Leo Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Hass, Trevor Stenten @ 2021-04-14  3:53 UTC (permalink / raw)
  To: 47765


[-- Attachment #1.1: Type: text/plain, Size: 134 bytes --]

Hello Guix,

The attached patch resolves an issue where Minetest cannot delete worlds or downloaded content.

Thank you,
Trevor

[-- Attachment #1.2: Type: text/html, Size: 1055 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-minetest-Fix-absolute-path-to-rm-command.patch --]
[-- Type: text/x-patch; name="0001-gnu-minetest-Fix-absolute-path-to-rm-command.patch", Size: 2013 bytes --]

From b420ef5912b6b04023991f44db3e8a4f32091022 Mon Sep 17 00:00:00 2001
From: Trevor Hass <thass@okstate.edu>
Date: Tue, 13 Apr 2021 22:05:08 -0500
Subject: [PATCH] gnu: minetest: Fix absolute path to 'rm' command.

* gnu/packages/games.scm (minetest): Add 'set-rm' phase to substitute absolute path to 'rm'.  Add 'coreutils' to inputs.
---
 gnu/packages/games.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index dbc72446b2..6dedfa7419 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -52,7 +52,7 @@
 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
+;;; Copyright © 2020, 2021 Trevor Hass <thass@okstate.edu>
 ;;; Copyright © 2020, 2021 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;; Copyright © 2020 Lu hux <luhux@outlook.com>
 ;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
@@ -3496,6 +3496,12 @@ match, cannon keep, and grave-itation pit.")
              (setenv "MINETEST_SUBGAME_PATH"
                      (string-append (getcwd) "/games")) ; for check
              #t))
+         (add-after 'unpack 'set-rm
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/filesys.cpp"
+               (("\"/bin/rm\"")
+                (string-append "\"" (assoc-ref inputs "coreutils") "/bin/rm\"")))
+             #t))
          (replace 'check
            (lambda _
              ;; Thanks to our substitutions, the tests should also run
@@ -3511,7 +3517,8 @@ match, cannon keep, and grave-itation pit.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("curl" ,curl)
+     `(("coreutils" ,coreutils)
+       ("curl" ,curl)
        ("freetype" ,freetype)
        ("gettext" ,gettext-minimal)
        ("gmp" ,gmp)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#47765: [PATCH] gnu: minetest: Fix absolute path to 'rm' command.
  2021-04-14  3:53 [bug#47765] [PATCH] gnu: minetest: Fix absolute path to 'rm' command Hass, Trevor Stenten
@ 2021-04-14  7:45 ` Leo Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Prikler @ 2021-04-14  7:45 UTC (permalink / raw)
  To: Hass, Trevor Stenten, 47765-done

Hi Trevor,
Am Mittwoch, den 14.04.2021, 03:53 +0000 schrieb Hass, Trevor Stenten:
> Hello Guix,
> 
> The attached patch resolves an issue where Minetest cannot delete
> worlds or downloaded content.
I've pushed it with some cosmetic changes as
c5e149a9d9cf25c68da817f46ea0cbf5442d39bd.

Thanks,
Leo





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-14  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  3:53 [bug#47765] [PATCH] gnu: minetest: Fix absolute path to 'rm' command Hass, Trevor Stenten
2021-04-14  7:45 ` bug#47765: " Leo Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).