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 ensureDir ${crashplan.vardir}/cache 700 49 ensureDir ${crashplan.vardir}/backupArchives 700 50 ensureDir ${crashplan.vardir}/log 777 51 ''; 52 53 serviceConfig = {
··· 48 ensureDir ${crashplan.vardir}/cache 700 49 ensureDir ${crashplan.vardir}/backupArchives 700 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 59 ''; 60 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 - 5 cd ${TARGETDIR} 6 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 &
··· 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 @@ 4 cd ${TARGETDIR} 5 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 { stdenv, fetchurl, makeWrapper, jre, cpio, gawk, gnugrep, gnused, procps, swt, gtk2, glib, libXtst }: 2 3 - let version = "3.6.4"; 4 5 in stdenv.mkDerivation rec { 6 name = "crashplan-${version}"; 7 8 crashPlanArchive = fetchurl { 9 - url = "http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz"; 10 - sha256 = "0xmzpxfm8vghk552jy167wg1nky1pp93dqds1p922hn73g0x5cv3"; 11 }; 12 13 srcs = [ crashPlanArchive ]; ··· 16 description = "An online/offline backup solution"; 17 homepage = "http://www.crashplan.org"; 18 license = licenses.unfree; 19 - broken = true; # outdated and new client has trouble starting (nullpointer exception) 20 maintainers = with maintainers; [ sztupi iElectric ]; 21 }; 22 ··· 38 # Make sure the daemon is running using the same localization as 39 # the (installing) user 40 echo "" >> run.conf 41 - echo "export LC_ALL=en_US.UTF-8" >> run.conf 42 43 install -d -m 755 unpacked $out 44 ··· 49 install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop 50 51 rm -r $out/log 52 ln -s $vardir/log $out/log 53 ln -s $vardir/cache $out/cache 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 57 58 echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars 59 echo "APP_BASENAME=CrashPlan" >> $out/install.vars 60 - echo "TARGETDIR=$out" >> $out/install.vars 61 echo "BINSDIR=$out/bin" >> $out/install.vars 62 echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars 63 echo "VARDIR=${vardir}" >> $out/install.vars ··· 77 78 substituteInPlace $out/share/applications/CrashPlan.desktop \ 79 --replace /usr/local $out \ 80 - --replace crashplan/skin skin 81 82 wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${gtk2}/lib:${glib}/lib:${libXtst}/lib" 83 '';
··· 1 { stdenv, fetchurl, makeWrapper, jre, cpio, gawk, gnugrep, gnused, procps, swt, gtk2, glib, libXtst }: 2 3 + let version = "4.6.0"; 4 5 in stdenv.mkDerivation rec { 6 name = "crashplan-${version}"; 7 8 crashPlanArchive = fetchurl { 9 + url = "https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz"; 10 + sha256 = "0h9zk6i1pdvl101c8l4v4x6i7q4wkmkqp2dkm0lq7ha96lrvac47"; 11 }; 12 13 srcs = [ crashPlanArchive ]; ··· 16 description = "An online/offline backup solution"; 17 homepage = "http://www.crashplan.org"; 18 license = licenses.unfree; 19 maintainers = with maintainers; [ sztupi iElectric ]; 20 }; 21 ··· 37 # Make sure the daemon is running using the same localization as 38 # the (installing) user 39 echo "" >> run.conf 40 + echo "LC_ALL=en_US.UTF-8" >> run.conf 41 42 install -d -m 755 unpacked $out 43 ··· 48 install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop 49 50 rm -r $out/log 51 + mv -v $out/conf $out/conf.template 52 ln -s $vardir/log $out/log 53 ln -s $vardir/cache $out/cache 54 ln -s $vardir/backupArchives $out/backupArchives 55 + ln -s $vardir/conf $out/conf 56 57 echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars 58 echo "APP_BASENAME=CrashPlan" >> $out/install.vars 59 + echo "TARGETDIR=${vardir}" >> $out/install.vars 60 echo "BINSDIR=$out/bin" >> $out/install.vars 61 echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars 62 echo "VARDIR=${vardir}" >> $out/install.vars ··· 76 77 substituteInPlace $out/share/applications/CrashPlan.desktop \ 78 --replace /usr/local $out \ 79 + --replace crashplan/skin skin \ 80 + --replace bin/CrashPlanDesktop CrashPlanDesktop 81 82 wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${gtk2}/lib:${glib}/lib:${libXtst}/lib" 83 '';