2015-01-22 17:28:50 +03:00
|
|
|
{ stdenv, fetchurl, python2, python2Packages, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-03-05 23:23:02 +03:00
|
|
|
version = "2.0.0";
|
2015-01-22 17:28:50 +03:00
|
|
|
name = "ASynK-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${name}.tar.gz";
|
|
|
|
url = "https://github.com/skarra/ASynK/archive/v${version}.tar.gz";
|
2015-03-05 23:23:02 +03:00
|
|
|
sha256 = "1bp30437mnls0kzm0525p3bg5nw9alpqrqhw186f6zp9i4y5znp1";
|
2015-01-22 17:28:50 +03:00
|
|
|
};
|
|
|
|
|
2015-03-05 23:23:02 +03:00
|
|
|
propagatedBuildInputs = with python2Packages;
|
|
|
|
[ python2 makeWrapper tornado requests dateutil
|
|
|
|
vobject gdata caldavclientlibrary-asynk ];
|
2015-01-22 17:28:50 +03:00
|
|
|
|
|
|
|
installPhase = ''
|
2015-03-05 23:23:02 +03:00
|
|
|
mkdir -p $out/bin $out/lib
|
2015-01-22 17:28:50 +03:00
|
|
|
cp asynk.py $out/bin/
|
|
|
|
cp state.init.json $out/
|
|
|
|
cp -R config $out/
|
2015-03-05 23:23:02 +03:00
|
|
|
cp lib/*.py $out/lib # */
|
|
|
|
cp -R lib/s $out/lib/
|
2015-01-22 17:28:50 +03:00
|
|
|
cp -R asynk $out/
|
|
|
|
|
|
|
|
substituteInPlace $out/bin/asynk.py \
|
|
|
|
--replace "ASYNK_BASE_DIR = os.path.dirname(os.path.abspath(__file__))" "ASYNK_BASE_DIR = \"$out\""
|
|
|
|
|
2015-03-05 23:23:02 +03:00
|
|
|
for file in `find $out/asynk -type f`; do
|
|
|
|
# Oh yeah, tab characters!
|
|
|
|
substituteInPlace $file \
|
|
|
|
--replace 'from vobject import vobject' 'from vobject import *' \
|
|
|
|
--replace 'from vobject import vobject' 'from vobject import *'
|
|
|
|
done
|
|
|
|
|
2015-01-22 17:28:50 +03:00
|
|
|
wrapProgram "$out/bin/asynk.py" \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://asynk.io/;
|
|
|
|
description = "Flexible contacts synchronization program";
|
|
|
|
license = licenses.agpl3;
|
2017-01-31 13:00:14 +03:00
|
|
|
maintainers = [ ];
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = platforms.unix;
|
2015-01-22 17:28:50 +03:00
|
|
|
};
|
|
|
|
}
|