2015-05-04 12:57:11 +01:00
|
|
|
{ stdenv, fetchurl, jdk, jre, ant }:
|
2010-07-28 19:01:17 +01:00
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "freemind";
|
2015-05-04 12:57:11 +01:00
|
|
|
version = "1.0.1";
|
2007-12-12 06:42:37 +00:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2015-05-04 12:57:11 +01:00
|
|
|
url = "mirror://sourceforge/freemind/freemind-src-${version}.tar.gz";
|
|
|
|
sha256 = "06c6pm7hpwh9hbmyah3lj2wp1g957x8znfwc5cwygsi7dc98b0h1";
|
2007-12-12 06:42:37 +00:00
|
|
|
};
|
|
|
|
|
2010-07-28 19:01:17 +01:00
|
|
|
buildInputs = [ jdk ant ];
|
2007-12-12 06:42:37 +00:00
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
preConfigure = ''
|
|
|
|
chmod +x check_for_duplicate_resources.sh
|
|
|
|
sed 's,/bin/bash,${stdenv.shell},' -i check_for_duplicate_resources.sh
|
2010-02-16 21:29:35 +00:00
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
## work around javac encoding errors
|
|
|
|
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
|
2010-02-16 21:29:35 +00:00
|
|
|
'';
|
2007-12-12 06:42:37 +00:00
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
buildPhase = "ant dist";
|
2010-07-28 19:01:17 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/{bin,nix-support}
|
2008-09-07 22:17:49 +01:00
|
|
|
cp -r ../bin/dist $out/nix-support
|
|
|
|
sed -i 's/which/type -p/' $out/nix-support/dist/freemind.sh
|
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
cat >$out/bin/freemind <<EOF
|
2019-01-15 22:41:31 +00:00
|
|
|
#! ${stdenv.shell}
|
2015-05-04 12:57:11 +01:00
|
|
|
JAVA_HOME=${jre} $out/nix-support/dist/freemind.sh
|
|
|
|
EOF
|
2008-09-07 22:17:49 +01:00
|
|
|
chmod +x $out/{bin/freemind,nix-support/dist/freemind.sh}
|
2010-07-28 19:01:17 +01:00
|
|
|
'';
|
2007-12-12 06:42:37 +00:00
|
|
|
|
2015-05-04 12:57:11 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-07-28 19:01:17 +01:00
|
|
|
description = "Mind-mapping software";
|
|
|
|
homepage = http://freemind.sourceforge.net/wiki/index.php/Main_Page;
|
2015-05-04 12:57:11 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2007-12-12 06:42:37 +00:00
|
|
|
}
|