From b295a9a330143b97e0fab158981ae73eea65e797 Mon Sep 17 00:00:00 2001 From: aaron Date: Sat, 20 Jun 2026 18:11:34 +0200 Subject: [PATCH] feature(siril): make siril plugins work by exposing shared objects --- modules/nixos/astro.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/nixos/astro.nix b/modules/nixos/astro.nix index 6d96d69..a1ba344 100644 --- a/modules/nixos/astro.nix +++ b/modules/nixos/astro.nix @@ -1,10 +1,27 @@ { config, lib, pkgs, ... }: +let + # Siril's Python plugins (sirilpy) run in a venv that pip-installs foreign + # manylinux wheels (numpy, GraXpert deps, ...). Those .so files need + # libstdc++ at runtime. nix-ld does NOT cover this: it only handles the + # initial exec of a foreign binary, but here a *native* nixpkgs python + # dlopen()s the foreign wheel. So we put the libs on LD_LIBRARY_PATH, which + # the python subprocess inherits from the Siril process. + sirilWithPlugins = pkgs.symlinkJoin { + name = "siril-with-plugins"; + paths = [ pkgs.siril ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/siril \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib pkgs.zlib ]} + ''; + }; +in { # install stellarium for target finding and siril for stacking environment.systemPackages = with pkgs; [ stellarium - siril + sirilWithPlugins ]; # StarNet++ has no nixpkgs package. Download the StarNet v2 ORT CLI build