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

hivelytracker: init at unstable-2020-02-10 #95797

Merged
merged 1 commit into from Jan 20, 2021

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Aug 19, 2020

Motivation for this change

#81815

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@OPNA2608 here we go :)

@OPNA2608
Copy link
Contributor

2 Things:

  1. There are afew extra projects that are part of the repository, maybe you could check which one could be built and installed along the tracker itself? hvl2wav/makefile in particular looks useful, maybe also Replayer_Windows/Makefile if stdenv.hostPlatform.isWindows.

  2. This hardcodes Makefile.linux for platforms.all. I think the Darwin build stuff is under sdl/osx/xcode/(Hivelytracker.xcodeproj/), maybe this can be built with xcbuild / xcbuildHook? (The hypothetical Windows build would be sdl/Makefile.)

@fgaz
Copy link
Member Author

fgaz commented Aug 21, 2020

Thanks for the tips!

  1. good idea, will do!
    Also wow, I didn't realize there was some sort of windows support in nixpkgs. Is it even used anywhere?
  2. I first kinda wanted to see if it'd build anyway so I won't have to fiddle with xcode stuff but ofborg is still stuck...

@OPNA2608
Copy link
Contributor

I don't know how well the Windows support works, or even if it works natively. But you can select it as a cross-compilation target when building derivations and some things do compile. Be ready to hit some unsupported packages

Assuming a local checkout in ~/devel/nixpkgs/, you could target i686 Windows for a cross-compilation like so:

nix-build ~/devel/nixpkgs --arg crossSystem '(import ~/devel/nixpkgs {}).lib.systems.examples.mingw32' -A [package-name]

Gave this a shot as-is, but i didn't manage to get all dependencies to compile (hivelytracker -> SDL_ttf -> freetype static linking failure). Can't hurt to keep this in mind though.

(littlepgtracker for example gets quite far, but the Windows-specific part of the build seems to have gone unmaintained over the years so it fails on moved/missing files and instantiation of not fully implemented abstract classes.)

Comment on lines 41 to 46
NIX_CFLAGS_COMPILE =
"-I${SDL}/include/SDL \
-I${SDL_image}/include/SDL \
-I${SDL_ttf}/include/SDL \
-I${gtk2.dev}/include/gtk-2.0 \
-I${glib.dev}/include/glib-2.0";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this'd be a little nicer, assuming the Darwin version doesn't use GTK2.

Suggested change
NIX_CFLAGS_COMPILE =
"-I${SDL}/include/SDL \
-I${SDL_image}/include/SDL \
-I${SDL_ttf}/include/SDL \
-I${gtk2.dev}/include/gtk-2.0 \
-I${glib.dev}/include/glib-2.0";
NIX_CFLAGS_COMPILE = stdenv.lib.concatStringsSep " " ([
"-I${SDL}/include/SDL"
"-I${SDL_image}/include/SDL"
"-I${SDL_ttf}/include/SDL"
]
++ stdenv.lib.optionals (stdenv.hostPlatform.isLinux) [
"-I${gtk2.dev}/include/gtk-2.0"
"-I${glib.dev}/include/glib-2.0"
]);

Copy link
Member Author

Choose a reason for hiding this comment

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

We can try when the darwin builder comes back up

@fgaz
Copy link
Member Author

fgaz commented Sep 8, 2020

Added hvl2wav and cleaned up some stuff. Like with lgpt, I propose to leave cflags as is (it did build iirc) for now and try to split them later when the builder comes back up

edit: too late for the branch-off, but the builder isn't coming back, so...

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/319

@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 95797 1

1 package built:
  • hivelytracker

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 95797 run on x86_64-linux 1

1 package built:
  • hivelytracker

@SuperSandro2000 SuperSandro2000 merged commit 46e2c04 into NixOS:master Jan 20, 2021
@fgaz fgaz deleted the hivelytracker branch January 20, 2021 10:05
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

5 participants