2021-01-17 00:15:33 +00:00
|
|
|
{ fetchurl, lib, stdenv, erlang, cl, libGL, libGLU, runtimeShell }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "wings";
|
|
|
|
version = "2.2.4";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://sourceforge/wings/wings-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1xcmifs4vq2810pqqvsjsm8z3lz24ys4c05xkh82nyppip2s89a3";
|
|
|
|
};
|
|
|
|
|
|
|
|
ERL_LIBS = "${cl}/lib/erlang/lib";
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
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/,' {} \;
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ erlang cl libGL libGLU ];
|
|
|
|
|
|
|
|
# I did not test the *cl* part. I added the -pa just by imitation.
|
|
|
|
installPhase = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
mkdir -p $out/bin $out/lib/wings-${version}/ebin
|
|
|
|
cp ebin/* $out/lib/wings-${version}/ebin
|
|
|
|
cp -R textures shaders plugins $out/lib/wings-${version}
|
2020-04-24 23:36:52 +00:00
|
|
|
cat << EOF > $out/bin/wings
|
|
|
|
#!${runtimeShell}
|
|
|
|
${erlang}/bin/erl \
|
2021-12-06 16:07:01 +00:00
|
|
|
-pa $out/lib/wings-${version}/ebin -run wings_start start_halt "$@"
|
2020-04-24 23:36:52 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/wings
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.wings3d.com/";
|
|
|
|
description = "Subdivision modeler inspired by Nendo and Mirai from Izware";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.tcltk;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with lib.maintainers; [ viric ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = with lib.platforms; linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|