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

openmw-tes3mp: init at 0.6.0 #27646

Closed
wants to merge 6 commits into from
Closed

openmw-tes3mp: init at 0.6.0 #27646

wants to merge 6 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 25, 2017

Motivation for this change

Multiplayer for TES3:Morrowind based on OpenMW

Things done

Please check what applies. Note that these are not hard requirements but mereley serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@ghost ghost changed the title Openmw tes3mp openmw-tes3mp: init at 2017-07-20 Jul 25, 2017
@ghost
Copy link
Author

ghost commented Jul 25, 2017

/cc @abbradar

@abbradar
Copy link
Member

Unfortunately leaveDotGit makes fetchgit nondeterministic now (I have hash mismatches, for example). Can we get by without using it? For example in ejabberd I provide fakegit which emulates required commands without using .git.

P.S.: Next time when you submit such a PR please prepend a warning about being potentially hazardous to people's free time :D

@ghost
Copy link
Author

ghost commented Jul 27, 2017

@abbradar Got rid of that stuff, thank you! It was useful only for further possible invocations of tes3mp-deploy.sh by user. This overall doesn't fit nixpkgs way, instead user may just override this package.

@abbradar
Copy link
Member

More problems: there are invalid symlinks in the installation:

lrwxrwxrwx    2 root root      131 Jan  1  1970 tes3mp-server-default.cfg -> /tmp/nix-build-tes3mp-2017-07-20.drv-0/TES3MP-deploy-7ad5339d044368550d061b3765c264cb670b2f39-src/keepers/tes3mp-server-default.cfg
lrwxrwxrwx    2 root root      131 Jan  1  1970 tes3mp-client-default.cfg -> /tmp/nix-build-tes3mp-2017-07-20.drv-0/TES3MP-deploy-7ad5339d044368550d061b3765c264cb670b2f39-src/keepers/tes3mp-client-default.cfg
lrwxrwxrwx 2 root root 113 Jan  1  1970 examples/resources -> /tmp/nix-build-tes3mp-2017-07-20.drv-0/TES3MP-deploy-7ad5339d044368550d061b3765c264cb670b2f39-src/build/resources

Because of this tes3mp-server doesn't run.

@abbradar
Copy link
Member

While you are at it, could you also make /bin with needed binaries symlinked? That way it could be installed and used from the system profile.

@ghost ghost changed the title openmw-tes3mp: init at 2017-07-20 [WIP] openmw-tes3mp: init at 2017-07-20 Jul 31, 2017
@ghost ghost closed this Jul 31, 2017
@ghost ghost deleted the openmw-tes3mp branch July 31, 2017 09:29
@abbradar
Copy link
Member

@gnidorah Why close?

@ghost ghost restored the openmw-tes3mp branch July 31, 2017 09:39
@ghost
Copy link
Author

ghost commented Jul 31, 2017

@abbradar Will re-open and notify you when finish on this. Thanks!

@ghost ghost reopened this Aug 1, 2017
@ghost ghost changed the title [WIP] openmw-tes3mp: init at 2017-07-20 openmw-tes3mp: init at 0.6.0 Aug 1, 2017
@ghost
Copy link
Author

ghost commented Aug 1, 2017

@abbradar This is what works for me. Is leaveDotGit = false absolutely required? Because, the build is non-deterministic either way.

Regarding testing, most of servers today do periodic updates by script and run 0.6.0-current, not release. The game seems to use strict revision client-server matching, so only few servers will be available for gameplay. Self hosting and package override are another options, of course.

@abbradar
Copy link
Member

abbradar commented Aug 1, 2017

@gnidorah The problem is that with leaveDotGit hashes change constantly (i.e. to build the game one needs to override the hash in nixpkgs to a different one -- each time). That's worse than just being nondeterministic ;_; What do we need .git left for?

Anyway thank you for the update; I'll test it shortly!

@ghost
Copy link
Author

ghost commented Aug 1, 2017

@abbradar Oh, didn't know... .git is left for revision check, just didn't noticed it until tried to connect to public servers. So it's to add hash info during build https://github.com/TES3MP/TES3MP/blob/master/cmake/GitVersion.cmake
without hash stored you will not able to connect to any public server.
I will add your solution then.

@abbradar
Copy link
Member

abbradar commented Aug 1, 2017

@gnidorah Ah, I got it. You can workaround this by making a fake git:

  fakegit = writeScriptBin "git" ''
    #! ${stdenv.shell}
    if [ "$*" = "describe --tags --long" ]; then
      echo "${version}-unknown"
    elif [ "$*" = "rev-parse HEAD" ]; then
      if [ "$(dirname "$(pwd)")" = "xml" ]; then
        echo "${xmlRev}"
      else
        echo "${rev}"
      fi
    elif [ "$*" = "rev-parse HEAD:library/xml" ]; then
      echo "${xmlRev}"
    else
      exit 1
    fi
  '';

(it's an example from dfhack).

@ghost
Copy link
Author

ghost commented Aug 1, 2017

@abbradar Done, thanks!

@abbradar
Copy link
Member

abbradar commented Aug 1, 2017

@gnidorah See https://github.com/gnidorah/nixpkgs/pull/1. I was able to run a server and connect!

@abbradar
Copy link
Member

abbradar commented Aug 1, 2017

@gnidorah Does it work for you with my changes? If yes, I'll merge.

@ghost
Copy link
Author

ghost commented Aug 1, 2017

@abbradar Thank you much! Will test right now

@ghost
Copy link
Author

ghost commented Aug 1, 2017

@abbradar Works fine. Public servers work too (e.g. Dark Side of Chim). Thanks much for you time and help!

@abbradar
Copy link
Member

abbradar commented Aug 1, 2017

Pushed as b5057f7 and others. Thank you for your contribution ^_^

@abbradar abbradar closed this in b5057f7 Aug 1, 2017
@ghost ghost deleted the openmw-tes3mp branch August 1, 2017 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant