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