From 3bb0ac8aee81e79143b832cfa3bcd81a709a3f0a Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 6 Mar 2026 13:22:54 -0500 Subject: [PATCH] clean up and final touches --- default.nix | 8 ++++---- pinepods.nix | 29 ++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/default.nix b/default.nix index acf8187..c3182ef 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,11 @@ -let +let nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; -in +in { pinepods = pkgs.callPackage ./pinepods.nix { + # Pin wasm-bindgen-cli to exactly the version PinePods requires wasm-bindgen-cli = pkgs.wasm-bindgen-cli_0_2_105; inherit (pkgs) binaryen tailwindcss_3 libayatana-appindicator gst_all_1; }; - pinepods-frontend = (pkgs.callPackage ./pinepods.nix { }).frontend; -} \ No newline at end of file +} diff --git a/pinepods.nix b/pinepods.nix index 7585aad..13e747e 100644 --- a/pinepods.nix +++ b/pinepods.nix @@ -120,7 +120,7 @@ rustPlatform.buildRustPackage { gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-ugly - gst_all_1.gst-libav # for audio codec support + gst_all_1.gst-libav ]; OPENSSL_NO_VENDOR = "1"; @@ -128,12 +128,12 @@ 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 uses frontendDist instead of dev server + # 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 - echo "=== tauri.conf.json ===" - cat $NIX_BUILD_TOP/source/web/src-tauri/tauri.conf.json | head -10 ''; installPhase = '' @@ -141,17 +141,32 @@ rustPlatform.buildRustPackage { install -Dm755 target/x86_64-unknown-linux-gnu/release/app $out/bin/pinepods + # Desktop entry if [ -f ../../pinepods.desktop ]; then - install -Dm644 ../../pinepods.desktop $out/share/applications/pinepods.desktop + install -Dm644 ../../pinepods.desktop \ + $out/share/applications/pinepods.desktop fi - for size in 32x32 64x64 128x128 256x256; do + # Icons + for size in 32x32 128x128 256x256; do if [ -f icons/''${size}.png ]; then install -Dm644 icons/''${size}.png \ $out/share/icons/hicolor/''${size}/apps/pinepods.png fi done + # Tray icon — install as the app icon so the taskbar uses it + if [ -f icons/icon.png ]; then + install -Dm644 icons/icon.png \ + $out/share/icons/hicolor/256x256/apps/com.gooseberrydevelopment.pinepods.png + fi + + # AppStream metadata + if [ -f com.gooseberrydevelopment.pinepods.metainfo.xml ]; then + install -Dm644 com.gooseberrydevelopment.pinepods.metainfo.xml \ + $out/share/metainfo/com.gooseberrydevelopment.pinepods.metainfo.xml + fi + runHook postInstall ''; @@ -160,7 +175,7 @@ rustPlatform.buildRustPackage { --set WEBKIT_DISABLE_COMPOSITING_MODE 1 \ --set WEBKIT_FORCE_SANDBOX 0 \ --prefix LD_LIBRARY_PATH : "${libayatana-appindicator}/lib" \ - --prefix GST_PLUGIN_SYSTEM_PATH_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 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 : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}" \ --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" '';