about summary refs log tree commit diff
path: root/pkgs/applications/graphics/wings
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-07-01 09:08:37 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-07-01 09:08:37 +0000
commit5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86 (patch)
tree5acda2f145f05f72cac6b6e0866b8f8268f70714 /pkgs/applications/graphics/wings
parente312c443fcf94a0e77a7a102fe35dadc1fabc107 (diff)
downloadnixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar.gz
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar.bz2
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar.lz
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar.xz
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.tar.zst
nixlib-5b4e3a5b40ce3f56bbb5c600e60e1a9700254d86.zip
Adding Wings 3D (as a side effect, update erlang, and add esdl).
svn path=/nixpkgs/trunk/; revision=22436
Diffstat (limited to 'pkgs/applications/graphics/wings')
-rw-r--r--pkgs/applications/graphics/wings/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix
new file mode 100644
index 000000000000..b40a72512831
--- /dev/null
+++ b/pkgs/applications/graphics/wings/default.nix
@@ -0,0 +1,40 @@
+{ fetchurl, stdenv, erlang, esdl }:
+
+stdenv.mkDerivation rec {
+  name = "wings-1.3.0.1";
+  src = fetchurl {
+    url = "mirror://sourceforge/wings/${name}.tar.bz2";
+    sha256 = "1zab1qxhgrncwqj1xg6z08m0kqbkdiqp4777p1bv2kczcf31isyp";
+  };
+
+  ERL_LIBS = "${esdl}/lib/erlang/addons";
+
+  patchPhase = ''
+    sed -i 's,include("sdl_keyboard.hrl"),include_lib("esdl/include/sdl_keyboard.hrl"),' \
+      src/wings_body.erl plugins_src/commands/wpc_constraints.erl
+  '';
+
+  buildInputs = [ erlang esdl ];
+
+  installPhase = ''
+    ensureDir $out/bin $out/lib/${name}/ebin
+    cp ebin/* $out/lib/${name}/ebin
+    cp -R fonts textures shaders plugins $out/lib/$name
+    cat << EOF > $out/bin/wings
+    #!/bin/sh
+    export ROOTDIR=$out/lib/erlang/addons/${name}
+    ${erlang}/bin/erl -smp disable -pa ${esdl}/lib/erlang/addons/${esdl.name}/ebin \
+      -pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
+    EOF
+    chmod +x $out/bin/wings
+  '';
+
+  meta = {
+    homepage = http://www.wings3d.com/;
+    description = "Subdivision modeler inspired by Nendo and Mirai from Izware";
+    license = "BSD";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
+