@@ -0,0 +1,63 @@
1+{ stdenv, lib, dpkg, fetchurl, gtk2, jre, libXtst, makeWrapper }:
3+stdenv.mkDerivation rec {
4+ name = "xmind-${version}";
5+ version = "7.5-update1";
7+ src = if stdenv.system == "i686-linux" then fetchurl {
8+ url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb";
9+ sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1";
10+ } else if stdenv.system == "x86_64-linux" then fetchurl {
11+ url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb";
12+ sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9";
13+ } else throw "platform ${stdenv.system} not supported!";
15+ nativeBuildInputs = [ dpkg makeWrapper ];
17+ unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
23+ libPath = lib.makeLibraryPath [ gtk2 libXtst ];
27+ cp -r usr/lib/xmind $out/libexec
28+ cp -r usr/bin usr/share $out
29+ rm $out/libexec/XMind.ini
30+ mv etc/XMind.ini $out/libexec
32+ patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
35+ wrapProgram $out/libexec/XMind \
36+ --prefix LD_LIBRARY_PATH : "${libPath}"
38+ substituteInPlace "$out/bin/XMind" \
39+ --replace '/usr/lib/xmind' "$out/libexec"
41+ ln -s ${jre} $out/libexec/jre
44+ meta = with stdenv.lib; {
45+ description = "Mind-mapping software";
47+ XMind is a mind mapping and brainstorming software. In addition
48+ to the management elements, the software can capture ideas,
49+ clarify thinking, manage complex information, and promote team
50+ collaboration for higher productivity.
52+ It supports mind maps, fishbone diagrams, tree diagrams,
53+ organization charts, spreadsheets, etc. Normally, it is used for
54+ knowledge management, meeting minutes, task management, and
55+ GTD. Meanwhile, XMind can read FreeMind and MindManager files,
56+ and save to Evernote.
58+ homepage = http://www.xmind.net/;
59+ license = licenses.unfree;
60+ platforms = platforms.linux;
61+ maintainers = with maintainers; [ michalrus ];