Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

336.1. celestia-1.7.0.git20260926

Real-time 3D space simulator — fly through the solar system, the stars and the galaxies

Version 1.7.0.git20260926, release 1
Shelf astronomy — Astronomy, planetaria, ephemerides, FITS and satellite prediction
Phase 44_apps (Applications), 8 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://celestiaproject.space/
Build time 12.0 SBU
Installed size 8.8 MiB in 72 files
Recipe ports/core/astronomy/celestia/kpkgbuild

About

Celestia is a real-time 3D space simulator: it flies from the planets of the solar system out to the stars and galaxies, at any date, and runs scripted tours. The source is upstream’s git tree at a fixed commit. The package installs two programs over one engine, celestia-qt6 with the full Qt 6 interface and celestia-sdl, a lighter SDL one with a Dear ImGui overlay. The catalogues, textures and models it draws come from celestia-content.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtwayland, sdl2-compat, libglvnd, libepoxy, eigen, fmt, libpng, libjpeg-turbo, lua, freetype2, icu, boost, gperf, ffmpeg, libavif, imagemagick, ttf-dejavu, celestia-content, cspice.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install celestia'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/astronomy/celestia.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/astronomy/celestia
echo 'b8779c69b577cf5ed1a6b2e3f64386d562d03f9ccadc2eccf56c36bf6cbb3bfb  celestia-1.7.0.git20260926.tar.gz' | sha256sum -c -
echo 'e7881abd9544100f2aa66fcee80e92f18a15b74455c33334613d8c965922c53d  imgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz' | sha256sum -c -
echo '1a3a79b80fc6f0b0cc155e28b954a598e0ddfa2db64e2afa8466be88c476fa55  miniaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/celestia
SRC=$SRC_ROOT/celestia-1.7.0.git20260926
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf celestia-1.7.0.git20260926.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf imgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf miniaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.tar.gz -C "$SRC_ROOT"

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _commit, _imgui, _miniaudio and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/app-id.patch"

cp -a "$SRC_ROOT/imgui-$_imgui/." thirdparty/imgui/
cp -a "$SRC_ROOT/miniaudio-$_miniaudio/." thirdparty/miniaudio/

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D ENABLE_QT6=ON \
	-D ENABLE_SDL=ON \
	-D ENABLE_CELX=ON \
	-D ENABLE_FFMPEG=ON \
	-D ENABLE_LIBAVIF=ON \
	-D ENABLE_MINIAUDIO=ON \
	-D ENABLE_NLS=OFF \
	-D ENABLE_SPICE=ON \
	-D ENABLE_TOOLS=OFF \
	-D ENABLE_TESTS=OFF \
	-D ENABLE_GLES=OFF \
	-D CMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

rm -rf "$PKG/usr/share/celestia/locale"
ln -sf /usr/share/fonts/TTF/DejaVuSans.ttf "$PKG/usr/share/celestia/fonts/DejaVuSans.ttf"
ln -sf /usr/share/fonts/TTF/DejaVuSans-Bold.ttf "$PKG/usr/share/celestia/fonts/DejaVuSans-Bold.ttf"

install -d "$PKG/usr/share/icons/hicolor/128x128/apps"
magick celestia-logo.png -resize 128x128 \
	"$PKG/usr/share/icons/hicolor/128x128/apps/celestia.png"

install -Dm644 /dev/stdin "$PKG/usr/share/mime/packages/kdos-celestia.xml" <<'MIMEXML'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-celestia-script">
    <comment>Celestia script</comment>
    <sub-class-of type="text/plain"/>
    <glob pattern="*.cel"/>
    <glob pattern="*.celx"/>
  </mime-type>
</mime-info>
MIMEXML
rm -f "$PKG"/usr/share/applications/space.celestiaproject.celestia_*.desktop
cat > "$PKG/usr/share/applications/space.celestiaproject.celestia_qt6.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Celestia
GenericName=Space Simulator
Comment=Explore the universe in a detailed 3D space simulation
TryExec=celestia-qt6
Exec=celestia-qt6 %f
Icon=celestia
Terminal=false
StartupWMClass=space.celestiaproject.celestia_qt6
MimeType=application/x-celestia-script;
Categories=Qt;Education;Science;Astronomy;
Keywords=astronomy;space;planets;stars;galaxy;simulator;celestia;
DESKTOP
cat > "$PKG/usr/share/applications/space.celestiaproject.celestia_sdl.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Celestia (SDL)
GenericName=Space Simulator
Comment=Explore the universe, with the light SDL interface
TryExec=celestia-sdl
Exec=celestia-sdl
Path=/usr/share/celestia
Icon=celestia
Terminal=false
StartupWMClass=space.celestiaproject.celestia_sdl
Categories=Education;Science;Astronomy;
Keywords=astronomy;space;planets;stars;galaxy;simulator;celestia;
DESKTOP
chmod 644 "$PKG"/usr/share/applications/space.celestiaproject.celestia_*.desktop

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/celestia, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf celestia-1.7.0.git20260926-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/celestia, and runs the triggers its paths call for.

Contents

Installed programs: celestia-qt6, celestia-sdl.

Installed libraries: libcelestia.so.

Installed directories: /usr/share/celestia/fonts, /usr/share/celestia/help, /usr/share/celestia/images, /usr/share/celestia/scripts, /usr/share/celestia/shaders, /usr/share/celestia/splash, /usr/share/licenses/celestia.

Short descriptions

celestia-qt6 A real-time visual space simulation
celestia-sdl A real-time visual space simulation

Notes

app-id.patch gives every window the Wayland app id of the desktop entry it is started from: space.celestiaproject.celestia_qt6 for the Qt interface, set before the splash screen, and space.celestiaproject.celestia_sdl for the SDL one, through the SDL_APP_ID hint. KWin finds a Wayland window’s icon only in the entry whose file name is its app id, and these are the file names upstream’s entries and metainfo launchables use. Unpatched, the Qt interface sets celestia-qt6 only after the splash, and SDL takes the executable’s name.

GitHub’s archive of a commit carries no git submodules, and thirdparty/imgui and thirdparty/miniaudio are submodules. The recipe fetches each at the commit in _imgui and _miniaudio, and build.sh copies them into place before the configure. Those two must be the commits the Celestia tree at _commit pins for its submodules, so a bump of _commit moves them to whatever the new tree pins.

After the install, build.sh: