···11+The `%code` causes Color definition to be added in both parser.h and parser.c
22+causing duplicate definitions error. This ensures that once it has been included
33+as part of parser.h, it wont be redefined in parser.c
44+55+--- xsw-0.1.2-src/src/parser.y 1969-12-31 16:00:01.000000000 -0800
66++++ xsw-0.1.2-src/src/parser.y 2016-06-28 13:21:35.707027770 -0700
77+@@ -38,7 +38,13 @@
88+99+ %}
1010+1111+-%code requires { typedef struct { unsigned char c; } Color; }
1212++%code requires
1313++{
1414++#ifndef COLORDEF
1515++#define COLORDEF
1616++typedef struct { unsigned char c; } Color;
1717++#endif
1818++}
1919+2020+ %token SLIDE COLON HIFEN TEXT X Y W H IMAGE SIZE SCALE TEMPLATE BACKGROUND FONT
2121+ %token STYLE ALIGN EXPAND PLUS IMAGE_PATH
+7
pkgs/top-level/all-packages.nix
···1707917079 libpng = libpng12;
1708017080 };
17081170811708217082+ xsw = callPackage ../applications/misc/xsw {
1708317083+ # Enable the next line to use this in terminal.
1708417084+ # Note that it requires sixel capable terminals such as mlterm
1708517085+ # or xterm -ti 340
1708617086+ SDL = SDL_sixel;
1708717087+ };
1708817088+1708217089 xwiimote = callPackage ../misc/drivers/xwiimote {
1708317090 bluez = pkgs.bluez5.override {
1708417091 enableWiimote = true;