crashplan: 3.6.4 -> 4.6.0

* the major change is to set TARGETDIR=${vardir}, and symlink from
${vardir} back to ${out} instead of the other way around. this
gives CP more liberty to write to more directories -- in particular
it seems to want to write some configuration files outside of conf?

* run.conf does not need 'export'

* minor tweaks to CrashPlanDesktop.patch

+27 -15
+8
nixos/modules/services/backup/crashplan.nix
··· 48 48 ensureDir ${crashplan.vardir}/cache 700 49 49 ensureDir ${crashplan.vardir}/backupArchives 700 50 50 ensureDir ${crashplan.vardir}/log 777 51 + cp -avn ${crashplan}/conf.template/* ${crashplan.vardir}/conf 52 + for x in app.asar bin EULA.txt install.vars lang lib libjniwrap64.so libjniwrap.so libjtux64.so libjtux.so libmd564.so libmd5.so share skin upgrade; do 53 + if [ -e $x ]; then 54 + true; 55 + else 56 + ln -s ${crashplan}/$x ${crashplan.vardir}/$x; 57 + fi; 58 + done 51 59 ''; 52 60 53 61 serviceConfig = {
+10 -6
pkgs/applications/backup/crashplan/CrashPlanDesktop.patch
··· 1 - --- ./scripts/CrashPlanDesktop 2014-12-18 09:51:14.050804325 +0100 2 - +++ ./scripts/CrashPlanDesktop-1 2014-12-18 09:51:32.271009382 +0100 3 - @@ -9,4 +9,4 @@ 4 - 1 + --- ./scripts/CrashPlanDesktop 2016-03-02 21:01:58.000000000 -0500 2 + +++ ./scripts/CrashPlanDesktop-1 2016-03-18 20:52:10.117686266 -0400 3 + @@ -11,7 +11,7 @@ 5 4 cd ${TARGETDIR} 6 5 7 - -${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop > ${TARGETDIR}/log/ui_output.log 2> ${TARGETDIR}/log/ui_error.log & 8 - +${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop & 6 + if [ "_${VERSION_5_UI}" == "_true" ]; then 7 + - ${TARGETDIR}/electron/crashplan > ${TARGETDIR}/log/ui_output.log 2> ${TARGETDIR}/log/ui_error.log & 8 + + ${TARGETDIR}/electron/crashplan & 9 + else 10 + - ${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop > ${TARGETDIR}/log/ui_output.log 2> ${TARGETDIR}/log/ui_error.log & 11 + + ${JAVACOMMON} ${GUI_JAVA_OPTS} -classpath "./lib/com.backup42.desktop.jar:./lang:./skin" com.backup42.desktop.CPDesktop & 12 + fi
+9 -9
pkgs/applications/backup/crashplan/default.nix
··· 1 1 { stdenv, fetchurl, makeWrapper, jre, cpio, gawk, gnugrep, gnused, procps, swt, gtk2, glib, libXtst }: 2 2 3 - let version = "3.6.4"; 3 + let version = "4.6.0"; 4 4 5 5 in stdenv.mkDerivation rec { 6 6 name = "crashplan-${version}"; 7 7 8 8 crashPlanArchive = fetchurl { 9 - url = "http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz"; 10 - sha256 = "0xmzpxfm8vghk552jy167wg1nky1pp93dqds1p922hn73g0x5cv3"; 9 + url = "https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz"; 10 + sha256 = "0h9zk6i1pdvl101c8l4v4x6i7q4wkmkqp2dkm0lq7ha96lrvac47"; 11 11 }; 12 12 13 13 srcs = [ crashPlanArchive ]; ··· 16 16 description = "An online/offline backup solution"; 17 17 homepage = "http://www.crashplan.org"; 18 18 license = licenses.unfree; 19 - broken = true; # outdated and new client has trouble starting (nullpointer exception) 20 19 maintainers = with maintainers; [ sztupi iElectric ]; 21 20 }; 22 21 ··· 38 37 # Make sure the daemon is running using the same localization as 39 38 # the (installing) user 40 39 echo "" >> run.conf 41 - echo "export LC_ALL=en_US.UTF-8" >> run.conf 40 + echo "LC_ALL=en_US.UTF-8" >> run.conf 42 41 43 42 install -d -m 755 unpacked $out 44 43 ··· 49 48 install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop 50 49 51 50 rm -r $out/log 51 + mv -v $out/conf $out/conf.template 52 52 ln -s $vardir/log $out/log 53 53 ln -s $vardir/cache $out/cache 54 54 ln -s $vardir/backupArchives $out/backupArchives 55 - ln -s $vardir/conf/service.model $out/conf/service.model 56 - ln -s $vardir/conf/my.service.xml $out/conf/my.service.xml 55 + ln -s $vardir/conf $out/conf 57 56 58 57 echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars 59 58 echo "APP_BASENAME=CrashPlan" >> $out/install.vars 60 - echo "TARGETDIR=$out" >> $out/install.vars 59 + echo "TARGETDIR=${vardir}" >> $out/install.vars 61 60 echo "BINSDIR=$out/bin" >> $out/install.vars 62 61 echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars 63 62 echo "VARDIR=${vardir}" >> $out/install.vars ··· 77 76 78 77 substituteInPlace $out/share/applications/CrashPlan.desktop \ 79 78 --replace /usr/local $out \ 80 - --replace crashplan/skin skin 79 + --replace crashplan/skin skin \ 80 + --replace bin/CrashPlanDesktop CrashPlanDesktop 81 81 82 82 wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${gtk2}/lib:${glib}/lib:${libXtst}/lib" 83 83 '';