feat(build): add nix devshell, FHS binary patching, Linux .deb packaging#45
feat(build): add nix devshell, FHS binary patching, Linux .deb packaging#45usrbinkat wants to merge 3 commits intovanloctech:mainfrom
Conversation
binary path resolution:
- reorder get_system_binary_candidates() in ffmpeg.rs, ytdlp.rs to check $PATH before /opt/homebrew/bin, /usr/local/bin, /usr/bin
- reorder get_deno_path()/check_deno_internal() in deno.rs: which/where before ~/.deno/bin
- fixes binary resolution for Nix, Homebrew, and other PATH-based environments
dev build sidecar:
- build.rs creates yt-dlp placeholder (<1024 bytes) for tauri_build::build() externalBin validation
- get_bundled_ytdlp_path() rejects placeholders under 1024 bytes
- get_ytdlp_path() falls through to system PATH as last resort in Auto mode
ffmpeg mux progress:
- add parse_ffmpeg_progress() to progress.rs matching time=HH:MM:SS, speed=Nx, Lsize=
- download.rs stderr task emits status=muxing when parse_ffmpeg_progress() matches
- add isMuxing to DownloadItem, set in DownloadContext.tsx/UniversalContext.tsx
- QueueItem.tsx/UniversalQueueItem.tsx render shimmer bar with Muxing label and speed
youtube thumbnail fallback:
- add getYouTubeVideoId() in UniversalQueueItem.tsx
- fallback to img.youtube.com/vi/{id}/mqdefault.jpg when item.thumbnail is null
- useEffect resets thumbError on item.thumbnail/item.url change
firefox profile sorting:
- add parse_firefox_profiles() to dependencies.rs
- parse Install section Default= to identify active profile path
- sort active profile first, replaces inline Name= scanning on macOS/Windows/Linux
…working - flake.nix consumes github:braincraftio/konductor #frontend devshell via inputsFrom - adds yt-dlp, ffmpeg, deno, glib-networking as runtime packages on PATH - GIO_EXTRA_MODULES set to glib-networking + dconf for WebKitGTK TLS support - .envrc provides direnv integration with cargo env sourcing - use flake commented out by default (opt-in for Nix users) - flake.lock pinned against public GitHub konductor flake
nix devshell: - flake.lock updated to konductor 84a1bcd (adds pkgs.bun) - README.md documents nix develop workflow and build instructions FHS binary portability: - scripts/patch-fhs-binary.sh patches ELF interpreter and removes RPATH - handles x86_64, aarch64, armv7l, i686 via TAURI_ENV_ARCH - derives binary path from TAURI_ENV_TARGET_TRIPLE and TAURI_ENV_DEBUG - no-op when patchelf unavailable (macOS, Windows, CI) - idempotent: skips if interpreter already FHS - tauri.conf.json beforeBundleCommand invokes the script Linux .deb packaging: - tauri.linux.conf.json overrides externalBin to [] (no bundled yt-dlp) - declares ffmpeg and yt-dlp as .deb depends (Tauri appends lib defaults) - eliminates /usr/bin/yt-dlp file conflict with apt yt-dlp package - README.md documents tomtomtom/yt-dlp PPA for current yt-dlp versions README updates: - Tauri 2 prerequisites link replaces deprecated v1 link - tech stack clarifies yt-dlp bundling is macOS/Windows only
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4d247621e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "beforeDevCommand": "bun run dev", | ||
| "beforeBuildCommand": "bun run build" | ||
| "beforeBuildCommand": "bun run build", | ||
| "beforeBundleCommand": "bash scripts/patch-fhs-binary.sh" |
There was a problem hiding this comment.
Gate Linux patch script so Windows bundles do not require bash
The new beforeBundleCommand always invokes bash scripts/patch-fhs-binary.sh, which makes tauri build depend on a Bash executable even when packaging on Windows. On Windows environments without Git Bash in PATH, bundling now fails before Tauri can build artifacts, even though the patch script is Linux-specific and intended to no-op only after it starts. Please make this command conditional for Linux (or use a cross-platform wrapper) so Windows packaging remains runnable.
Useful? React with 👍 / 👎.
Problem
Building Youwee inside a Nix devshell produces binaries with a nix store dynamic linker
(
/nix/store/.../ld-linux-x86-64.so.2) and nix store RPATH entries baked into the ELFbinary. When this binary is packaged into a
.deband installed on a standardUbuntu/Debian system, it crashes at launch because the nix linker cannot find system
libraries like
libayatana-appindicator3.so.1.Additionally, the existing
.debbundlesyt-dlpat/usr/bin/yt-dlpviaexternalBin,which conflicts with the
yt-dlpapt package —dpkgrefuses to install both.Solution
FHS binary portability (
scripts/patch-fhs-binary.sh)beforeBundleCommandintauri.conf.jsoninvokes the script aftercargo buildbut before
.debassembly/lib64/ld-linux-x86-64.so.2)TAURI_ENV_ARCH)TAURI_ENV_TARGET_TRIPLEandTAURI_ENV_DEBUGpatchelfis not on PATH (macOS, Windows, CI without Nix)Linux .deb packaging (
tauri.linux.conf.json)externalBinto[]on Linux — no bundled yt-dlp (eliminates file conflict)ffmpegandyt-dlpas.debdependencies (Tauri auto-appendslibayatana-appindicator3-1,libwebkit2gtk-4.1-0,libgtk-3-0)apt install ./Youwee.debpulls runtime deps automaticallyNix devshell (
flake.nix,flake.lock,.envrc)flake.nixconsumesgithub:braincraftio/konductorfrontend devshell viainputsFromyt-dlp,ffmpeg,deno,glib-networkingas runtime packagesGIO_EXTRA_MODULESfor WebKitGTK TLS support (without this, HTTPS imageloads fail with "TLS support is not available")
flake.lockpinned to konductor rev84a1bcd(includespkgs.bun).envrcprovides optional direnv integrationREADME updates
tomtomtom/yt-dlpPPA for current yt-dlp on Ubuntu/Debiannix developbuild workflowTest plan
nix developenters devshell with bun, cargo, rustc, all Tauri depsbun run tauri devlaunches development build with working thumbnails and TLSbun run tauri build -b debproduces.debwith FHS-patched binarybeforeBundleCommandoutput confirms interpreter patched from nix store to/lib64/ld-linux-x86-64.so.2.debdeclares correct depends:ffmpeg, yt-dlp, libayatana-appindicator3-1, libwebkit2gtk-4.1-0, libgtk-3-0.debcontains no bundled yt-dlp binary (no file conflict with apt)sudo apt install ./Youwee.debpulls yt-dlp + ffmpeg automatically