2016-03-29 11:23:12 +01:00
|
|
|
{ fetchurl, stdenv, erlang, esdl, cl }:
|
2010-07-01 10:08:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-03-29 11:23:12 +01:00
|
|
|
name = "wings-1.5.4";
|
2010-07-01 10:08:37 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/wings/${name}.tar.bz2";
|
2016-03-29 11:23:12 +01:00
|
|
|
sha256 = "0qz6rmmkqgk3p0d3v2ikkf22n511bq0m7xp3kkradwrp28fcl15x";
|
2010-07-01 10:08:37 +01:00
|
|
|
};
|
|
|
|
|
2016-03-29 11:23:12 +01:00
|
|
|
ERL_LIBS = "${esdl}/lib/erlang/lib:${cl}/lib/erlang/lib";
|
2010-07-01 10:08:37 +01:00
|
|
|
|
|
|
|
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
|
2016-03-29 11:23:12 +01:00
|
|
|
|
|
|
|
# Fix reference
|
|
|
|
sed -i 's,wings/e3d/,,' plugins_src/import_export/wpc_lwo.erl
|
2010-07-01 10:08:37 +01:00
|
|
|
'';
|
|
|
|
|
2016-03-29 11:23:12 +01:00
|
|
|
buildInputs = [ erlang esdl cl ];
|
2010-07-01 10:08:37 +01:00
|
|
|
|
2016-03-29 11:23:12 +01:00
|
|
|
# I did not test the *cl* part. I added the -pa just by imitation.
|
2010-07-01 10:08:37 +01:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin $out/lib/${name}/ebin
|
2010-07-01 10:08:37 +01:00
|
|
|
cp ebin/* $out/lib/${name}/ebin
|
|
|
|
cp -R fonts textures shaders plugins $out/lib/$name
|
|
|
|
cat << EOF > $out/bin/wings
|
|
|
|
#!/bin/sh
|
2016-03-29 11:23:12 +01:00
|
|
|
${erlang}/bin/erl -smp disable \
|
|
|
|
-pa ${esdl}/lib/erlang/lib/${cl.name}/ebin \
|
|
|
|
-pa ${esdl}/lib/erlang/lib/${esdl.name}/ebin \
|
2010-07-01 10:08:37 +01:00
|
|
|
-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;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|