From 337d65fe6204ab58594c507076ba4b40e24646a0 Mon Sep 17 00:00:00 2001
From: Arnout Engelen <arnout@bzzt.net>
Date: Sun, 15 May 2022 14:19:16 +0200
Subject: [PATCH] inkcut: avoid dirty PYTHONPATH

This avoids picking up libraries from the users' PYTHONPATH, which
might conflict with the libraries that inkcut actually expects to
run with.

You can reproduce that problem with `nix-shell -p inkcut python310Packages.atom --run inkcut`:
it will pick up the python 3.10 atom while inkcut is still built with pyton 3.9,
leading to an error on startup.

Fixes #159179
---
 pkgs/applications/misc/inkcut/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/applications/misc/inkcut/default.nix b/pkgs/applications/misc/inkcut/default.nix
index 300423cb7f67..8c5d4381b981 100644
--- a/pkgs/applications/misc/inkcut/default.nix
+++ b/pkgs/applications/misc/inkcut/default.nix
@@ -53,7 +53,7 @@ buildPythonApplication rec {
   ];
 
   dontWrapQtApps = true;
-  makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
+  makeWrapperArgs = [ "--unset" "PYTHONPATH" "\${qtWrapperArgs[@]}" ];
 
   postInstall = ''
     mkdir -p $out/share/inkscape/extensions