1 { stdenv, lib, fetchzip, fetchurl, gtk3, jre8, libXtst, makeWrapper, makeDesktopItem, runtimeShell }:
3 stdenv.mkDerivation rec {
8 url = "https://www.xmind.app/xmind/downloads/${pname}-${version}-linux.zip";
10 sha256 = "9769c4a9d42d3370ed2c2d1bed5a5d78f1fc3dc5bd604b064b56101fc7f90bb4";
14 url = "https://aur.archlinux.org/cgit/aur.git/plain/xmind.png?h=xmind&id=41936c866b244b34d7dfbee373cbb835eed7860b";
15 sha256 = "0jxq2fiq69q9ly0m6hx2qfybqad22sl42ciw636071khpqgc885f";
18 preferLocalBuild = true;
20 patches = [ ./java-env-config-fixes.patch ];
22 nativeBuildInputs = [ makeWrapper ];
28 libPath = lib.makeLibraryPath [ gtk3 libXtst ];
30 desktopItem = makeDesktopItem {
34 desktopName = "XMind";
35 comment = meta.description;
36 categories = [ "Office" ];
37 mimeTypes = [ "application/xmind" "x-scheme-handler/xmind" ];
41 targetDir = if stdenv.hostPlatform.system == "i686-linux"
45 mkdir -p $out/{bin,libexec/configuration/,share/{applications/,fonts/,icons/hicolor/scalable/apps/}}
46 cp -r ${targetDir}/{configuration,p2,XMind{,.ini}} $out/libexec
47 cp -r {plugins,features} $out/libexec/
48 cp -r fonts $out/share/fonts/
49 cp "${desktopItem}/share/applications/XMind.desktop" $out/share/applications/XMind.desktop
50 cp ${srcIcon} $out/share/icons/hicolor/scalable/apps/xmind.png
52 patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
55 wrapProgram $out/libexec/XMind \
56 --prefix LD_LIBRARY_PATH : "${libPath}"
58 # Inspired by https://aur.archlinux.org/cgit/aur.git/tree/?h=xmind
59 cat >$out/bin/XMind <<EOF
61 if [ ! -d "\$HOME/.xmind" ]; then
62 mkdir -p "\$HOME/.xmind/configuration-cathy/"
63 cp -r $out/libexec/configuration/ \$HOME/.xmind/configuration-cathy/
66 exec "$out/libexec/XMind" "\$@"
68 chmod +x $out/bin/XMind
70 ln -s ${jre8} $out/libexec/jre
74 description = "Mind-mapping software";
76 XMind is a mind mapping and brainstorming software. In addition
77 to the management elements, the software can capture ideas,
78 clarify thinking, manage complex information, and promote team
79 collaboration for higher productivity.
81 It supports mind maps, fishbone diagrams, tree diagrams,
82 organization charts, spreadsheets, etc. Normally, it is used for
83 knowledge management, meeting minutes, task management, and
84 GTD. Meanwhile, XMind can read FreeMind and MindManager files,
87 homepage = "https://www.xmind.net/";
88 sourceProvenance = with sourceTypes; [
92 mainProgram = "XMind";
93 license = licenses.unfree;
94 platforms = platforms.linux;
95 maintainers = with maintainers; [ michalrus ];