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: 2015-07-24 -> 2.1.5965 (closes #68123) #68175

Merged
merged 1 commit into from Sep 20, 2019

Conversation

hyperfekt
Copy link
Contributor

@hyperfekt hyperfekt commented Sep 5, 2019

Motivation for this change

Closes #68123.
Opened in WIP because its 'final form' is blocked on external input and so people can already use it and packaging effort isn't duplicated.

Things to do
  • Get a fixed URL for the debian package or use the normal package and pull the icon from AUR.
  • Fix narrator (libfliteWrapper.so)
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 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @cpages @ryantm @infinisil

@worldofpeace
Copy link
Contributor

We can't we use the

"https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_2.1.5965.tar.gz" 

url?

@worldofpeace
Copy link
Contributor

The flatpak uses that URL
https://github.com/flathub/com.mojang.Minecraft/blob/master/com.mojang.Minecraft.json#L65

I recommend just fetching the flathub repo and installing their desktop integrations.
Directories for those files are like this

@hyperfekt
Copy link
Contributor Author

hyperfekt commented Sep 6, 2019

Thank you for the review!
As you may have noticed the .tar.gz package doesn't include icons; and I wanted to avoid depending on some third party repository for our build, but we may have to if we don't get a permalink to the .deb.

@infinisil
Copy link
Member

To use the tar.gz url, since there's only a single icon (that probably won't ever change), we can just embed it as nixpkgs/pkgs/games/minecraft/minecraft-launcher.svg, and for the desktop item we can use makeDesktopItem.

@worldofpeace
Copy link
Contributor

worldofpeace commented Sep 6, 2019

I think this json file has links to the launcher files

I see no mention of a permalink for a debian file. Perhaps looking at an ubuntu ppa could yield some info. I've also looked at all references to minecraft launcher on repology and they either use that link to the debian file, the one I've mentioned, or completely vendor the binary. I don't think we technically lose anything from fetching the files from flathub, it would be much worse to add them in tree.
Not to mention the icon in the debian file isn't exactly very valuable, it's just one and symbolic, flathub has better data there anyway.

@hyperfekt
Copy link
Contributor Author

hyperfekt commented Sep 6, 2019

That JSON URL seems pretty useful to write an update script!

What we do lose by fetching from flathub is the ability for the build to succeed even if flathub doesn't provide those files anymore.
I looked at the terms provided by Mojang and couldn't find something that unambiguously grants us the right to redistribute the icon, [EDIT: so I wouldn't want to embed it in the repository like @infinisil suggested,] but I'm not really well versed in legal stuff.

@worldofpeace
Copy link
Contributor

We don't distribute this. And it's a git repo, only thing you'd worry about is it being completely deleted.
And then you could vendor the meta data. Also not sure if that's even the icon used by them and not custom one's. Technical viewpoint, it's very cheap to just fetch another repo.

@infinisil
Copy link
Member

infinisil commented Sep 6, 2019

See #68123 (comment). We should switch the launchers license from unfreeRedistributable (which never actually worked anyways) to unfree. And we can't fetch from flatpack because what they're doing isn't technically legal.

For the icon, @peterix indicated an offer to put it at an official url for grabs.

@pstn
Copy link
Contributor

pstn commented Sep 6, 2019

Is this just about the official minecraft icon? If it's the same as the website, you could always fetch the archived version from today by archive.org. IANAL but I think their archiving and us fetching said archive is both perfectly legal (as long as we don't redistribute).

@hyperfekt
Copy link
Contributor Author

If it's the same as the website

Unfortunately not, we need the transparency. But it looks like we'll get a fixed path to the icon or something that includes it.

@worldofpeace worldofpeace added this to the 19.09 milestone Sep 14, 2019
@cpages
Copy link
Contributor

cpages commented Sep 17, 2019

@infinisil are you still waiting for upstream, for the icon?

@infinisil
Copy link
Member

That would be nice yeah, I'm not sure if there's a legally correct way to get the icon without it

@peterix
Copy link

peterix commented Sep 18, 2019

Here you go:

$ wget https://launcher.mojang.com/download/minecraft-launcher.svg
$ sha256sum minecraft-launcher.svg

35c2bcaeb09fa4b8864e9422fd66bf60847706f8b4400ec4a66ba6436b101f71 minecraft-launcher.svg

$ sha1sum minecraft-launcher.svg

387fbc45b62412fcb75f8611a9f889d3418fd954 minecraft-launcher.svg

$ md5sum minecraft-launcher.svg

0b104e3049346908bf559cab602071e3 minecraft-launcher.svg


@infinisil
Copy link
Member

Thanks a lot! ❤️

switched to the new official launcher, renamed to minecraft-launcher,
and added an update script
@hyperfekt hyperfekt changed the title [WIP] minecraft: 2015-07-24 -> 2.1.5965 (closes #68123) minecraft: 2015-07-24 -> 2.1.5965 (closes #68123) Sep 18, 2019
@hyperfekt
Copy link
Contributor Author

hyperfekt commented Sep 18, 2019

Thanks a lot @peterix!
I added an update script to check the latest version on AUR, since that JSON API from mojang.com lists an outdated one.
From my side this is ready to merge.

@worldofpeace worldofpeace added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 18, 2019
Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

@infinisil infinisil merged commit c545e85 into NixOS:master Sep 20, 2019
@infinisil
Copy link
Member

infinisil commented Sep 20, 2019

Backported to 19.09 in 10903f5

@worldofpeace
Copy link
Contributor

Is 19.03 affected?

@infinisil
Copy link
Member

Yeah, I'll backport to 19.03 too

@infinisil
Copy link
Member

Backported to 19.03 in 7086c81

dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Sep 21, 2019
minecraft: 2015-07-24 -> 2.1.5965 (closes NixOS#68123)
(cherry picked from commit c545e85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minecraft: Launcher is stuck at "Preparing..."
6 participants