summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/irrlicht/default.nix22
-rw-r--r--pkgs/development/libraries/irrlicht/irrlicht3843.nix45
-rw-r--r--pkgs/top-level/all-packages.nix3
3 files changed, 53 insertions, 17 deletions
diff --git a/pkgs/development/libraries/irrlicht/default.nix b/pkgs/development/libraries/irrlicht/default.nix
index a682b3a6b82..8acd872fcb3 100644
--- a/pkgs/development/libraries/irrlicht/default.nix
+++ b/pkgs/development/libraries/irrlicht/default.nix
@@ -2,21 +2,16 @@
 
 
 stdenv.mkDerivation rec {
-  # Version 3843 is required for supertuxkart
-  name = "irrlicht-1.8-svn-3843";
+  name = "irrlicht-${version}-svn-${revision}";
+  version = "1.8";
+  revision = "5104"; # newest revision as of 05-16-15
 
   src = fetchsvn {
-    url = https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk;
-    rev = 3843;
-    sha256 = "0v31l3k0fzy7isdsx2sh0baaixzlml1m7vgz6cd0015d9f5n99vl";
+    url = "https://svn.code.sf.net/p/irrlicht/code/branches/releases/${version}"; # get 1.8 release (same regardless of rev)
+    rev = "${revision}";
+    sha256 = "18xvlrjf113mphf29iy24hmrkh7xff6j9cz0chrxjqbr9xk9h1yq";
   };
 
-  patches = [ ./irrlicht-1.8.1-mesa-10.x.patch ];
-
-  postPatch = ''
-    sed -i /stdcall-alias/d source/Irrlicht/Makefile
-  '';
-
   preConfigure = ''
     cd source/Irrlicht
   '';
@@ -30,11 +25,6 @@ stdenv.mkDerivation rec {
     mkdir -p $out/lib
   '';
 
-  postInstall = ''
-    ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so.1.8
-    ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so
-  '';
-
   buildInputs = [ unzip mesa libXrandr libX11 libXxf86vm ];
 
   meta = {
diff --git a/pkgs/development/libraries/irrlicht/irrlicht3843.nix b/pkgs/development/libraries/irrlicht/irrlicht3843.nix
new file mode 100644
index 00000000000..a682b3a6b82
--- /dev/null
+++ b/pkgs/development/libraries/irrlicht/irrlicht3843.nix
@@ -0,0 +1,45 @@
+{ fetchsvn, stdenv, mesa, unzip, libXrandr, libX11, libXxf86vm }:
+
+
+stdenv.mkDerivation rec {
+  # Version 3843 is required for supertuxkart
+  name = "irrlicht-1.8-svn-3843";
+
+  src = fetchsvn {
+    url = https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk;
+    rev = 3843;
+    sha256 = "0v31l3k0fzy7isdsx2sh0baaixzlml1m7vgz6cd0015d9f5n99vl";
+  };
+
+  patches = [ ./irrlicht-1.8.1-mesa-10.x.patch ];
+
+  postPatch = ''
+    sed -i /stdcall-alias/d source/Irrlicht/Makefile
+  '';
+
+  preConfigure = ''
+    cd source/Irrlicht
+  '';
+
+  buildPhase = ''
+    make sharedlib NDEBUG=1
+  '';
+
+  preInstall = ''
+    sed -i s,/usr/local/lib,$out/lib, Makefile
+    mkdir -p $out/lib
+  '';
+
+  postInstall = ''
+    ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so.1.8
+    ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so
+  '';
+
+  buildInputs = [ unzip mesa libXrandr libX11 libXxf86vm ];
+
+  meta = {
+    homepage = http://irrlicht.sourceforge.net/;
+    license = stdenv.lib.licenses.zlib;
+    description = "Open source high performance realtime 3D engine written in C++";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 00737083a7b..046398c6de7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6212,7 +6212,8 @@ let
 
   intltool = callPackage ../development/tools/misc/intltool { };
 
-  irrlicht3843 = callPackage ../development/libraries/irrlicht { };
+  irrlicht = callPackage ../development/libraries/irrlicht { };
+  irrlicht3843 = callPackage ../development/libraries/irrlicht/irrlicht3843.nix { };
 
   isocodes = callPackage ../development/libraries/iso-codes { };