diff --git a/flake.nix b/flake.nix index fc36635..4e2dba7 100644 --- a/flake.nix +++ b/flake.nix @@ -237,6 +237,7 @@ home-manager.users.${username} = import ./hosts/${hostname}/home.nix; } ) + { nixpkgs.overlays = [ (import ./lib/overlays.nix) ]; } ./hosts/${hostname}/default.nix ]; }; diff --git a/lib/overlays.nix b/lib/overlays.nix index e8820d0..691b7fb 100644 --- a/lib/overlays.nix +++ b/lib/overlays.nix @@ -90,4 +90,67 @@ final: prev: { doCheck = false; meta.mainProgram = "mc-monitor"; }; + + # OptiScaler: universal upscaler/frame-gen middleware. Bridges DLSS, XeSS, + # and FSR backends so games shipping older upscalers can be retargeted at, + # e.g., FSR 4 (RDNA 4 native, RDNA 3 INT8 via Mesa+Proton). + # + # Bundled binaries are unaudited Windows DLLs intended to be loaded under + # Wine/Proton. The release tarball ships its own license tree which we + # carry through verbatim under $out/Licenses for compliance. + # + # Bumping: drop the new asset URL + recompute hash. Verify $out still + # contains OptiScaler.dll and OptiScaler.ini (consumers reference both by + # name). + optiscaler = prev.stdenvNoCC.mkDerivation rec { + pname = "optiscaler"; + version = "0.9.1"; + + src = prev.fetchurl { + url = "https://github.com/optiscaler/OptiScaler/releases/download/v${version}/Optiscaler_${version}-final.20260427._DSB.7z"; + hash = "sha256-VtGhjjoy2XjAE0hE6AO6jPBBNCJs/NuCg/aNGAg2+rA="; + }; + + nativeBuildInputs = [ prev.p7zip ]; + + unpackPhase = '' + runHook preUnpack + mkdir -p source + 7z x -bd -o"source" $src >/dev/null + runHook postUnpack + ''; + + sourceRoot = "source"; + + dontConfigure = true; + dontBuild = true; + # Windows DLLs; nothing to patchelf or strip. + dontFixup = true; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r ./* $out/ + # The installer scripts and "extract me" README aren't useful at runtime. + rm -f $out/setup_linux.sh $out/setup_windows.bat + rm -f "$out/!! README_EXTRACT ALL FILES TO GAME FOLDER !!.txt" + runHook postInstall + ''; + + meta = with prev.lib; { + description = "Upscaler/frame-gen middleware bridging DLSS, XeSS, and FSR backends"; + homepage = "https://github.com/optiscaler/OptiScaler"; + # OptiScaler proper is GPL-3.0-or-later. The bundled FidelityFX SDK is + # MIT-0; XeSS ships its own Intel SLA. License texts are preserved at + # $out/Licenses/. + license = with licenses; [ + gpl3Plus + mit0 + unfreeRedistributable + ]; + sourceProvenance = [ sourceTypes.binaryNativeCode ]; + platforms = platforms.linux; + maintainers = [ ]; + }; + }; } diff --git a/modules/desktop-jovian.nix b/modules/desktop-jovian.nix index 439892f..f4559eb 100644 --- a/modules/desktop-jovian.nix +++ b/modules/desktop-jovian.nix @@ -22,6 +22,9 @@ "steam-original" "steam-unwrapped" "steam-run" + # OptiScaler bundles XeSS (Intel SLA) and FidelityFX SDK alongside its own GPL-3.0 + # source. The package's meta.license is unfreeRedistributable to reflect the bundle. + "optiscaler" ]; jovian.steam = {