[Backport release-26.05] xaos: add darwin,aarch64 support (#537427)

This commit is contained in:
7c6f434c 2026-07-02 06:51:20 +00:00 committed by GitHub
commit 307b8052d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "xaos";
version = "4.3.4";
version = "4.3.5";
outputs = [
"out"
"man"
@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "xaos-project";
repo = "XaoS";
tag = "release-${finalAttrs.version}";
hash = "sha256-vOFwZbdbcrcJLHUa1QzxzadPcx5GF5uNPg+MZ7NbAPc=";
hash = "sha256-dGfmX55bm2BCFl7mRit88ULAcJ0VP15yVGI7nhRH0Ig=";
};
nativeBuildInputs = [
@ -45,23 +45,21 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace src/include/config.h \
--replace-fail "/usr/share/XaoS" "${datapath}"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace XaoS.pro \
--replace-fail \
"QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64" \
"QMAKE_APPLE_DEVICE_ARCHS = ${if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"}"
'';
desktopItems = [ "xdg/xaos.desktop" ];
installPhase = ''
runHook preInstall
install -D bin/xaos "$out/bin/xaos"
postInstall = ''
mkdir -p "${datapath}"
cp -r tutorial examples catalogs "${datapath}"
install -D "xdg/xaos.png" "$out/share/icons/xaos.png"
install -D doc/xaos.6 "$man/man6/xaos.6"
runHook postInstall
'';
meta = finalAttrs.src.meta // {
@ -69,6 +67,7 @@ stdenv.mkDerivation (finalAttrs: {
mainProgram = "xaos";
homepage = "https://xaos-project.github.io/";
license = lib.licenses.gpl2Plus;
platforms = [ "x86_64-linux" ];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ coolcuber ];
};
})