Loading pkgs/games/minetest/0000-mark-rm-for-substitution.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/src/filesys.cpp b/src/filesys.cpp index 8881eb2ca..e02d87a9f 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -384,7 +384,7 @@ bool RecursiveDelete(const std::string &path) if (child_pid == 0) { // Child std::array<const char*, 4> argv = { - "rm", + "@RM_COMMAND@", "-rf", path.c_str(), nullptr pkgs/games/minetest/default.nix +18 −11 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ stdenv, fetchFromGitHub, gitUpdater, substitute, cmake, coreutils, libpng, Loading Loading @@ -43,15 +44,30 @@ stdenv.mkDerivation (finalAttrs: { pname = "minetest"; version = "5.9.1"; version = "5.10.0"; src = fetchFromGitHub { owner = "minetest"; repo = "minetest"; rev = finalAttrs.version; hash = "sha256-0WTDhFt7GDzN4AK8U17iLkjeSMK+gOWZRq46HBTeO3w="; hash = "sha256-sumwm8mJghpSriVflMQSHQM4BTmAhfI/Wl/FroLTVts="; }; patches = [ (substitute { src = ./0000-mark-rm-for-substitution.patch; substitutions = [ "--subst-var-by" "RM_COMMAND" "${coreutils}/bin/rm" ]; }) ]; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/pagezero_size/d;/fixup_bundle/d' src/CMakeLists.txt ''; cmakeFlags = [ (lib.cmakeBool "BUILD_CLIENT" buildClient) (lib.cmakeBool "BUILD_SERVER" buildServer) Loading Loading @@ -125,15 +141,6 @@ stdenv.mkDerivation (finalAttrs: { prometheus-cpp ]; postPatch = '' substituteInPlace src/filesys.cpp \ --replace-fail "/bin/rm" "${coreutils}/bin/rm" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/pagezero_size/d;/fixup_bundle/d' src/CMakeLists.txt ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchShebangs $out Loading Loading
pkgs/games/minetest/0000-mark-rm-for-substitution.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/src/filesys.cpp b/src/filesys.cpp index 8881eb2ca..e02d87a9f 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -384,7 +384,7 @@ bool RecursiveDelete(const std::string &path) if (child_pid == 0) { // Child std::array<const char*, 4> argv = { - "rm", + "@RM_COMMAND@", "-rf", path.c_str(), nullptr
pkgs/games/minetest/default.nix +18 −11 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ stdenv, fetchFromGitHub, gitUpdater, substitute, cmake, coreutils, libpng, Loading Loading @@ -43,15 +44,30 @@ stdenv.mkDerivation (finalAttrs: { pname = "minetest"; version = "5.9.1"; version = "5.10.0"; src = fetchFromGitHub { owner = "minetest"; repo = "minetest"; rev = finalAttrs.version; hash = "sha256-0WTDhFt7GDzN4AK8U17iLkjeSMK+gOWZRq46HBTeO3w="; hash = "sha256-sumwm8mJghpSriVflMQSHQM4BTmAhfI/Wl/FroLTVts="; }; patches = [ (substitute { src = ./0000-mark-rm-for-substitution.patch; substitutions = [ "--subst-var-by" "RM_COMMAND" "${coreutils}/bin/rm" ]; }) ]; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/pagezero_size/d;/fixup_bundle/d' src/CMakeLists.txt ''; cmakeFlags = [ (lib.cmakeBool "BUILD_CLIENT" buildClient) (lib.cmakeBool "BUILD_SERVER" buildServer) Loading Loading @@ -125,15 +141,6 @@ stdenv.mkDerivation (finalAttrs: { prometheus-cpp ]; postPatch = '' substituteInPlace src/filesys.cpp \ --replace-fail "/bin/rm" "${coreutils}/bin/rm" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i '/pagezero_size/d;/fixup_bundle/d' src/CMakeLists.txt ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchShebangs $out Loading