2023-03-18 16:39:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, erlang, cl, libGL, libGLU, runtimeShell }:
|
2010-07-01 09:08:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-11-07 20:29:51 +00:00
|
|
|
pname = "wings";
|
|
|
|
version = "2.2.4";
|
|
|
|
|
2010-07-01 09:08:37 +00:00
|
|
|
src = fetchurl {
|
2021-11-07 20:29:51 +00:00
|
|
|
url = "mirror://sourceforge/wings/wings-${version}.tar.bz2";
|
2019-05-04 17:09:56 +00:00
|
|
|
sha256 = "1xcmifs4vq2810pqqvsjsm8z3lz24ys4c05xkh82nyppip2s89a3";
|
2010-07-01 09:08:37 +00:00
|
|
|
};
|
|
|
|
|
2023-03-18 16:39:59 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dgud/wings/commit/94b3a3c6a0cfdcdbd98edce055d5c83ecb361f37.patch";
|
|
|
|
hash = "sha256-DHT1TiYoowloIWrdutBu70mL+557cTFr1dRcNgwbkpE=";
|
|
|
|
})
|
|
|
|
];
|
2010-07-01 09:08:37 +00:00
|
|
|
|
2023-03-18 16:39:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
find . -type f -name "Makefile" -exec sed -i 's,-Werror ,,' {} \;
|
2018-12-30 14:25:05 +00:00
|
|
|
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 09:08:37 +00:00
|
|
|
'';
|
|
|
|
|
2018-12-30 14:25:05 +00:00
|
|
|
buildInputs = [ erlang cl libGL libGLU ];
|
2010-07-01 09:08:37 +00:00
|
|
|
|
2023-03-18 16:39:59 +00:00
|
|
|
ERL_LIBS = "${cl}/lib/erlang/lib";
|
|
|
|
|
2016-03-29 10:23:12 +00:00
|
|
|
# I did not test the *cl* part. I added the -pa just by imitation.
|
2010-07-01 09:08:37 +00:00
|
|
|
installPhase = ''
|
2021-11-07 20:29:51 +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}
|
2010-07-01 09:08:37 +00:00
|
|
|
cat << EOF > $out/bin/wings
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2018-12-30 14:25:05 +00:00
|
|
|
${erlang}/bin/erl \
|
2021-11-07 20:29:51 +00:00
|
|
|
-pa $out/lib/wings-${version}/ebin -run wings_start start_halt "$@"
|
2010-07-01 09:08:37 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/wings
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.wings3d.com/";
|
2010-07-01 09:08:37 +00:00
|
|
|
description = "Subdivision modeler inspired by Nendo and Mirai from Izware";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.tcltk;
|
2024-07-28 14:48:51 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 13:21:58 +00:00
|
|
|
platforms = with lib.platforms; linux;
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "wings";
|
2010-07-01 09:08:37 +00:00
|
|
|
};
|
|
|
|
}
|