Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minecraft-overviewer: init at 0.14.40 #62949

Closed
wants to merge 3 commits into from

Conversation

lheckemann
Copy link
Member

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ivan
Copy link
Member

ivan commented Jun 10, 2019

I built and tested locally and it mostly works fine, but generating a map ends with this error:

at@ra:/mnt/S/gaming-C/Users/jc/AppData/Roaming/.minecraft/saves# overviewer.py The\ New\ World ~/trash/outdir2
2019-06-10 18:00:06  Welcome to Minecraft Overviewer!
2019-06-10 18:00:06  Generating textures...
2019-06-10 18:00:14  Preprocessing...
2019-06-10 18:00:23  Rendering 851 total tiles.
 98% [=================================================================================================================================================================================================================================================================================================================     ] 838 29.82t/s eta 00h 00m 00s
2019-06-10 18:00:51  Rendering complete!
2019-06-10 18:00:52 E An error has occurred. This may be a bug. Please let us know!
See http://docs.overviewer.org/en/latest/index.html#help

This is the error that occurred:
Traceback (most recent call last):
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/bin/.overviewer.py-wrapped", line 652, in <module>
    ret = main()
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/bin/.overviewer.py-wrapped", line 588, in main
    assetMrg.finalize(tilesets)
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/lib/python2.7/site-packages/overviewer_core/assetmanager.py", line 94, in finalize
    self._output_assets(tilesets, False)
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/lib/python2.7/site-packages/overviewer_core/assetmanager.py", line 171, in _output_assets
    self.output_noconfig()
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/lib/python2.7/site-packages/overviewer_core/assetmanager.py", line 179, in output_noconfig
    mirror_dir(global_assets, self.outputdir, capabilities=self.fs_caps)
  File "/nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/lib/python2.7/site-packages/overviewer_core/files.py", line 101, in mirror_dir
    shutil.copy(os.path.join(src, entry), os.path.join(dst, entry))
  File "/nix/store/9yi3j41iwz045cn8h6brghi3lzsd886k-python-2.7.16/lib/python2.7/shutil.py", line 139, in copy
    copyfile(src, dst)
  File "/nix/store/9yi3j41iwz045cn8h6brghi3lzsd886k-python-2.7.16/lib/python2.7/shutil.py", line 97, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/home/at/trash/outdir2/bed.png'

Perhaps this happens because /nix/store/cfspf430rxckh9hyi35404cxg8rp31ad-minecraft-overviewer-0.13.90/lib/python2.7/site-packages/overviewer_core/data/web_assets/bed.png is read-only and overviewer expects to be able to copy it to the output folder, then overwrite the (r--r--r--) copy?

@lheckemann
Copy link
Member Author

Yep, same problem here. I work around the following failures by running chmod -R u+w $mapOutputDir after every run, but I consider this an upstream bug which I'm planning to report upstream Soon™ :)

@ivan
Copy link
Member

ivan commented Jun 12, 2019

On the map I tested, I see that error at the end of the first run on a new output directory.

If upstream has no fix yet, I would suggest patching the software to make it nix store-compatible.

@lheckemann
Copy link
Member Author

I've added a hacky workaround and reported the issue upstream, as well as updating to the latest version (which uses python 3 🎉). Will squash these together before a merge, but am leaving the commits separate for easier review for now.

@CounterPillow
Copy link

Since you're going to be shipping outdated versions, I'd also prefer if you changed the "this may be a bug" bug report URL. I'm not interested in supporting people's outdated Overviewer versions because nix happened to ship it.

@lheckemann lheckemann changed the title minecraft-overviewer: init at 0.13.90 minecraft-overviewer: init at 0.14.40 Jul 13, 2019
@nyanloutre
Copy link
Member

Tested this PR which is working 👍

@nyanloutre
Copy link
Member

I updated it to latest version because of an incompatibility with some blocks ID

Here is the patch if you want to apply it:

From f3ebb946bf2de5282f3c761c328866fae396e464 Mon Sep 17 00:00:00 2001
From: nyanloutre <paul@nyanlout.re>
Date: Sat, 2 Nov 2019 14:21:02 +0100
Subject: [PATCH] minecraft-overviewer: 0.14.40 -> 0.14.85

---
 pkgs/games/minecraft-overviewer/default.nix | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkgs/games/minecraft-overviewer/default.nix b/pkgs/games/minecraft-overviewer/default.nix
index ace5e557d0c..6e6fc1efc87 100644
--- a/pkgs/games/minecraft-overviewer/default.nix
+++ b/pkgs/games/minecraft-overviewer/default.nix
@@ -1,16 +1,16 @@
-{ buildPythonApplication, pillow, numpy, pkgconfig, fetchurl, lib }:
+{ buildPythonApplication, pillow, numpy, networkx, pkgconfig, fetchurl, lib }:
 
 buildPythonApplication rec {
   pname = "minecraft-overviewer";
-  version = "0.14.40";
+  version = "0.14.85";
 
-  propagatedBuildInputs = [ pillow numpy ];
+  propagatedBuildInputs = [ pillow numpy networkx ];
 
   nativeBuildInputs = [ pkgconfig ];
 
   src = fetchurl {
-    url = "https://overviewer.org/builds/src/42/overviewer-${version}.tar.gz";
-    sha256 = "0881sgr1c57jm9hhjzldbzksxmfvvzcl0isz80byyypg4x6rl22w";
+    url = "https://overviewer.org/builds/src/${toString (lib.strings.toInt (lib.versions.patch version) - 1)}/overviewer-${version}.tar.gz";
+    sha256 = "0jpw7lnb7v5gklqk9s7h08ibvy0a6475hgr8ajg2mzqqqybvjbxz";
   };
 
   patches = [ ./no-chmod.patch ];
-- 
2.23.0

@lheckemann
Copy link
Member Author

I ended up not completing this because upstream updates so frequently and an impure, automatically updating expression would be better suited, and also because I'm no longer running a minecraft server.

@lheckemann
Copy link
Member Author

If you want to make a new PR, go ahead :)

@lheckemann lheckemann closed this Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants