2010-07-28 20:01:17 +02:00
|
|
|
{ stdenv, fetchurl, jdk, jre, ant, coreutils, gnugrep }:
|
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
stdenv.mkDerivation {
|
2011-09-16 22:50:24 +02:00
|
|
|
name = "freemind-0.9.0";
|
2007-12-12 07:42:37 +01:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2011-09-16 22:50:24 +02:00
|
|
|
url = mirror://sourceforge/freemind/freemind-src-0.9.0.tar.gz;
|
|
|
|
sha256 = "1qd535gwx00d8z56mplxli5529yds2gsmbgla5b0bhhmsdwmrxmf";
|
2007-12-12 07:42:37 +01:00
|
|
|
};
|
|
|
|
|
2010-07-28 20:01:17 +02:00
|
|
|
buildInputs = [ jdk ant ];
|
2007-12-12 07:42:37 +01:00
|
|
|
|
2010-07-28 20:01:17 +02:00
|
|
|
phases = "unpackPhase patchPhase buildPhase installPhase";
|
2010-02-16 22:29:35 +01:00
|
|
|
|
2010-07-28 20:01:17 +02:00
|
|
|
patchPhase = ''
|
2010-02-16 22:29:35 +01:00
|
|
|
# There is a complain about this. I don't understand it.
|
|
|
|
mkdir plugins/plugins
|
|
|
|
'';
|
2007-12-12 07:42:37 +01:00
|
|
|
|
|
|
|
buildPhase="ant dist";
|
2010-07-28 20:01:17 +02:00
|
|
|
|
|
|
|
# LIBXCB_ALLOW_SLOPPY_LOCK=true :
|
|
|
|
# don't know yet what this option really means but I'm no longer getting
|
|
|
|
# Checking Java Version...
|
|
|
|
# Locking assertion failure. Backtrace:
|
|
|
|
# java: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed
|
|
|
|
# this way
|
|
|
|
# reference and more info https://bugs.launchpad.net/ubuntu/+source/sun-java5/+bug/86103
|
|
|
|
# JDK 7 beta seems to have fixed this (bug ?)
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/{bin,nix-support}
|
2008-09-07 23:17:49 +02:00
|
|
|
cp -r ../bin/dist $out/nix-support
|
|
|
|
sed -i 's/which/type -p/' $out/nix-support/dist/freemind.sh
|
|
|
|
cat > $out/bin/freemind << EOF
|
|
|
|
#!/bin/sh
|
2010-07-28 20:01:17 +02:00
|
|
|
export PATH=${coreutils}/bin:${gnugrep}/bin:"$PATH"
|
2009-10-13 23:45:30 +02:00
|
|
|
export JAVA_HOME="${jre}"
|
|
|
|
export LIBXCB_ALLOW_SLOPPY_LOCK=true
|
|
|
|
$out/nix-support/dist/freemind.sh
|
2008-09-07 23:17:49 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/{bin/freemind,nix-support/dist/freemind.sh}
|
2010-07-28 20:01:17 +02:00
|
|
|
'';
|
2007-12-12 07:42:37 +01:00
|
|
|
|
|
|
|
meta = {
|
2010-07-28 20:01:17 +02:00
|
|
|
description = "Mind-mapping software";
|
|
|
|
homepage = http://freemind.sourceforge.net/wiki/index.php/Main_Page;
|
|
|
|
license = "GPL";
|
2007-12-12 07:42:37 +01:00
|
|
|
};
|
|
|
|
}
|