about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2016-03-29 12:23:12 +0200
committerLluís Batlle i Rossell <viric@viric.name>2016-03-29 12:24:42 +0200
commitf6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18 (patch)
tree28836f4cbad86dcf37edc1f43f189d27baf7e16d /pkgs/applications/graphics
parente69306c46394f98e8ae53dd21dea3d0495a90780 (diff)
downloadnixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar.gz
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar.bz2
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar.lz
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar.xz
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.tar.zst
nixlib-f6a44bea9e5cfb07dc283f2c7c222f9e0dbadf18.zip
Updating wings and dependencies to match erlang
I updated the erlang esdl lib, added the erlang cl lib,
added opencl-headers and ocl-icd to make wings build and run.

I have not tested its opencl part; I only added dependencies so
it builds.
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/wings/default.nix19
1 files changed, 12 insertions, 7 deletions
diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix
index 9e6d6fe492a3..9ecf94e21c01 100644
--- a/pkgs/applications/graphics/wings/default.nix
+++ b/pkgs/applications/graphics/wings/default.nix
@@ -1,29 +1,34 @@
-{ fetchurl, stdenv, erlang, esdl }:
+{ fetchurl, stdenv, erlang, esdl, cl }:
 
 stdenv.mkDerivation rec {
-  name = "wings-1.4.1";
+  name = "wings-1.5.4";
   src = fetchurl {
     url = "mirror://sourceforge/wings/${name}.tar.bz2";
-    sha256 = "16kqy92rapmbvkc58mc50cidp1pm8nlwlwx69riyadc9w4qs9bji";
+    sha256 = "0qz6rmmkqgk3p0d3v2ikkf22n511bq0m7xp3kkradwrp28fcl15x";
   };
 
-  ERL_LIBS = "${esdl}/lib/erlang/addons";
+  ERL_LIBS = "${esdl}/lib/erlang/lib:${cl}/lib/erlang/lib";
 
   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
+
+    # Fix reference
+    sed -i 's,wings/e3d/,,' plugins_src/import_export/wpc_lwo.erl
   '';
 
-  buildInputs = [ erlang esdl ];
+  buildInputs = [ erlang esdl cl ];
 
+  # I did not test the *cl* part. I added the -pa just by imitation.
   installPhase = ''
     mkdir -p $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 \
+    ${erlang}/bin/erl -smp disable \
+      -pa ${esdl}/lib/erlang/lib/${cl.name}/ebin \
+      -pa ${esdl}/lib/erlang/lib/${esdl.name}/ebin \
       -pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
     EOF
     chmod +x $out/bin/wings