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