From 9195d6f6de4f02859492502eb44b268cb9b2b51f Mon Sep 17 00:00:00 2001 From: fruchti Date: Sat, 27 Apr 2024 14:32:05 +0200 Subject: [PATCH] Horizon EDA: Fix Intel GPU redraw issue --- overlays/default.nix | 1 + overlays/horizon-eda.nix | 13 +++++++++++++ overlays/horizon_software_draw_surface.patch | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 overlays/horizon-eda.nix create mode 100644 overlays/horizon_software_draw_surface.patch diff --git a/overlays/default.nix b/overlays/default.nix index 7cd1fd2..eab7738 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -2,5 +2,6 @@ { imports = [ ./burp.nix + ./horizon-eda.nix ]; } diff --git a/overlays/horizon-eda.nix b/overlays/horizon-eda.nix new file mode 100644 index 0000000..3022fdf --- /dev/null +++ b/overlays/horizon-eda.nix @@ -0,0 +1,13 @@ +{ config, ... }: +{ + nixpkgs.overlays = [ + (self: super: { + horizon-eda = (super.horizon-eda.overrideAttrs (old: { + # Add an environment variable to fix redraw issues on Intel Graphics + patches = [ + ./horizon_software_draw_surface.patch + ]; + })); + }) + ]; +} diff --git a/overlays/horizon_software_draw_surface.patch b/overlays/horizon_software_draw_surface.patch new file mode 100644 index 0000000..c44c667 --- /dev/null +++ b/overlays/horizon_software_draw_surface.patch @@ -0,0 +1,10 @@ +diff --git a/org.horizon_eda.HorizonEDA.desktop b/org.horizon_eda.HorizonEDA.desktop +index 7551df54..d8df7800 100644 +--- a/org.horizon_eda.HorizonEDA.desktop ++++ b/org.horizon_eda.HorizonEDA.desktop +@@ -5,4 +5,4 @@ Categories=Development;Engineering;Electronics; + Type=Application + Terminal=false + Icon=org.horizon_eda.HorizonEDA +-Exec=horizon-eda %U ++Exec=env GDK_GL=software-draw-surface horizon-eda %U