mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
70c2fdfbf9
* feat(linux): session GDK defaults, nvidia-quirk, optional x11-legacy wrap Ship PSYSONIC_ALLOW_NATIVE_GDK from Nix/AUR instead of pinning WEBKIT_DISABLE_* and GDK x11. Add flake psysonic-x11-legacy for the old wrap; alias gdk-session to psysonic. Startup uses webkit2gtk-nvidia-quirk and Wayland-aware compositing; refresh Help (a45) and nixos-install docs. * fix(linux): session GDK and nvidia-quirk only; drop wrapper env heuristics Remove PSYSONIC_ALLOW_NATIVE_GDK and devShell GDK/WEBKIT exports; stop synthesizing GDK/WebKit vars in main.rs. Update Nix/AUR wrappers, install docs, CHANGELOG, and help FAQ with practical user-facing workarounds. * fix(linux): X11-pinned GDK uses DMABUF quirk path, not Wayland explicit-sync When GDK_BACKEND is forced to x11 on a wayland user session, webkit2gtk-nvidia-quirk would still apply __NV_DISABLE_EXPLICIT_SYNC and gray out the webview. Map that case to WEBKIT_DISABLE_DMABUF_RENDERER like native X11. * fix(ui): stabilize WebKitGTK/Wayland hover paint for nav and media cards Sidebar nav links avoid transition:all and promote icons with translateZ(0). Artist rows and album/artist/song cards use compositing hints; card shadows and borders no longer interpolate so cover zoom can stay smooth without jitter. * fix(ui): isolate artist/album card text and cover paint on WebKitGTK Promote cover blocks with contain/paint and text stacks with translateZ(0); use artist-card-info on the artists grid for the same layout as other cards. * feat(artists): in-page overlay scroll and locked main viewport Move list/grid into an inner OverlayScrollArea, stop sticky toolbar from owning the route scroll, align the rail with the main panel edge, and skip the main-route overlay thumb when the viewport cannot scroll vertically. * feat(browse): extend in-page overlay scroll to more library routes Reuse the locked main viewport pattern from Artists for Albums, Composers, Lossless albums, and New releases; wire VirtualCardGrid and scroll chrome to the matching in-page viewport ids. * fix(linux): improve Wayland GPU compositing text clarity in WebKitGTK Use on-demand hardware acceleration on main and mini webviews when the session is Wayland and compositing stays on; gate subpixel body AA on the same conditions via new Tauri probes. Document PSYSONIC_SKIP_WAYLAND_FONT_TUNING for opt-out and changelog. * fix(rust): satisfy clippy needless_return in Linux webkit helpers * fix(linux): tune Wayland text rendering with HW policy env and CSS Allow PSYSONIC_WEBKIT_WAYLAND_HW_POLICY to select WebKit hardware acceleration policy (never/always vs default on-demand). Extend Wayland font CSS to #root with geometricPrecision and text-size-adjust on html. * feat(linux): Wayland text presets in settings, safe WebKit apply, CPU default Persist profile to app config; apply WebKit policy at startup/mini only to avoid WebKitGTK hangs on live toggles. UI + CSS preview stays live; default preset is sharp (CPU-friendly). * fix(linux): map Wayland sharp preset to OnDemand WebKit policy HardwareAccelerationPolicy::Never at startup broke main-viewport wheel scrolling on WebKitGTK+Wayland; sharp vs balanced remains a CSS AA path. Use PSYSONIC_WEBKIT_WAYLAND_HW_POLICY for a true Never policy. * fix(rust): gate Linux-only Wayland WebKit helpers for Windows builds Re-export startup helpers only under cfg(linux) and drop non-Linux stubs so Windows compiles without unused-import and dead-code warnings. * chore(release): CHANGELOG + credits for Linux session/WebKit work (PR #731) Consolidate scattered incremental changelog notes into two [1.47.0] entries with PR link; remove duplicate Linux blocks from [1.46.0] Fixed. Append settings credit line for cucadmuh.
170 lines
5.2 KiB
Nix
170 lines
5.2 KiB
Nix
{
|
|
description = ''
|
|
Psysonic for NixOS / nixpkgs: installable app + dev shell.
|
|
|
|
Packages:
|
|
nix build .#psysonic # or .#default — desktop app; GDK follows session (no wrapper pin)
|
|
nix build .#psysonic-gdk-session # same derivation (back-compat alias); see nixos-install.md
|
|
nix build .#psysonic-x11-legacy # legacy: GDK_BACKEND=x11 wrapper (old default)
|
|
nix profile install .#psysonic
|
|
|
|
Run (after build, or from any clone with flake):
|
|
nix run .#psysonic
|
|
nix run .#psysonic-gdk-session # identical to psysonic
|
|
nix run .#psysonic-x11-legacy # GDK x11 pinned (former default wrap)
|
|
nix run github:Psychotoxical/psysonic
|
|
|
|
Development:
|
|
nix develop # mkShell (Rust/Node/WebKit deps); same GDK idea as installable (no GDK pin)
|
|
nix shell .#devShells.default # same environment without entering subshell semantics
|
|
Local cargo output: .build-local/ (gitignored; not copied into flake source tarball)
|
|
|
|
Release pipeline updates `flake.lock` (nixpkgs pin refresh) and
|
|
`nix/upstream-sources.json` (npmDepsHash) on every `v*` tag push —
|
|
see `.github/workflows/release.yml` (verify-nix job). Package version
|
|
is read from `package.json`; nothing in this file needs manual bumping
|
|
per release.
|
|
'';
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
inherit (nixpkgs) lib;
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forSystem = f: lib.genAttrs systems f;
|
|
|
|
mkShellFor =
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
gstPlugins = with pkgs.gst_all_1; [
|
|
gstreamer
|
|
gst-plugins-base
|
|
gst-plugins-good
|
|
gst-plugins-bad
|
|
];
|
|
gstPluginPath = pkgs.lib.makeSearchPath "lib/gstreamer-1.0" gstPlugins;
|
|
in
|
|
pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
nodejs_22
|
|
rustc
|
|
cargo
|
|
clippy
|
|
cargo-llvm-cov
|
|
llvmPackages.llvm
|
|
jq
|
|
cmake
|
|
pkg-config
|
|
openssl
|
|
gtk3
|
|
webkitgtk_4_1
|
|
libsoup_3
|
|
glib-networking
|
|
atk
|
|
cairo
|
|
gdk-pixbuf
|
|
glib
|
|
pango
|
|
librsvg
|
|
alsa-lib
|
|
libayatana-appindicator
|
|
]
|
|
++ gstPlugins;
|
|
|
|
shellHook = ''
|
|
_repo="$(git rev-parse --show-toplevel 2>/dev/null || true)"
|
|
if [ -n "$_repo" ] && [ -f "$_repo/flake.nix" ]; then
|
|
export CARGO_TARGET_DIR="''${CARGO_TARGET_DIR:-$_repo/.build-local/cargo-target}"
|
|
fi
|
|
export LD_LIBRARY_PATH="${pkgs.libayatana-appindicator}/lib''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
|
export GST_PLUGIN_PATH="${gstPluginPath}''${GST_PLUGIN_PATH:+:$GST_PLUGIN_PATH}"
|
|
export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules''${GIO_EXTRA_MODULES:+:$GIO_EXTRA_MODULES}"
|
|
export LLVM_COV="${pkgs.llvmPackages.llvm}/bin/llvm-cov"
|
|
export LLVM_PROFDATA="${pkgs.llvmPackages.llvm}/bin/llvm-profdata"
|
|
unset CI
|
|
'';
|
|
|
|
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
|
|
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
|
|
};
|
|
|
|
upstreamMeta = lib.importJSON ./nix/upstream-sources.json;
|
|
|
|
psysonicFor =
|
|
system:
|
|
nixpkgs.legacyPackages.${system}.callPackage ./nix/psysonic.nix {
|
|
src = self;
|
|
inherit upstreamMeta;
|
|
};
|
|
|
|
# Same app with GDK_BACKEND pinned to X11 — previous default wrapper behaviour (see nixos-install.md).
|
|
psysonicX11LegacyFor =
|
|
system:
|
|
nixpkgs.legacyPackages.${system}.callPackage ./nix/psysonic.nix {
|
|
src = self;
|
|
inherit upstreamMeta;
|
|
forceGdkX11 = true;
|
|
};
|
|
|
|
in
|
|
{
|
|
devShells = forSystem (system: { default = mkShellFor system; });
|
|
|
|
packages = forSystem (
|
|
system:
|
|
let
|
|
p = psysonicFor system;
|
|
pX11 = psysonicX11LegacyFor system;
|
|
in
|
|
{
|
|
psysonic = p;
|
|
psysonic-gdk-session = p;
|
|
psysonic-x11-legacy = pX11;
|
|
default = p;
|
|
}
|
|
);
|
|
|
|
apps = forSystem (
|
|
system:
|
|
let
|
|
p = psysonicFor system;
|
|
pX11 = psysonicX11LegacyFor system;
|
|
in
|
|
{
|
|
default = {
|
|
type = "app";
|
|
program = lib.getExe p;
|
|
meta = {
|
|
inherit (p.meta) description homepage license;
|
|
mainProgram = "psysonic";
|
|
};
|
|
};
|
|
psysonic-gdk-session = {
|
|
type = "app";
|
|
program = lib.getExe p;
|
|
meta = {
|
|
inherit (p.meta) description homepage license;
|
|
mainProgram = "psysonic";
|
|
};
|
|
};
|
|
psysonic-x11-legacy = {
|
|
type = "app";
|
|
program = lib.getExe pX11;
|
|
meta = {
|
|
inherit (pX11.meta) description homepage license;
|
|
mainProgram = "psysonic";
|
|
};
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|