xsw: init at 0.1.2

+56
+28
pkgs/applications/misc/xsw/default.nix
··· 1 + { stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, SDL, SDL_image, SDL_ttf, SDL_gfx, flex, bison }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "xsw-${version}"; 5 + version = "0.1.2"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "andrenho"; 9 + repo = "xsw"; 10 + rev = version; 11 + sha256 = "092vp61ngd2vscsvyisi7dv6qrk5m1i81gg19hyfl5qvjq5p0p8g"; 12 + }; 13 + 14 + buildInputs = [ pkgconfig autoconf automake SDL SDL_image SDL_ttf SDL_gfx flex bison ]; 15 + 16 + patches = [ 17 + ./parse.patch # Fixes compilation error by avoiding redundant definitions. 18 + ]; 19 + 20 + meta = with stdenv.lib; { 21 + inherit (src.meta) homepage; 22 + description = "A slide show presentation tool"; 23 + 24 + platforms = platforms.unix; 25 + license = licenses.gpl3; 26 + maintainers = [ maintainers.vrthra ]; 27 + }; 28 + }
+21
pkgs/applications/misc/xsw/parse.patch
··· 1 + The `%code` causes Color definition to be added in both parser.h and parser.c 2 + causing duplicate definitions error. This ensures that once it has been included 3 + as part of parser.h, it wont be redefined in parser.c 4 + 5 + --- xsw-0.1.2-src/src/parser.y 1969-12-31 16:00:01.000000000 -0800 6 + +++ xsw-0.1.2-src/src/parser.y 2016-06-28 13:21:35.707027770 -0700 7 + @@ -38,7 +38,13 @@ 8 + 9 + %} 10 + 11 + -%code requires { typedef struct { unsigned char c; } Color; } 12 + +%code requires 13 + +{ 14 + +#ifndef COLORDEF 15 + +#define COLORDEF 16 + +typedef struct { unsigned char c; } Color; 17 + +#endif 18 + +} 19 + 20 + %token SLIDE COLON HIFEN TEXT X Y W H IMAGE SIZE SCALE TEMPLATE BACKGROUND FONT 21 + %token STYLE ALIGN EXPAND PLUS IMAGE_PATH
+7
pkgs/top-level/all-packages.nix
··· 17079 17079 libpng = libpng12; 17080 17080 }; 17081 17081 17082 + xsw = callPackage ../applications/misc/xsw { 17083 + # Enable the next line to use this in terminal. 17084 + # Note that it requires sixel capable terminals such as mlterm 17085 + # or xterm -ti 340 17086 + SDL = SDL_sixel; 17087 + }; 17088 + 17082 17089 xwiimote = callPackage ../misc/drivers/xwiimote { 17083 17090 bluez = pkgs.bluez5.override { 17084 17091 enableWiimote = true;