lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 16.09-beta 86 lines 3.2 kB view raw
1{ stdenv, fetchurl, makeWrapper, jre, cpio, gawk, gnugrep, gnused, procps, swt, gtk2, glib, libXtst }: 2 3let 4 version = "4.7.0"; 5 rev = "2"; #tracks unversioned changes that occur on download.code42.com from time to time 6 7in stdenv.mkDerivation rec { 8 name = "crashplan-${version}-r${rev}"; 9 10 crashPlanArchive = fetchurl { 11 url = "https://download.code42.com/installs/linux/install/CrashPlan/CrashPlan_${version}_Linux.tgz"; 12 sha256 = "1vi6dqf8kc90axrgdcf6rwnhynxgxkc0qn6pbdp2gvkxdqxrprn8"; 13 }; 14 15 srcs = [ crashPlanArchive ]; 16 17 meta = with stdenv.lib; { 18 description = "An online/offline backup solution"; 19 homepage = "http://www.crashplan.org"; 20 license = licenses.unfree; 21 maintainers = with maintainers; [ sztupi domenkozar ]; 22 }; 23 24 buildInputs = [ makeWrapper cpio ]; 25 26 vardir = "/var/lib/crashplan"; 27 28 manifestdir = "${vardir}/manifest"; 29 30 patches = [ ./CrashPlanEngine.patch ./CrashPlanDesktop.patch ]; 31 32 installPhase = '' 33 mkdir $out 34 zcat -v CrashPlan_${version}.cpi | (cd $out; cpio -i -d -v --no-preserve-owner) 35 36 # sed -i "s|<manifestPath>manifest</manifestPath>|<manifestPath>${manifestdir}</manifestPath>|g" $out/conf/default.service.xml 37 38 # Fix for encoding troubles (CrashPlan ticket 178827) 39 # Make sure the daemon is running using the same localization as 40 # the (installing) user 41 echo "" >> run.conf 42 echo "LC_ALL=en_US.UTF-8" >> run.conf 43 44 install -d -m 755 unpacked $out 45 46 install -D -m 644 EULA.txt $out/EULA.txt 47 install -D -m 644 run.conf $out/bin/run.conf 48 install -D -m 755 scripts/CrashPlanDesktop $out/bin/CrashPlanDesktop 49 install -D -m 755 scripts/CrashPlanEngine $out/bin/CrashPlanEngine 50 install -D -m 644 scripts/CrashPlan.desktop $out/share/applications/CrashPlan.desktop 51 52 rm -r $out/log 53 mv -v $out/conf $out/conf.template 54 ln -s $vardir/log $out/log 55 ln -s $vardir/cache $out/cache 56 ln -s $vardir/backupArchives $out/backupArchives 57 ln -s $vardir/conf $out/conf 58 59 echo "JAVACOMMON=${jre}/bin/java" > $out/install.vars 60 echo "APP_BASENAME=CrashPlan" >> $out/install.vars 61 echo "TARGETDIR=${vardir}" >> $out/install.vars 62 echo "BINSDIR=$out/bin" >> $out/install.vars 63 echo "MANIFESTDIR=${manifestdir}" >> $out/install.vars 64 echo "VARDIR=${vardir}" >> $out/install.vars 65 echo "INITDIR=" >> $out/install.vars 66 echo "RUNLVLDIR=" >> $out/install.vars 67 echo "INSTALLDATE=" >> $out/install.vars 68 ''; 69 70 postFixup = '' 71 for f in $out/bin/CrashPlanDesktop $out/bin/CrashPlanEngine; do 72 echo "substitutions in $f" 73 substituteInPlace $f --replace /bin/ps ${procps}/bin/ps 74 substituteInPlace $f --replace awk ${gawk}/bin/awk 75 substituteInPlace $f --replace sed ${gnused}/bin/sed 76 substituteInPlace $f --replace grep ${gnugrep}/bin/grep 77 done 78 79 substituteInPlace $out/share/applications/CrashPlan.desktop \ 80 --replace /usr/local $out \ 81 --replace crashplan/skin skin \ 82 --replace bin/CrashPlanDesktop CrashPlanDesktop 83 84 wrapProgram $out/bin/CrashPlanDesktop --prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [ gtk2 glib libXtst ]}" 85 ''; 86}