about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/zchunk
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/zchunk')
-rw-r--r--nixpkgs/pkgs/development/libraries/zchunk/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/zchunk/default.nix b/nixpkgs/pkgs/development/libraries/zchunk/default.nix
new file mode 100644
index 000000000000..dd35961d085f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zchunk/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, argp-standalone
+, curl
+, meson
+, ninja
+, pkg-config
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zchunk";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "zchunk";
+    repo = pname;
+    rev = version;
+    hash = "sha256-GiZM8Jh+v0US8xr90rySY0Ud3eAAl8UqLi162zDR3qw=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    curl
+    zstd
+  ] ++ lib.optional stdenv.isDarwin argp-standalone;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/zchunk/zchunk";
+    description = "File format designed for highly efficient deltas while maintaining good compression";
+    longDescription = ''
+      zchunk is a compressed file format that splits the file into independent
+      chunks. This allows you to only download changed chunks when downloading a
+      new version of the file, and also makes zchunk files efficient over rsync.
+
+      zchunk files are protected with strong checksums to verify that the file
+      you downloaded is, in fact, the file you wanted.
+    '';
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}