summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/SDL2_gfx/default.nix37
1 files changed, 13 insertions, 24 deletions
diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix
index 23a0924ad3b..1d26fed805e 100644
--- a/pkgs/development/libraries/SDL2_gfx/default.nix
+++ b/pkgs/development/libraries/SDL2_gfx/default.nix
@@ -1,30 +1,19 @@
-{stdenv, fetchsvn, SDL2}:
+{ stdenv, fetchurl, SDL2 }:
 
-let rev = 5; in
 stdenv.mkDerivation rec {
-  name = "SDL2_gfx-${toString rev}";
+  name = "SDL2_gfx-${version}";
+  version = "1.0.1";
 
-  src = fetchsvn {
-    url = http://svn.code.sf.net/p/sdl2gfx/code/trunk;
-    inherit rev;
-    sha256 = "1hzilbn1412m2b44mygrbdfh1gvks4v5p0kmafz248jf9ifsvmzp";
+  src = fetchurl {
+    url = "mirror://sourceforge/sdl2gfx/${name}.tar.gz";
+    sha256 = "16jrijzdp095qf416zvj9gs2fqqn6zkyvlxs5xqybd0ip37cp6yn";
   };
 
-  buildInputs = [ SDL2 ] ;
+  buildInputs = [ SDL2 ];
 
-  configureFlags = "--disable-mmx";
+  configureFlags = [ "--enable-mmx" ];
 
-  postInstall = ''
-    sed -i -e 's,"SDL.h",<SDL2/SDL.h>,' \
-      $out/include/SDL2/*.h
-
-    ln -s $out/include/SDL2/SDL2_framerate.h $out/include/SDL2/SDL_framerate.h;
-    ln -s $out/include/SDL2/SDL2_gfxPrimitives.h $out/include/SDL2/SDL_gfxPrimitives.h;
-    ln -s $out/include/SDL2/SDL2_rotozoom.h $out/include/SDL2/SDL_rotozoom.h;
-    ln -s $out/include/SDL2/*.h $out/include/;
-  '';
-
-  meta = {
+  meta = with stdenv.lib; {
     description = "SDL graphics drawing primitives and support functions";
 
     longDescription = ''
@@ -45,10 +34,10 @@ stdenv.mkDerivation rec {
       code. Its is written in plain C and can be used in C++ code.
     '';
 
-    homepage = https://sourceforge.net/projects/sdlgfx/;
-    license = stdenv.lib.licenses.lgpl2Plus;
+    homepage = "https://sourceforge.net/projects/sdlgfx/";
+    license = licenses.zlib;
 
-    maintainers = [ stdenv.lib.maintainers.bjg ];
-    platforms = stdenv.lib.platforms.linux;
+    maintainers = with maintainers; [ bjg ];
+    platforms = platforms.linux;
   };
 }