about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/zs/zsync/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/zs/zsync/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/zs/zsync/package.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/zs/zsync/package.nix b/nixpkgs/pkgs/by-name/zs/zsync/package.nix
new file mode 100644
index 000000000000..94aa7acce2e0
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/zs/zsync/package.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "zsync";
+  version = "0.6.2";
+
+  src = fetchurl {
+    url = "http://zsync.moria.org.uk/download/${pname}-${version}.tar.bz2";
+    sha256 = "1wjslvfy76szf0mgg2i9y9q30858xyjn6v2acc24zal76d1m778b";
+  };
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    # Suppress error "call to undeclared library function 'strcasecmp'" during compilation.
+    # The function is found by the linker correctly, so this doesn't introduce any issues.
+    NIX_CFLAGS_COMPILE = " -Wno-implicit-function-declaration";
+  };
+
+  makeFlags = [ "AR=${stdenv.cc.bintools.targetPrefix}ar" ];
+
+  meta = with lib; {
+    homepage = "http://zsync.moria.org.uk/";
+    description = "File distribution system using the rsync algorithm";
+    license = licenses.artistic2;
+    maintainers = with maintainers; [ viric ];
+    platforms = with platforms; all;
+  };
+}