2019-05-10 05:34:25 +01:00
|
|
|
{ stdenv, lib, fetchzip, fetchurl, gtk2, jre, libXtst, makeWrapper, makeDesktopItem, runtimeShell }:
|
2016-09-20 15:26:22 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "xmind";
|
2019-05-10 05:34:25 +01:00
|
|
|
version = "8-update8";
|
2016-09-20 15:26:22 +01:00
|
|
|
|
2019-05-10 05:34:25 +01:00
|
|
|
src = fetchzip {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://xmind.net/xmind/downloads/${pname}-${version}-linux.zip";
|
2019-05-10 05:34:25 +01:00
|
|
|
stripRoot = false;
|
|
|
|
sha256 = "1p68z0b4brgiyybz190alqv716ncql49vsksm41y90mcjd8s4jhn";
|
|
|
|
};
|
|
|
|
|
|
|
|
srcIcon = fetchurl {
|
|
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/xmind.png?h=xmind";
|
|
|
|
sha256 = "0jxq2fiq69q9ly0m6hx2qfybqad22sl42ciw636071khpqgc885f";
|
|
|
|
};
|
2016-09-20 15:26:22 +01:00
|
|
|
|
2019-05-10 05:34:25 +01:00
|
|
|
patches = [ ./java-env-config-fixes.patch ];
|
2016-09-20 15:26:22 +01:00
|
|
|
|
2019-05-10 05:34:25 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2016-09-20 15:26:22 +01:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
libPath = lib.makeLibraryPath [ gtk2 libXtst ];
|
|
|
|
|
2019-05-10 05:34:25 +01:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "XMind";
|
|
|
|
exec = "XMind";
|
|
|
|
icon = "xmind";
|
|
|
|
desktopName = "XMind";
|
|
|
|
comment = meta.description;
|
|
|
|
categories = "Office;";
|
2019-08-22 05:30:12 +01:00
|
|
|
mimeType = "application/xmind;x-scheme-handler/xmind";
|
2019-05-10 05:34:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
targetDir = if stdenv.hostPlatform.system == "i686-linux"
|
|
|
|
then "XMind_i386"
|
|
|
|
else "XMind_amd64";
|
|
|
|
in ''
|
|
|
|
mkdir -p $out/{bin,libexec/configuration/,share/{applications/,fonts/,icons/hicolor/scalable/apps/}}
|
|
|
|
cp -r ${targetDir}/{configuration,p2,XMind{,.ini}} $out/libexec
|
|
|
|
cp -r {plugins,features} $out/libexec/
|
|
|
|
cp -r fonts $out/share/fonts/
|
|
|
|
cp "${desktopItem}/share/applications/XMind.desktop" $out/share/applications/XMind.desktop
|
|
|
|
cp ${srcIcon} $out/share/icons/hicolor/scalable/apps/xmind.png
|
2016-09-20 15:26:22 +01:00
|
|
|
|
|
|
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
|
|
|
$out/libexec/XMind
|
|
|
|
|
|
|
|
wrapProgram $out/libexec/XMind \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${libPath}"
|
|
|
|
|
2019-05-10 05:34:25 +01:00
|
|
|
# Inspired by https://aur.archlinux.org/cgit/aur.git/tree/?h=xmind
|
|
|
|
cat >$out/bin/XMind <<EOF
|
|
|
|
#! ${runtimeShell}
|
|
|
|
if [ ! -d "\$HOME/.xmind" ]; then
|
|
|
|
mkdir -p "\$HOME/.xmind/configuration-cathy/"
|
|
|
|
cp -r $out/libexec/configuration/ \$HOME/.xmind/configuration-cathy/
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec "$out/libexec/XMind" "$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/XMind
|
2016-09-20 15:26:22 +01:00
|
|
|
|
|
|
|
ln -s ${jre} $out/libexec/jre
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mind-mapping software";
|
|
|
|
longDescription = ''
|
|
|
|
XMind is a mind mapping and brainstorming software. In addition
|
|
|
|
to the management elements, the software can capture ideas,
|
|
|
|
clarify thinking, manage complex information, and promote team
|
|
|
|
collaboration for higher productivity.
|
|
|
|
|
|
|
|
It supports mind maps, fishbone diagrams, tree diagrams,
|
|
|
|
organization charts, spreadsheets, etc. Normally, it is used for
|
|
|
|
knowledge management, meeting minutes, task management, and
|
|
|
|
GTD. Meanwhile, XMind can read FreeMind and MindManager files,
|
|
|
|
and save to Evernote.
|
|
|
|
'';
|
2019-05-10 05:34:25 +01:00
|
|
|
homepage = https://www.xmind.net/;
|
2016-09-20 15:26:22 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2019-05-10 05:34:25 +01:00
|
|
|
maintainers = with maintainers; [ michalrus ma27 ];
|
2016-09-20 15:26:22 +01:00
|
|
|
};
|
|
|
|
}
|