nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 argp-standalone,
4 callPackage,
5 curl,
6 fetchFromGitHub,
7 gitUpdater,
8 meson,
9 ninja,
10 pkg-config,
11 stdenv,
12 zstd,
13}:
14
15stdenv.mkDerivation (finalAttrs: {
16 pname = "zchunk";
17 version = "1.5.1";
18
19 src = fetchFromGitHub {
20 owner = "zchunk";
21 repo = "zchunk";
22 rev = finalAttrs.version;
23 hash = "sha256-X8qywx55TUVEOfYJMV5ARwyUdMjmN4hTmJQ6Upq5zyI=";
24 };
25
26 nativeBuildInputs = [
27 meson
28 ninja
29 pkg-config
30 ];
31
32 buildInputs = [
33 curl
34 zstd
35 ]
36 ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone ];
37
38 outputs = [
39 "out"
40 "dev"
41 "lib"
42 "man"
43 ];
44
45 strictDeps = true;
46
47 passthru = {
48 updateScript = gitUpdater { };
49 tests = lib.packagesFromDirectoryRecursive {
50 inherit callPackage;
51 directory = ./tests;
52 };
53 };
54
55 meta = {
56 homepage = "https://github.com/zchunk/zchunk";
57 description = "File format designed for highly efficient deltas while maintaining good compression";
58 longDescription = ''
59 zchunk is a compressed file format that splits the file into independent
60 chunks. This allows you to only download changed chunks when downloading a
61 new version of the file, and also makes zchunk files efficient over rsync.
62
63 zchunk files are protected with strong checksums to verify that the file
64 you downloaded is, in fact, the file you wanted.
65 '';
66 license = lib.licenses.bsd2;
67 mainProgram = "zck";
68 maintainers = with lib.maintainers; [ ];
69 platforms = lib.platforms.unix;
70 };
71})