xmind: 7.5-update1 -> 8-update8 (#61224)
xmind: 7.5-update1 -> 8-update8
This commit is contained in:
commit
3153c2a555
@ -1,20 +1,23 @@
|
|||||||
{ stdenv, lib, dpkg, fetchurl, gtk2, jre, libXtst, makeWrapper }:
|
{ stdenv, lib, fetchzip, fetchurl, gtk2, jre, libXtst, makeWrapper, makeDesktopItem, runtimeShell }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "xmind-${version}";
|
name = "xmind-${version}";
|
||||||
version = "7.5-update1";
|
version = "8-update8";
|
||||||
|
|
||||||
src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
|
src = fetchzip {
|
||||||
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb";
|
url = "https://xmind.net/xmind/downloads/${name}-linux.zip";
|
||||||
sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1";
|
stripRoot = false;
|
||||||
} else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
|
sha256 = "1p68z0b4brgiyybz190alqv716ncql49vsksm41y90mcjd8s4jhn";
|
||||||
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb";
|
};
|
||||||
sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9";
|
|
||||||
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
srcIcon = fetchurl {
|
||||||
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/xmind.png?h=xmind";
|
||||||
|
sha256 = "0jxq2fiq69q9ly0m6hx2qfybqad22sl42ciw636071khpqgc885f";
|
||||||
|
};
|
||||||
|
|
||||||
unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
|
patches = [ ./java-env-config-fixes.patch ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
@ -22,12 +25,27 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
libPath = lib.makeLibraryPath [ gtk2 libXtst ];
|
libPath = lib.makeLibraryPath [ gtk2 libXtst ];
|
||||||
|
|
||||||
installPhase = ''
|
desktopItem = makeDesktopItem {
|
||||||
mkdir -p $out
|
name = "XMind";
|
||||||
cp -r usr/lib/xmind $out/libexec
|
exec = "XMind";
|
||||||
cp -r usr/bin usr/share $out
|
icon = "xmind";
|
||||||
rm $out/libexec/XMind.ini
|
desktopName = "XMind";
|
||||||
mv etc/XMind.ini $out/libexec
|
comment = meta.description;
|
||||||
|
categories = "Office;";
|
||||||
|
mimeType = "application/xmind;xscheme-handler/xmind";
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
||||||
$out/libexec/XMind
|
$out/libexec/XMind
|
||||||
@ -35,8 +53,17 @@ stdenv.mkDerivation rec {
|
|||||||
wrapProgram $out/libexec/XMind \
|
wrapProgram $out/libexec/XMind \
|
||||||
--prefix LD_LIBRARY_PATH : "${libPath}"
|
--prefix LD_LIBRARY_PATH : "${libPath}"
|
||||||
|
|
||||||
substituteInPlace "$out/bin/XMind" \
|
# Inspired by https://aur.archlinux.org/cgit/aur.git/tree/?h=xmind
|
||||||
--replace '/usr/lib/xmind' "$out/libexec"
|
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
|
||||||
|
|
||||||
ln -s ${jre} $out/libexec/jre
|
ln -s ${jre} $out/libexec/jre
|
||||||
'';
|
'';
|
||||||
@ -55,9 +82,9 @@ stdenv.mkDerivation rec {
|
|||||||
GTD. Meanwhile, XMind can read FreeMind and MindManager files,
|
GTD. Meanwhile, XMind can read FreeMind and MindManager files,
|
||||||
and save to Evernote.
|
and save to Evernote.
|
||||||
'';
|
'';
|
||||||
homepage = http://www.xmind.net/;
|
homepage = https://www.xmind.net/;
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ michalrus ];
|
maintainers = with maintainers; [ michalrus ma27 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
40
pkgs/applications/misc/xmind/java-env-config-fixes.patch
Normal file
40
pkgs/applications/misc/xmind/java-env-config-fixes.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
diff --git a/XMind_amd64/XMind.ini b/XMind_amd64/XMind.ini
|
||||||
|
index bdd8a37..5f35daf 100644
|
||||||
|
--- a/XMind_amd64/XMind.ini
|
||||||
|
+++ b/XMind_amd64/XMind.ini
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
-configuration
|
||||||
|
-./configuration
|
||||||
|
+@user.home/.xmind/configuration-cathy_linux_64
|
||||||
|
-data
|
||||||
|
-../workspace
|
||||||
|
+@user.home/.xmind/workspace-cathy
|
||||||
|
-startup
|
||||||
|
-../plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
|
||||||
|
+plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
|
||||||
|
--launcher.library
|
||||||
|
-../plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
|
||||||
|
+plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
|
||||||
|
--launcher.defaultAction
|
||||||
|
openFile
|
||||||
|
--launcher.GTK_version
|
||||||
|
diff --git a/XMind_i386/XMind.ini b/XMind_i386/XMind.ini
|
||||||
|
index 4ed3225..1d74258 100644
|
||||||
|
--- a/XMind_i386/XMind.ini
|
||||||
|
+++ b/XMind_i386/XMind.ini
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
-configuration
|
||||||
|
-./configuration
|
||||||
|
+@user.home/.xmind/configuration-cathy_linux_64
|
||||||
|
-data
|
||||||
|
-../workspace
|
||||||
|
+@user.home/.xmind/workspace-cathy
|
||||||
|
-startup
|
||||||
|
-../plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
|
||||||
|
+plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
|
||||||
|
--launcher.library
|
||||||
|
-../plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.400.v20160518-1444
|
||||||
|
+plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.400.v20160518-1444
|
||||||
|
--launcher.defaultAction
|
||||||
|
openFile
|
||||||
|
--launcher.GTK_version
|
Loading…
Reference in New Issue
Block a user