diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix index 9ecf94e21c01..ed3220d2bf96 100644 --- a/pkgs/applications/graphics/wings/default.nix +++ b/pkgs/applications/graphics/wings/default.nix @@ -1,34 +1,35 @@ -{ fetchurl, stdenv, erlang, esdl, cl }: +{ fetchurl, stdenv, erlang, cl, libGL, libGLU }: stdenv.mkDerivation rec { - name = "wings-1.5.4"; + name = "wings-2.2.1"; src = fetchurl { url = "mirror://sourceforge/wings/${name}.tar.bz2"; - sha256 = "0qz6rmmkqgk3p0d3v2ikkf22n511bq0m7xp3kkradwrp28fcl15x"; + sha256 = "1adlq3wd9bz0hjznpzsgilxgsbhr0kk01f06872mq37v4cbw76bh"; }; - ERL_LIBS = "${esdl}/lib/erlang/lib:${cl}/lib/erlang/lib"; + ERL_LIBS = "${cl}/lib/erlang/lib"; 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 - - # Fix reference - sed -i 's,wings/e3d/,,' plugins_src/import_export/wpc_lwo.erl + 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 esdl cl ]; + buildInputs = [ erlang cl libGL libGLU ]; # I did not test the *cl* part. I added the -pa just by imitation. installPhase = '' mkdir -p $out/bin $out/lib/${name}/ebin cp ebin/* $out/lib/${name}/ebin - cp -R fonts textures shaders plugins $out/lib/$name + cp -R textures shaders plugins $out/lib/$name cat << EOF > $out/bin/wings #!/bin/sh - ${erlang}/bin/erl -smp disable \ - -pa ${esdl}/lib/erlang/lib/${cl.name}/ebin \ - -pa ${esdl}/lib/erlang/lib/${esdl.name}/ebin \ + ${erlang}/bin/erl \ -pa $out/lib/${name}/ebin -run wings_start start_halt "$@" EOF chmod +x $out/bin/wings diff --git a/pkgs/development/libraries/esdl/default.nix b/pkgs/development/libraries/esdl/default.nix deleted file mode 100644 index 7b40359837a3..000000000000 --- a/pkgs/development/libraries/esdl/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{stdenv, fetchurl, SDL, libGLU_combined, rebar, erlang}: - -stdenv.mkDerivation rec { - name = "esdl-1.3.1"; - - src = fetchurl { - url = "mirror://sourceforge/esdl/${name}.src.tgz"; - sha256 = "0f5ad519600qarsa2anmnaxh6b7djzx1dnwxzi4l36pxsq896y01"; - }; - - buildInputs = [ erlang rebar ]; - propagatedBuildInputs = [ SDL libGLU_combined ]; - - buildPhase = '' - rebar compile - ''; - - # 'cp' line taken from Arch recipe - # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl - installPhase = '' - DIR=$out/lib/erlang/lib/${name} - mkdir -p $DIR - cp -ruv c_src doc ebin include priv src $DIR - ''; - - meta = { - homepage = http://esdl.sourceforge.net/; - description = "Erlang binding to SDL that includes a binding to OpenGL"; - license = "BSD"; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38f03cd8de98..34bf096fcd99 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9657,8 +9657,6 @@ in epoxy = callPackage ../development/libraries/epoxy {}; - esdl = callPackage ../development/libraries/esdl { }; - libesmtp = callPackage ../development/libraries/libesmtp { }; exiv2 = callPackage ../development/libraries/exiv2 { }; @@ -19993,8 +19991,7 @@ in winswitch = callPackage ../tools/X11/winswitch { }; wings = callPackage ../applications/graphics/wings { - esdl = esdl.override { erlang = erlangR18; }; - erlang = erlangR18; + erlang = erlangR21; }; write_stylus = libsForQt5.callPackage ../applications/graphics/write_stylus { };