diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix new file mode 100644 index 000000000000..b40a72512831 --- /dev/null +++ b/pkgs/applications/graphics/wings/default.nix @@ -0,0 +1,40 @@ +{ fetchurl, stdenv, erlang, esdl }: + +stdenv.mkDerivation rec { + name = "wings-1.3.0.1"; + src = fetchurl { + url = "mirror://sourceforge/wings/${name}.tar.bz2"; + sha256 = "1zab1qxhgrncwqj1xg6z08m0kqbkdiqp4777p1bv2kczcf31isyp"; + }; + + ERL_LIBS = "${esdl}/lib/erlang/addons"; + + 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 + ''; + + buildInputs = [ erlang esdl ]; + + installPhase = '' + ensureDir $out/bin $out/lib/${name}/ebin + cp ebin/* $out/lib/${name}/ebin + cp -R fonts textures shaders plugins $out/lib/$name + cat << EOF > $out/bin/wings + #!/bin/sh + export ROOTDIR=$out/lib/erlang/addons/${name} + ${erlang}/bin/erl -smp disable -pa ${esdl}/lib/erlang/addons/${esdl.name}/ebin \ + -pa $out/lib/${name}/ebin -run wings_start start_halt "$@" + EOF + chmod +x $out/bin/wings + ''; + + meta = { + homepage = http://www.wings3d.com/; + description = "Subdivision modeler inspired by Nendo and Mirai from Izware"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} + diff --git a/pkgs/development/interpreters/erlang/default.nix b/pkgs/development/interpreters/erlang/default.nix index 37b78942dad7..b11ef944c382 100644 --- a/pkgs/development/interpreters/erlang/default.nix +++ b/pkgs/development/interpreters/erlang/default.nix @@ -1,12 +1,12 @@ args: with args; -let version = "R13B"; in +let version = "R14A"; in stdenv.mkDerivation { name = "erlang-" + version; src = fetchurl { url = "http://www.erlang.org/download/otp_src_" + version + ".tar.gz"; - sha256 = "112889v9axhrk9x9swcgql5kpj19p14504m06h4n7b99irzxf4rg"; + sha256 = "170n5p6al1bxwngdmafm1c6892xjxppb96gzgki9gfb0mla6li73"; }; buildInputs = [perl gnum4 ncurses openssl]; patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; diff --git a/pkgs/development/libraries/esdl/default.nix b/pkgs/development/libraries/esdl/default.nix new file mode 100644 index 000000000000..ccc3318ff6b9 --- /dev/null +++ b/pkgs/development/libraries/esdl/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, SDL, mesa, erlang}: + +stdenv.mkDerivation rec { + name = "esdl-1.0.1"; + + src = fetchurl { + url = "mirror://sourceforge/esdl/${name}.src.tar.gz"; + sha256 = "0zc7cmr44v10sb593dismdm5qc2v7sm3z9yh22g4r9g6asbg5z0n"; + }; + + buildInputs = [ erlang ]; + propagatedBuildInputs = [ SDL mesa ]; + + preBuild = '' + export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}"; + ''; + + meta = { + homepage = http://esdl.sourceforge.net/; + description = "Erlang binding to SDL that includes a binding to OpenGL"; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60a99d027656..cb14dddda1bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3745,6 +3745,10 @@ let inherit fetchurl stdenv libp11 pkgconfig openssl; }; + esdl = import ../development/libraries/esdl { + inherit stdenv fetchurl erlang SDL mesa; + }; + exiv2 = import ../development/libraries/exiv2 { inherit fetchurl stdenv zlib; }; @@ -8882,6 +8886,10 @@ let graphicsSupport = false; }; + wings = import ../applications/graphics/wings { + inherit stdenv fetchurl erlang esdl; + }; + # I'm keen on wmiimenu only >wmii-3.5 no longer has it... wmiimenu = import ../applications/window-managers/wmii31 { libixp = libixp_for_wmii;