2018-12-30 15:25:05 +01:00
|
|
|
{ fetchurl, stdenv, erlang, cl, libGL, libGLU }:
|
2010-07-01 11:08:37 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-12-30 15:25:05 +01:00
|
|
|
name = "wings-2.2.1";
|
2010-07-01 11:08:37 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/wings/${name}.tar.bz2";
|
2018-12-30 15:25:05 +01:00
|
|
|
sha256 = "1adlq3wd9bz0hjznpzsgilxgsbhr0kk01f06872mq37v4cbw76bh";
|
2010-07-01 11:08:37 +02:00
|
|
|
};
|
|
|
|
|
2018-12-30 15:25:05 +01:00
|
|
|
ERL_LIBS = "${cl}/lib/erlang/lib";
|
2010-07-01 11:08:37 +02:00
|
|
|
|
|
|
|
patchPhase = ''
|
2018-12-30 15:25:05 +01:00
|
|
|
sed -i 's,-Werror ,,' e3d/Makefile
|
|
|
|
sed -i 's,../../wings/,../,' icons/Makefile
|
|
|
|
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../../src/,' {} \;
|
|
|
|
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../../e3d/,' {} \;
|
|
|
|
find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../../intl_tools/,' {} \;
|
|
|
|
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../src/,' {} \;
|
|
|
|
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../e3d/,' {} \;
|
|
|
|
find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../intl_tools/,' {} \;
|
2010-07-01 11:08:37 +02:00
|
|
|
'';
|
|
|
|
|
2018-12-30 15:25:05 +01:00
|
|
|
buildInputs = [ erlang cl libGL libGLU ];
|
2010-07-01 11:08:37 +02:00
|
|
|
|
2016-03-29 12:23:12 +02:00
|
|
|
# I did not test the *cl* part. I added the -pa just by imitation.
|
2010-07-01 11:08:37 +02:00
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin $out/lib/${name}/ebin
|
2010-07-01 11:08:37 +02:00
|
|
|
cp ebin/* $out/lib/${name}/ebin
|
2018-12-30 15:47:32 +01:00
|
|
|
cp -R textures shaders plugins $out/lib/$name
|
2010-07-01 11:08:37 +02:00
|
|
|
cat << EOF > $out/bin/wings
|
2019-01-15 23:41:31 +01:00
|
|
|
#!${stdenv.shell}
|
2018-12-30 15:25:05 +01:00
|
|
|
${erlang}/bin/erl \
|
2010-07-01 11:08:37 +02: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;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|