added module options

This commit is contained in:
2026-03-07 09:15:30 -05:00
parent 7d9ecb8823
commit d7419bcf3b
4 changed files with 63 additions and 6 deletions

View File

@@ -26,6 +26,8 @@
, makeWrapper
, libayatana-appindicator
, gst_all_1
, python3
, serverUrl ? ""
}:
let
@@ -96,6 +98,7 @@ rustPlatform.buildRustPackage {
pkg-config
wrapGAppsHook3
makeWrapper
python3
];
buildInputs = [
@@ -128,12 +131,11 @@ rustPlatform.buildRustPackage {
preBuild = ''
chmod -R u+w $NIX_BUILD_TOP/source
# Link the pre-built frontend where tauri.conf.json expects it
ln -s ${frontend} $NIX_BUILD_TOP/source/web/dist
# Remove devUrl so Tauri serves embedded assets instead of connecting to a dev server
sed -i '/"devUrl"/d' $NIX_BUILD_TOP/source/web/src-tauri/tauri.conf.json
# Patch lib.rs to read PINEPODS_SERVER env var and navigate to it on startup
python3 ${./patch-lib.py} $NIX_BUILD_TOP/source/web/src-tauri/src/lib.rs
'';
installPhase = ''
@@ -187,7 +189,8 @@ rustPlatform.buildRustPackage {
postFixup = ''
wrapProgram $out/bin/pinepods \
--set WEBKIT_DISABLE_COMPOSITING_MODE 1 \
--set WEBKIT_FORCE_SANDBOX 0 \
--set WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS 1 \
${lib.optionalString (serverUrl != "") "--set PINEPODS_SERVER \"${serverUrl}\""} \
--prefix LD_LIBRARY_PATH : "${libayatana-appindicator}/lib" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "${gst_all_1.gstreamer}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-base}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-good}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-bad}/lib/gstreamer-1.0:${gst_all_1.gst-plugins-ugly}/lib/gstreamer-1.0:${gst_all_1.gst-libav}/lib/gstreamer-1.0" \
--prefix XDG_DATA_DIRS : "$out/share" \