26 src = fetchFromGitHub {
30 hash = "sha256-wK0ZVJGTRp4m7nALfLzJE51juqBo8GmlK8BIQeb20ls=";
31 fetchSubmodules = true;
34 vendorHash = "sha256-mDVpxPkRGbpAtZ0jCKd3uOxwUdBqjd0kISg22JdpLpE=";
62 # Without patching, "go run" fails with the error message:
63 # package github.com/google/go-licenses: no Go files in /build/source/vendor/github.com/google/go-licenses
64 substituteInPlace scripts/build-licenses.sh --replace-fail \
65 '$GO run ''${GO_FLAGS} github.com/google/go-licenses' 'go-licenses'
67 patchShebangs scripts/
68 substituteInPlace scripts/regression-test-demo.sh \
69 --replace-fail 'sh scripts/run-timedemo.sh' "$testing_infra/scripts/run-timedemo.sh"
71 substituteInPlace Makefile --replace-fail \
72 'CPPFLAGS ?= -DNDEBUG' \
73 'CPPFLAGS ?= -DNDEBUG -D_GLFW_GLX_LIBRARY=\"${lib.getLib libGL}/lib/libGL.so\" -D_GLFW_EGL_LIBRARY=\"${lib.getLib libGL}/lib/libEGL.so\"'
78 # We can't patch in the path to libGL directly because
79 # this is a fixed output derivation and when the path to libGL
80 # changes, the hash would change.
81 # To work around this, use environment variables.
83 substituteInPlace 'vendor/github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/opengl/gl/procaddr_linbsd.go' \
88 '{"libGL.so", "libGL.so.2", "libGL.so.1", "libGL.so.0"}' \
89 '{os.Getenv("EBITENGINE_LIBGL")}' \
91 '{"libGLESv2.so", "libGLESv2.so.2", "libGLESv2.so.1", "libGLESv2.so.0"}' \
92 '{os.Getenv("EBITENGINE_LIBGLESv2")}'
103 AAAAXY_BUILD_USE_VERSION_FILE=true make $makeFlags
108 install -Dm755 'aaaaxy' -t "$out/bin/"
109 install -Dm444 'aaaaxy.svg' -t "$out/share/icons/hicolor/scalable/apps/"
110 install -Dm644 'aaaaxy.png' -t "$out/share/icons/hicolor/128x128/apps/"
111 install -Dm644 'aaaaxy.desktop' -t "$out/share/applications/"
112 install -Dm644 'io.github.divverent.aaaaxy.metainfo.xml' -t "$out/share/metainfo/"
114 wrapProgram $out/bin/aaaaxy \
115 --set EBITENGINE_LIBGL '${lib.getLib libGL}/lib/libGL.so' \
116 --set EBITENGINE_LIBGLESv2 '${lib.getLib libGL}/lib/libGLESv2.so'
118 install -Dm755 'scripts/run-timedemo.sh' -t "$testing_infra/scripts/"
119 install -Dm755 'scripts/regression-test-demo.sh' -t "$testing_infra/scripts/"
120 install -Dm644 'assets/demos/benchmark.dem' -t "$testing_infra/assets/demos/"
124 aaaaxy = nixosTests.aaaaxy;
130 description = "Nonlinear 2D puzzle platformer taking place in impossible spaces";
131 mainProgram = "aaaaxy";
132 homepage = "https://divverent.github.io/aaaaxy/";
133 license = licenses.asl20;
134 maintainers = with maintainers; [ Luflosi ];
135 platforms = platforms.linux;