Loading pkgs/by-name/no/normcap/package.nix +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ ps.buildPythonApplication rec { dependencies = [ ps.pyside6 ps.jeepney ps.toml ]; preFixup = '' Loading @@ -69,6 +70,28 @@ ps.buildPythonApplication rec { --set QT_QPA_PLATFORM xcb --prefix PATH : ${lib.makeBinPath wrapperDeps} ) '' + lib.optionalString stdenv.hostPlatform.isLinux '' # cursed fix on GNOME+wayland # this works because systemd-run runs the command as an ad-hoc service named run-1234567890.service # FIXME: make something like `--slice=app-com.github.dynobo.normcap.slice` # work such that the "screenshot screenshot" permission in # `flatpak permissions` is associated with the xdg app id # "com.github.dynobo.normcap" and not "" makeWrapperArgs+=( --run ' if command -v systemd-run >/dev/null; then exec -a "$0" systemd-run --wait --user \ --setenv=PATH="$PATH" \ --setenv=PYTHONNOUSERSITE="$PYTHONNOUSERSITE" \ --setenv=QT_QPA_PLATFORM="$QT_QPA_PLATFORM" \ ${placeholder "out"}/bin/.normcap-wrapped "$@" else exec -a "$0" ${placeholder "out"}/bin/.normcap-wrapped "$@" fi exit $? ' ) ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' Loading @@ -81,7 +104,6 @@ ps.buildPythonApplication rec { ps.pytest-cov-stub ps.pytest-instafail ps.pytest-qt ps.toml ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ps.pytest-xvfb xorg.xvfb Loading Loading
pkgs/by-name/no/normcap/package.nix +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ ps.buildPythonApplication rec { dependencies = [ ps.pyside6 ps.jeepney ps.toml ]; preFixup = '' Loading @@ -69,6 +70,28 @@ ps.buildPythonApplication rec { --set QT_QPA_PLATFORM xcb --prefix PATH : ${lib.makeBinPath wrapperDeps} ) '' + lib.optionalString stdenv.hostPlatform.isLinux '' # cursed fix on GNOME+wayland # this works because systemd-run runs the command as an ad-hoc service named run-1234567890.service # FIXME: make something like `--slice=app-com.github.dynobo.normcap.slice` # work such that the "screenshot screenshot" permission in # `flatpak permissions` is associated with the xdg app id # "com.github.dynobo.normcap" and not "" makeWrapperArgs+=( --run ' if command -v systemd-run >/dev/null; then exec -a "$0" systemd-run --wait --user \ --setenv=PATH="$PATH" \ --setenv=PYTHONNOUSERSITE="$PYTHONNOUSERSITE" \ --setenv=QT_QPA_PLATFORM="$QT_QPA_PLATFORM" \ ${placeholder "out"}/bin/.normcap-wrapped "$@" else exec -a "$0" ${placeholder "out"}/bin/.normcap-wrapped "$@" fi exit $? ' ) ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' Loading @@ -81,7 +104,6 @@ ps.buildPythonApplication rec { ps.pytest-cov-stub ps.pytest-instafail ps.pytest-qt ps.toml ] ++ lib.optionals stdenv.hostPlatform.isLinux [ ps.pytest-xvfb xorg.xvfb Loading