summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@users.noreply.github.com>2016-07-04 01:11:57 +0200
committerGitHub <noreply@github.com>2016-07-04 01:11:57 +0200
commit0da28e9cfac412fd0f748003a5054c8928e5446f (patch)
tree19b49d2fd5147cb9f64b3d4c4566732dbb3da850 /pkgs/applications
parente30580a44bc3145af12047cb8099198aa127580f (diff)
parentcfe4ad243131b744ed5406c54506fd49d01d85ff (diff)
downloadnixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar.gz
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar.bz2
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar.lz
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar.xz
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.tar.zst
nixlib-0da28e9cfac412fd0f748003a5054c8928e5446f.zip
Merge pull request #16582 from vrthra/xsw
xsw: init at 0.1.2
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/xsw/default.nix28
-rw-r--r--pkgs/applications/misc/xsw/parse.patch21
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/misc/xsw/default.nix b/pkgs/applications/misc/xsw/default.nix
new file mode 100644
index 000000000000..57ea8fe19218
--- /dev/null
+++ b/pkgs/applications/misc/xsw/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, SDL, SDL_image, SDL_ttf, SDL_gfx, flex, bison }:
+
+stdenv.mkDerivation rec {
+  name = "xsw-${version}";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "andrenho";
+    repo = "xsw";
+    rev = version;
+    sha256 = "092vp61ngd2vscsvyisi7dv6qrk5m1i81gg19hyfl5qvjq5p0p8g";
+  };
+
+  buildInputs = [ pkgconfig autoconf automake SDL SDL_image SDL_ttf SDL_gfx flex bison ];
+
+  patches = [
+    ./parse.patch # Fixes compilation error by avoiding redundant definitions.
+  ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "A slide show presentation tool";
+
+    platforms = platforms.unix;
+    license  = licenses.gpl3;
+    maintainers = [ maintainers.vrthra ];
+  };
+}
diff --git a/pkgs/applications/misc/xsw/parse.patch b/pkgs/applications/misc/xsw/parse.patch
new file mode 100644
index 000000000000..6db6c14c26a7
--- /dev/null
+++ b/pkgs/applications/misc/xsw/parse.patch
@@ -0,0 +1,21 @@
+The `%code` causes Color definition to be added in both parser.h and parser.c
+causing duplicate definitions error. This ensures that once it has been included
+as part of parser.h, it wont be redefined in parser.c
+
+--- xsw-0.1.2-src/src/parser.y	1969-12-31 16:00:01.000000000 -0800
++++ xsw-0.1.2-src/src/parser.y	2016-06-28 13:21:35.707027770 -0700
+@@ -38,7 +38,13 @@
+ 
+ %}
+ 
+-%code requires { typedef struct { unsigned char c; } Color; }
++%code requires
++{
++#ifndef COLORDEF
++#define COLORDEF
++typedef struct { unsigned char c; } Color;
++#endif
++}
+ 
+ %token SLIDE COLON HIFEN TEXT X Y W H IMAGE SIZE SCALE TEMPLATE BACKGROUND FONT
+ %token STYLE ALIGN EXPAND PLUS IMAGE_PATH