From 1e5334e76a6b12a5e84e0f1274252879e999ba76 Mon Sep 17 00:00:00 2001 From: Xarvex Date: Wed, 10 Sep 2025 16:28:41 -0500 Subject: [PATCH] fix(nix): replace prefix wrapping with suffix Swapped `--prefix` with `--suffix` according to the NixOS manual: https://nixos.org/manual/nixpkgs/stable/#fun-makeWrapper Using prefix essentially hardcodes dependencies without a fallback, and these dependencies are only needed during runtime. --- nix/package/default.nix | 4 ++-- nix/shell.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/package/default.nix b/nix/package/default.nix index a9f55d1d..7a07be37 100644 --- a/nix/package/default.nix +++ b/nix/package/default.nix @@ -55,14 +55,14 @@ python3Packages.buildPythonApplication { dontWrapGApps = true; dontWrapQtApps = true; makeWrapperArgs = [ - "--prefix PATH : ${ + "--suffix PATH : ${ lib.makeBinPath [ ffmpeg-headless ripgrep ] }" ] - ++ lib.optional stdenv.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${ + ++ lib.optional stdenv.hostPlatform.isLinux "--suffix LD_LIBRARY_PATH : ${ lib.makeLibraryPath [ pipewire ] }" ++ [ diff --git a/nix/shell.nix b/nix/shell.nix index 7f74cd74..55e085d3 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -60,7 +60,7 @@ let postBuild = '' wrapProgram $out/bin/${python3.meta.mainProgram} \ - --prefix ${libraryPath} : ${pythonLibraryPath} \ + --suffix ${libraryPath} : ${pythonLibraryPath} \ "''${gappsWrapperArgs[@]}" \ "''${qtWrapperArgs[@]}" '';