···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
···1718417184 libpng = libpng12;
1718517185 };
17186171861718717187+ xsw = callPackage ../applications/misc/xsw {
1718817188+ # Enable the next line to use this in terminal.
1718917189+ # Note that it requires sixel capable terminals such as mlterm
1719017190+ # or xterm -ti 340
1719117191+ SDL = SDL_sixel;
1719217192+ };
1719317193+1718717194 xwiimote = callPackage ../misc/drivers/xwiimote {
1718817195 bluez = pkgs.bluez5.override {
1718917196 enableWiimote = true;