Merge pull request #280042 from Luflosi/update/aaaaxy
aaaaxy: 1.4.119 -> 1.4.137
This commit is contained in:
commit
50c2926726
@ -2,7 +2,7 @@
|
|||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, alsa-lib
|
, alsa-lib
|
||||||
, libglvnd
|
, libGL
|
||||||
, libX11
|
, libX11
|
||||||
, libXcursor
|
, libXcursor
|
||||||
, libXext
|
, libXext
|
||||||
@ -14,26 +14,27 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, zip
|
, zip
|
||||||
, advancecomp
|
, advancecomp
|
||||||
|
, makeWrapper
|
||||||
, nixosTests
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "aaaaxy";
|
pname = "aaaaxy";
|
||||||
version = "1.4.119";
|
version = "1.4.137";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "divVerent";
|
owner = "divVerent";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-M+HNYQl53vQZdKn/CyF5OZPyKGq/4A9DPoDV3fRdWMY=";
|
hash = "sha256-noKAf+Xd6yW45+0gtKBlRwCKNGCg7YBbWswOP7clv+M=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-NoWfCn9P/i/8Xv0w2wqTFG3yoayGzc1TyF02zANP7Rg=";
|
vendorHash = "sha256-ig5ai28PR3VJUoVGexlfP2OMYmKI0qltTot4zIqfdO4=";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
libglvnd
|
libGL
|
||||||
libX11 libXcursor libXext libXi libXinerama libXrandr
|
libX11 libXcursor libXext libXi libXinerama libXrandr
|
||||||
libXxf86vm
|
libXxf86vm
|
||||||
];
|
];
|
||||||
@ -43,6 +44,7 @@ buildGoModule rec {
|
|||||||
pkg-config
|
pkg-config
|
||||||
zip
|
zip
|
||||||
advancecomp
|
advancecomp
|
||||||
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "testing_infra" ];
|
outputs = [ "out" "testing_infra" ];
|
||||||
@ -56,8 +58,28 @@ buildGoModule rec {
|
|||||||
patchShebangs scripts/
|
patchShebangs scripts/
|
||||||
substituteInPlace scripts/regression-test-demo.sh \
|
substituteInPlace scripts/regression-test-demo.sh \
|
||||||
--replace 'sh scripts/run-timedemo.sh' "$testing_infra/scripts/run-timedemo.sh"
|
--replace 'sh scripts/run-timedemo.sh' "$testing_infra/scripts/run-timedemo.sh"
|
||||||
|
|
||||||
|
substituteInPlace Makefile --replace \
|
||||||
|
'CPPFLAGS ?= -DNDEBUG' \
|
||||||
|
'CPPFLAGS ?= -DNDEBUG -D_GLFW_GLX_LIBRARY=\"${lib.getLib libGL}/lib/libGL.so\" -D_GLFW_EGL_LIBRARY=\"${lib.getLib libGL}/lib/libEGL.so\"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
overrideModAttrs = (_: {
|
||||||
|
# We can't patch in the path to libGL directly because
|
||||||
|
# this is a fixed output derivation and when the path to libGL
|
||||||
|
# changes, the hash would change.
|
||||||
|
# To work around this, use environment variables.
|
||||||
|
postBuild = ''
|
||||||
|
substituteInPlace 'vendor/github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/opengl/gl/procaddr_others.go' \
|
||||||
|
--replace \
|
||||||
|
'{"libGL.so", "libGL.so.2", "libGL.so.1", "libGL.so.0"}' \
|
||||||
|
'{os.Getenv("EBITENGINE_LIBGL")}' \
|
||||||
|
--replace \
|
||||||
|
'{"libGLESv2.so", "libGLESv2.so.2", "libGLESv2.so.1", "libGLESv2.so.0"}' \
|
||||||
|
'{os.Getenv("EBITENGINE_LIBGLESv2")}'
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"BUILDTYPE=release"
|
"BUILDTYPE=release"
|
||||||
];
|
];
|
||||||
@ -75,6 +97,10 @@ buildGoModule rec {
|
|||||||
install -Dm644 'aaaaxy.desktop' -t "$out/share/applications/"
|
install -Dm644 'aaaaxy.desktop' -t "$out/share/applications/"
|
||||||
install -Dm644 'io.github.divverent.aaaaxy.metainfo.xml' -t "$out/share/metainfo/"
|
install -Dm644 'io.github.divverent.aaaaxy.metainfo.xml' -t "$out/share/metainfo/"
|
||||||
|
|
||||||
|
wrapProgram $out/bin/aaaaxy \
|
||||||
|
--set EBITENGINE_LIBGL '${lib.getLib libGL}/lib/libGL.so' \
|
||||||
|
--set EBITENGINE_LIBGLESv2 '${lib.getLib libGL}/lib/libGLESv2.so'
|
||||||
|
|
||||||
install -Dm755 'scripts/run-timedemo.sh' -t "$testing_infra/scripts/"
|
install -Dm755 'scripts/run-timedemo.sh' -t "$testing_infra/scripts/"
|
||||||
install -Dm755 'scripts/regression-test-demo.sh' -t "$testing_infra/scripts/"
|
install -Dm755 'scripts/regression-test-demo.sh' -t "$testing_infra/scripts/"
|
||||||
install -Dm644 'assets/demos/benchmark.dem' -t "$testing_infra/assets/demos/"
|
install -Dm644 'assets/demos/benchmark.dem' -t "$testing_infra/assets/demos/"
|
||||||
|
Loading…
Reference in New Issue
Block a user