diff options
author | stewart <stewart@chaatz.com> | 2014-10-12 03:05:46 +0800 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2014-11-09 19:26:55 +0300 |
commit | a5756e79f2922eba0f1d7035b3bf0d89c290b808 (patch) | |
tree | 99585f6617c048d547fa514174a1475fa9884461 | |
parent | 6e508a61e71b1b39aca4930f35a0a0794c4b2940 (diff) | |
download | nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar.gz nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar.bz2 nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar.lz nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar.xz nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.tar.zst nixlib-a5756e79f2922eba0f1d7035b3bf0d89c290b808.zip |
depricate mozart-1.4 for mozart-2
-rw-r--r-- | pkgs/development/compilers/mozart/builder.sh | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/mozart/default.nix | 28 |
2 files changed, 47 insertions, 7 deletions
diff --git a/pkgs/development/compilers/mozart/builder.sh b/pkgs/development/compilers/mozart/builder.sh new file mode 100644 index 000000000000..90eb3092db4a --- /dev/null +++ b/pkgs/development/compilers/mozart/builder.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +source $stdenv/setup + +echo "unpacking $src..." +tar xvfz $src + +mkdir -p $out/bin +mkdir -p $out/share + +mv mozart*linux/bin/* $out/bin +mv mozart*linux/share/* $out/share + +patchShebangs $out + +for f in $out/bin/*; do + b=$(basename $f) + if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then + patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath $libPath \ + $f + continue; + fi + wrapProgram $f \ + --set OZHOME $out +done diff --git a/pkgs/development/compilers/mozart/default.nix b/pkgs/development/compilers/mozart/default.nix index d649ef46918f..66259c85b241 100644 --- a/pkgs/development/compilers/mozart/default.nix +++ b/pkgs/development/compilers/mozart/default.nix @@ -1,14 +1,28 @@ -{stdenv, fetchurl, flex, bison, perl, gmp, zlib, tcl, tk, gdbm, m4, x11, emacs}: +{ stdenv, fetchurl, bash, makeWrapper, coreutils, emacs, tcl, tk, boost, gmp, cacert }: +let + version = "2.0.0"; +in stdenv.mkDerivation { - name = "mozart-1.4.0"; + name = "mozart-${version}"; + src = fetchurl { - url = http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-src.tar.gz; - sha256 = "5da73d80b5aa7fa42edca64159a1a076323f090e5c548f3747f94d0afc60b223"; + url = "http://sourceforge.net/projects/mozart-oz/files/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz"; + sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z"; }; - buildInputs = [flex bison perl gmp zlib tcl tk gdbm m4 x11 emacs]; + libPath = stdenv.lib.makeLibraryPath + [stdenv.gcc.gcc emacs tk tcl boost gmp]; + + builder = ./builder.sh; + + buildInputs = [ makeWrapper ]; - # micq gives a compile error for me - configureFlags = "--with-tcl=${tcl}/lib --with-tk=${tk}/lib --disable-contrib-micq"; + meta = with stdenv.lib; { + homepage = "http://www.mozart-oz.org/"; + description = "The Mozart Programming System combines ongoing research in programming language design and implementation, constraint logic programming, distributed computing, and human-computer interfaces. Mozart implements the Oz language and provides both expressive power and advanced functionality."; + + license = licenses.mit; + platforms = platforms.unix; + }; } |