From 70a05bcfaab04de980c70ac42934cf17636cad07 Mon Sep 17 00:00:00 2001 From: Milan Svoboda Date: Sun, 30 Dec 2018 15:25:05 +0100 Subject: [PATCH 1/2] wings3d: 1.5.4 -> 2.2.1 --- pkgs/applications/graphics/wings/default.nix | 29 +++++++++--------- pkgs/development/libraries/esdl/default.nix | 32 -------------------- pkgs/top-level/all-packages.nix | 5 +-- 3 files changed, 16 insertions(+), 50 deletions(-) delete mode 100644 pkgs/development/libraries/esdl/default.nix diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix index 9ecf94e21c01..be2b2b51a73e 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 icons 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 9494790f0666..e670c14cd694 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9649,8 +9649,6 @@ in epoxy = callPackage ../development/libraries/epoxy {}; - esdl = callPackage ../development/libraries/esdl { }; - libesmtp = callPackage ../development/libraries/libesmtp { }; exiv2 = callPackage ../development/libraries/exiv2 { }; @@ -19953,8 +19951,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 { }; From c65e727236e9222c49cc0eb8b157c0352190657d Mon Sep 17 00:00:00 2001 From: Milan Svoboda Date: Sun, 30 Dec 2018 15:47:32 +0100 Subject: [PATCH 2/2] remove icons folder --- pkgs/applications/graphics/wings/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix index be2b2b51a73e..ed3220d2bf96 100644 --- a/pkgs/applications/graphics/wings/default.nix +++ b/pkgs/applications/graphics/wings/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin $out/lib/${name}/ebin cp ebin/* $out/lib/${name}/ebin - cp -R icons textures shaders plugins $out/lib/$name + cp -R textures shaders plugins $out/lib/$name cat << EOF > $out/bin/wings #!/bin/sh ${erlang}/bin/erl \