1 { lib, stdenv, fetchurl, fetchpatch, erlang, cl, libGL, libGLU, runtimeShell }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/wings/wings-${version}.tar.bz2";
9 sha256 = "1xcmifs4vq2810pqqvsjsm8z3lz24ys4c05xkh82nyppip2s89a3";
14 url = "https://github.com/dgud/wings/commit/94b3a3c6a0cfdcdbd98edce055d5c83ecb361f37.patch";
15 hash = "sha256-DHT1TiYoowloIWrdutBu70mL+557cTFr1dRcNgwbkpE=";
20 find . -type f -name "Makefile" -exec sed -i 's,-Werror ,,' {} \;
21 sed -i 's,../../wings/,../,' icons/Makefile
22 find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../../src/,' {} \;
23 find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../../e3d/,' {} \;
24 find plugins_src -mindepth 2 -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../../intl_tools/,' {} \;
25 find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/src/,../src/,' {} \;
26 find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/e3d/,../e3d/,' {} \;
27 find . -type f -name "*.[eh]rl" -exec sed -i 's,wings/intl_tools/,../intl_tools/,' {} \;
30 buildInputs = [ erlang cl libGL libGLU ];
32 ERL_LIBS = "${cl}/lib/erlang/lib";
34 # I did not test the *cl* part. I added the -pa just by imitation.
36 mkdir -p $out/bin $out/lib/wings-${version}/ebin
37 cp ebin/* $out/lib/wings-${version}/ebin
38 cp -R textures shaders plugins $out/lib/wings-${version}
39 cat << EOF > $out/bin/wings
42 -pa $out/lib/wings-${version}/ebin -run wings_start start_halt "$@"
44 chmod +x $out/bin/wings
48 homepage = "http://www.wings3d.com/";
49 description = "Subdivision modeler inspired by Nendo and Mirai from Izware";
50 license = lib.licenses.tcltk;
52 platforms = with lib.platforms; linux;
53 mainProgram = "wings";