prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  _gfx_driver_packages not defined when choosing sway option (current master build)
  ![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)
  
  _gfx_driver_packages not defined when choosing sway option (current master build)
  ![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)
  
  _gfx_driver_packages not defined when choosing sway option (current master build)
  ![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)
  
  
  </issue>
  <code>
  [start of profiles/sway.py]
  1 # A desktop environment using "Sway"
  2 
  3 import archinstall
  4 
  5 is_top_level_profile = False
  6 
  7 __packages__ = ["sway", "swaylock", "swayidle", "waybar", "dmenu", "light", "grim", "slurp", "pavucontrol", "alacritty"]
  8 
  9 def _prep_function(*args, **kwargs):
  10 	"""
  11 	Magic function called by the importing installer
  12 	before continuing any further. It also avoids executing any
  13 	other code in this stage. So it's a safe way to ask the user
  14 	for more input before any other installer steps start.
  15 	"""
  16 	if "nvidia" in _gfx_driver_packages:
  17 		choice = input("The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] ")
  18 		if choice.lower() in ("n", ""):
  19 			raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.")
  20 
  21 	__builtins__['_gfx_driver_packages'] = archinstall.select_driver()
  22 
  23 	return True
  24 
  25 # Ensures that this code only gets executed if executed
  26 # through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py")
  27 # or through conventional import sway
  28 if __name__ == 'sway':
  29 	# Install the Sway packages
  30 	installation.add_additional_packages(__packages__)
  31
  [end of profiles/sway.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/profiles/sway.py b/profiles/sway.py
  --- a/profiles/sway.py
  +++ b/profiles/sway.py
  @@ -4,7 +4,19 @@
   
   is_top_level_profile = False
   
  -__packages__ = ["sway", "swaylock", "swayidle", "waybar", "dmenu", "light", "grim", "slurp", "pavucontrol", "alacritty"]
  +__packages__ = [
  +	"sway",
  +	"swaylock",
  +	"swayidle",
  +	"waybar",
  +	"dmenu",
  +	"light",
  +	"grim",
  +	"slurp",
  +	"pavucontrol",
  +	"alacritty",
  +]
  +
   
   def _prep_function(*args, **kwargs):
   	"""
  @@ -13,18 +25,26 @@
   	other code in this stage. So it's a safe way to ask the user
   	for more input before any other installer steps start.
   	"""
  -	if "nvidia" in _gfx_driver_packages:
  -		choice = input("The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] ")
  -		if choice.lower() in ("n", ""):
  -			raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.")
  -
  -	__builtins__['_gfx_driver_packages'] = archinstall.select_driver()
  +	__builtins__["_gfx_driver_packages"] = archinstall.select_driver()
   
   	return True
   
  +
   # Ensures that this code only gets executed if executed
   # through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py")
   # or through conventional import sway
  -if __name__ == 'sway':
  +if __name__ == "sway":
  +	if "nvidia" in _gfx_driver_packages:
  +		choice = input(
  +			"The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] "
  +		)
  +		if choice.lower() in ("n", ""):
  +			raise archinstall.lib.exceptions.HardwareIncompatibilityError(
  +				"Sway does not support the proprietary nvidia drivers."
  +			)
  +
   	# Install the Sway packages
   	installation.add_additional_packages(__packages__)
  +
  +	# Install the graphics driver packages
  +	installation.add_additional_packages(_gfx_driver_packages)
  
verification_info: {"golden_diff": "diff --git a/profiles/sway.py b/profiles/sway.py\n--- a/profiles/sway.py\n+++ b/profiles/sway.py\n@@ -4,7 +4,19 @@\n \n is_top_level_profile = False\n \n-__packages__ = [\"sway\", \"swaylock\", \"swayidle\", \"waybar\", \"dmenu\", \"light\", \"grim\", \"slurp\", \"pavucontrol\", \"alacritty\"]\n+__packages__ = [\n+\t\"sway\",\n+\t\"swaylock\",\n+\t\"swayidle\",\n+\t\"waybar\",\n+\t\"dmenu\",\n+\t\"light\",\n+\t\"grim\",\n+\t\"slurp\",\n+\t\"pavucontrol\",\n+\t\"alacritty\",\n+]\n+\n \n def _prep_function(*args, **kwargs):\n \t\"\"\"\n@@ -13,18 +25,26 @@\n \tother code in this stage. So it's a safe way to ask the user\n \tfor more input before any other installer steps start.\n \t\"\"\"\n-\tif \"nvidia\" in _gfx_driver_packages:\n-\t\tchoice = input(\"The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] \")\n-\t\tif choice.lower() in (\"n\", \"\"):\n-\t\t\traise archinstall.lib.exceptions.HardwareIncompatibilityError(\"Sway does not support the proprietary nvidia drivers.\")\n-\n-\t__builtins__['_gfx_driver_packages'] = archinstall.select_driver()\n+\t__builtins__[\"_gfx_driver_packages\"] = archinstall.select_driver()\n \n \treturn True\n \n+\n # Ensures that this code only gets executed if executed\n # through importlib.util.spec_from_file_location(\"sway\", \"/somewhere/sway.py\")\n # or through conventional import sway\n-if __name__ == 'sway':\n+if __name__ == \"sway\":\n+\tif \"nvidia\" in _gfx_driver_packages:\n+\t\tchoice = input(\n+\t\t\t\"The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] \"\n+\t\t)\n+\t\tif choice.lower() in (\"n\", \"\"):\n+\t\t\traise archinstall.lib.exceptions.HardwareIncompatibilityError(\n+\t\t\t\t\"Sway does not support the proprietary nvidia drivers.\"\n+\t\t\t)\n+\n \t# Install the Sway packages\n \tinstallation.add_additional_packages(__packages__)\n+\n+\t# Install the graphics driver packages\n+\tinstallation.add_additional_packages(_gfx_driver_packages)\n", "issue": "_gfx_driver_packages not defined when choosing sway option (current master build)\n![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)\r\n\n_gfx_driver_packages not defined when choosing sway option (current master build)\n![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)\r\n\n_gfx_driver_packages not defined when choosing sway option (current master build)\n![VirtualBox_Arch_30_04_2021_23_01_50](https://user-images.githubusercontent.com/277927/116769175-37f20400-aa08-11eb-92cb-6c50348296d1.png)\r\n\n", "before_files": [{"content": "# A desktop environment using \"Sway\"\n\nimport archinstall\n\nis_top_level_profile = False\n\n__packages__ = [\"sway\", \"swaylock\", \"swayidle\", \"waybar\", \"dmenu\", \"light\", \"grim\", \"slurp\", \"pavucontrol\", \"alacritty\"]\n\ndef _prep_function(*args, **kwargs):\n\t\"\"\"\n\tMagic function called by the importing installer\n\tbefore continuing any further. It also avoids executing any\n\tother code in this stage. So it's a safe way to ask the user\n\tfor more input before any other installer steps start.\n\t\"\"\"\n\tif \"nvidia\" in _gfx_driver_packages:\n\t\tchoice = input(\"The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] \")\n\t\tif choice.lower() in (\"n\", \"\"):\n\t\t\traise archinstall.lib.exceptions.HardwareIncompatibilityError(\"Sway does not support the proprietary nvidia drivers.\")\n\n\t__builtins__['_gfx_driver_packages'] = archinstall.select_driver()\n\n\treturn True\n\n# Ensures that this code only gets executed if executed\n# through importlib.util.spec_from_file_location(\"sway\", \"/somewhere/sway.py\")\n# or through conventional import sway\nif __name__ == 'sway':\n\t# Install the Sway packages\n\tinstallation.add_additional_packages(__packages__)\n", "path": "profiles/sway.py"}]}