From a31af32aba1f5307516430e9587cb5e008f721fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=91=B7=F0=9D=92=89=F0=9D=92=8A=F0=9D=92=8D?= =?UTF-8?q?=F0=9D=92=90=F0=9D=92=84=F0=9D=92=82=F0=9D=92=8D=F0=9D=92=9A?= =?UTF-8?q?=F0=9D=92=94=F0=9D=92=95?= Date: Sat, 16 May 2026 16:18:01 -0400 Subject: [PATCH 1/3] endless-sky: added maintainer --- pkgs/by-name/en/endless-sky/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/en/endless-sky/package.nix b/pkgs/by-name/en/endless-sky/package.nix index a33b87f1e4d2..3073e049527c 100644 --- a/pkgs/by-name/en/endless-sky/package.nix +++ b/pkgs/by-name/en/endless-sky/package.nix @@ -79,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ _360ied lilacious + philocalyst ]; platforms = lib.platforms.linux; # Maybe other non-darwin Unix }; From b07de494a9f939f72c8bbdaf1a88c694f413fb1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=91=B7=F0=9D=92=89=F0=9D=92=8A=F0=9D=92=8D?= =?UTF-8?q?=F0=9D=92=90=F0=9D=92=84=F0=9D=92=82=F0=9D=92=8D=F0=9D=92=9A?= =?UTF-8?q?=F0=9D=92=94=F0=9D=92=95?= Date: Tue, 19 May 2026 16:39:21 -0400 Subject: [PATCH 2/3] endless-sky: meta expansion --- pkgs/by-name/en/endless-sky/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/en/endless-sky/package.nix b/pkgs/by-name/en/endless-sky/package.nix index 3073e049527c..2ee41e32bb33 100644 --- a/pkgs/by-name/en/endless-sky/package.nix +++ b/pkgs/by-name/en/endless-sky/package.nix @@ -68,8 +68,17 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Sandbox-style space exploration game similar to Elite, Escape Velocity, or Star Control"; + longDescription = '' + Endless Sky is a sandbox-style space exploration game. You start as the captain + of a tiny spaceship and can choose what to do from there. The game includes a + major plot line and many minor missions, but you can play as a merchant, bounty + hunter, or explorer entirely at your own discretion. Trade goods between star + systems, upgrade your ship, recruit a fleet, and uncover alien civilisations + beyond the boundaries of human space. + ''; mainProgram = "endless-sky"; homepage = "https://endless-sky.github.io/"; + changelog = "https://github.com/endless-sky/endless-sky/blob/v${finalAttrs.version}/changelog"; license = with lib.licenses; [ gpl3Plus cc-by-sa-30 @@ -81,6 +90,6 @@ stdenv.mkDerivation (finalAttrs: { lilacious philocalyst ]; - platforms = lib.platforms.linux; # Maybe other non-darwin Unix + platforms = lib.platforms.all; }; }) From 5f4f745104cddc7fa223627a28c441075ce8b5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=91=B7=F0=9D=92=89=F0=9D=92=8A=F0=9D=92=8D?= =?UTF-8?q?=F0=9D=92=90=F0=9D=92=84=F0=9D=92=82=F0=9D=92=8D=F0=9D=92=9A?= =?UTF-8?q?=F0=9D=92=94=F0=9D=92=95?= Date: Tue, 19 May 2026 16:39:44 -0400 Subject: [PATCH 3/3] endless-sky: full darwin support --- pkgs/by-name/en/endless-sky/package.nix | 61 ++++++++++++++++++++----- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/en/endless-sky/package.nix b/pkgs/by-name/en/endless-sky/package.nix index 2ee41e32bb33..038294f7d0a4 100644 --- a/pkgs/by-name/en/endless-sky/package.nix +++ b/pkgs/by-name/en/endless-sky/package.nix @@ -16,6 +16,8 @@ libmad, libuuid, minizip, + libicns, + apple-sdk_15, nix-update-script, }: @@ -30,23 +32,44 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-QXLIHAAdpK6lvKv0471KsiB+B06RKUfYoUNYKi8NAlg="; }; - patches = [ + patches = lib.optionals stdenv.hostPlatform.isLinux [ ./fixes.patch ]; - postPatch = '' - # the trailing slash is important!! - # endless sky naively joins the paths with string concatenation - # so it's essential that there be a trailing slash on the resources path - substituteInPlace source/Files.cpp \ - --replace-fail '%NIXPKGS_RESOURCES_PATH%' "$out/share/games/endless-sky/" - ''; + postPatch = + lib.optionalString stdenv.hostPlatform.isLinux '' + # the trailing slash is important!! + # endless sky naively joins the paths with string concatenation + # so it's essential that there be a trailing slash on the resources path + substituteInPlace source/Files.cpp \ + --replace-fail '%NIXPKGS_RESOURCES_PATH%' "$out/share/games/endless-sky/" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # iconutil is a macOS SDK tool unavailable in the nix sandbox; + # replace with png2icns from libicns for equivalent icns generation + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'iconutil -c icns -o icons/endless-sky.icns icons/endless-sky.iconset' \ + 'png2icns icons/endless-sky.icns icons/endless-sky.iconset/icon_16x16.png icons/endless-sky.iconset/icon_32x32.png icons/endless-sky.iconset/icon_128x128.png icons/endless-sky.iconset/icon_256x256.png icons/endless-sky.iconset/icon_512x512.png' + + # cmake's find_path(UUID_INCLUDE uuid/uuid.h) resolves to + # Kernel.framework/Headers and adds it with -I, shadowing libcxx's + # stddef.h. uuid/uuid.h is already in usr/include/uuid/ via the SDK + # sysroot, so no explicit include dir is needed. + substituteInPlace CMakeLists.txt \ + --replace-fail \ + 'target_include_directories(ExternalLibraries INTERFACE "''${UUID_INCLUDE}")' \ + "" + ''; enableParallelBuilding = true; nativeBuildInputs = [ cmake pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + libicns ]; buildInputs = [ @@ -55,15 +78,31 @@ stdenv.mkDerivation (finalAttrs: { libpng libjpeg libogg - libx11 flac - glew openal libmad - libuuid minizip + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libx11 + glew + libuuid + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_15 ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ + (lib.cmakeBool "ES_USE_VCPKG" false) + (lib.cmakeBool "ES_CREATE_BUNDLE" true) + ]; + + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p "$out/Applications" "$out/bin" + mv "$out/Endless Sky.app" "$out/Applications/" + ln -s "$out/Applications/Endless Sky.app/Contents/MacOS/Endless Sky" "$out/bin/endless-sky" + ''; + passthru.updateScript = nix-update-script { }; meta = {