about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorDamien Cassou <damien.cassou@gmail.com>2015-01-22 15:28:50 +0100
committerDamien Cassou <damien.cassou@gmail.com>2015-01-23 12:44:10 +0100
commit3886e1c93d214befcde3b602545f5ed975e2510d (patch)
treeeaf78175efab14624ca0e44b0916482927926afe /pkgs/tools
parent130f66b683d37a0f636e6c8283873011b196eeac (diff)
Add asynk
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/asynk/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/networking/asynk/default.nix b/pkgs/tools/networking/asynk/default.nix
new file mode 100644
index 0000000000000..cb3e1445aa390
--- /dev/null
+++ b/pkgs/tools/networking/asynk/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, python2, python2Packages, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  version = "2.0.0-rc2";
+  name = "ASynK-${version}";
+
+  src = fetchurl {
+    name = "${name}.tar.gz";
+    url = "https://github.com/skarra/ASynK/archive/v${version}.tar.gz";
+    sha256 = "14s53ijn9fpxr490ypnn92zk6h5rdadf7j3z98rah1h7l659qi1b";
+  };
+
+  propagatedBuildInputs = with python2Packages; [ python2 makeWrapper tornado requests dateutil ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp asynk.py $out/bin/
+    cp state.init.json $out/
+    cp -R config $out/
+    cp -R lib $out/
+    cp -R asynk $out/
+
+    substituteInPlace $out/bin/asynk.py \
+      --replace "ASYNK_BASE_DIR    = os.path.dirname(os.path.abspath(__file__))" "ASYNK_BASE_DIR    = \"$out\""
+
+    wrapProgram "$out/bin/asynk.py" \
+      --prefix PYTHONPATH : "$PYTHONPATH"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://asynk.io/;
+    description = "Flexible contacts synchronization program";
+    license = licenses.agpl3;
+    maintainers = [ maintainers.DamienCassou ];
+  };
+}