20 stdenv.mkDerivation rec {
24 src = fetchFromGitHub {
28 hash = "sha256-JuqnLLD5+Ec8kQI0SK98V1O6TTbGM6+yKn5KCHe85eM=";
32 # Pull fix pending upstream inclusion for -fno-common toolchains:
33 # https://github.com/gak/gravit/pull/100
35 name = "fno-common.patch";
36 url = "https://github.com/gak/gravit/commit/0f848834889212f16201fd404d2d5b9bb5b47d23.patch";
37 hash = "sha256-k1aMIg7idMt53o6dFgIKJflOMp0Jp5NwgWEijcIwXrQ=";
61 # Build fails on Linux with windres.
62 export ac_cv_prog_WINDRES=
65 enableParallelBuilding = true;
68 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
69 homepage = "https://github.com/gak/gravit";
70 description = "Beautiful OpenGL-based gravity simulator";
71 mainProgram = "gravit";
72 license = lib.licenses.gpl2Plus;
75 Gravit is a gravity simulator which runs under Linux, Windows and
76 macOS. It uses Newtonian physics using the Barnes-Hut N-body
77 algorithm. Although the main goal of Gravit is to be as accurate
78 as possible, it also creates beautiful looking gravity patterns.
79 It records the history of each particle so it can animate and
80 display a path of its travels. At any stage you can rotate your
81 view in 3D and zoom in and out.
84 inherit (mesa.meta) platforms;
85 hydraPlatforms = lib.platforms.linux; # darwin times out