Non-obvious context sits in a brief header at the top of a module, everything else uses single-line comments. niri binds use spawn-sh strings, so neon only overrides the command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
2.1 KiB
Nix
73 lines
2.1 KiB
Nix
# Stellarium for target finding, Siril for stacking.
|
|
#
|
|
# Siril's python plugins run in a venv of foreign manylinux wheels (numpy,
|
|
# PyQt6, ...), dlopened by nixpkgs python, so nix-ld doesn't help. The wrapper
|
|
# puts their libs on LD_LIBRARY_PATH, a python on PATH to bootstrap the venv,
|
|
# and adwaita-qt6 on QT_PLUGIN_PATH so the dark style override resolves.
|
|
# The python comes from /etc/siril/bin, a stable symlink: a /nix/store path
|
|
# would leave the venv dangling after the next python bump and gc.
|
|
#
|
|
# StarNet++ has no package: unzip the v2 ORT cli build from starnetastro.com
|
|
# to ~/.local/share/siril/starnet/ and point Siril's preferences at ./starnet2.
|
|
# It runs through nix-ld and finds its own libs in the bundled ./lib.
|
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
let
|
|
sirilWithPlugins = pkgs.symlinkJoin {
|
|
name = "siril-with-plugins";
|
|
paths = [ pkgs.siril ];
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
postBuild = ''
|
|
wrapProgram $out/bin/siril \
|
|
--prefix PATH : /etc/siril/bin \
|
|
--prefix QT_PLUGIN_PATH : ${pkgs.adwaita-qt6}/lib/qt-6/plugins \
|
|
--prefix LD_LIBRARY_PATH : ${
|
|
lib.makeLibraryPath (
|
|
with pkgs;
|
|
[
|
|
stdenv.cc.cc.lib # libstdc++, libgcc_s, libgomp (numpy)
|
|
zlib
|
|
zstd # PyQt6
|
|
libGL # PyQt6
|
|
# Qt needs these even on wayland
|
|
glib
|
|
fontconfig
|
|
freetype
|
|
dbus
|
|
libxkbcommon
|
|
# Qt platform plugins: wayland, and the xcb fallback
|
|
wayland
|
|
libxcb-cursor
|
|
libx11
|
|
libxcb
|
|
libxcb-util
|
|
libxcb-wm
|
|
libxcb-image
|
|
libxcb-keysyms
|
|
libxcb-render-util
|
|
]
|
|
)
|
|
}
|
|
'';
|
|
};
|
|
in
|
|
{
|
|
environment.systemPackages = [
|
|
pkgs.stellarium
|
|
sirilWithPlugins
|
|
];
|
|
|
|
# same python siril propagates, so sirilpy's abi matches
|
|
environment.etc."siril/bin/python3".source = "${pkgs.python3}/bin/python3";
|
|
|
|
# for StarNet++
|
|
programs.nix-ld = {
|
|
enable = true;
|
|
libraries = with pkgs; [
|
|
stdenv.cc.cc.lib
|
|
zlib
|
|
];
|
|
};
|
|
}
|