diff --git a/pkgs/by-name/zc/zchunk/package.nix b/pkgs/by-name/zc/zchunk/package.nix new file mode 100644 index 000000000000..0e7df32c08a9 --- /dev/null +++ b/pkgs/by-name/zc/zchunk/package.nix @@ -0,0 +1,70 @@ +{ + lib, + argp-standalone, + callPackage, + curl, + fetchFromGitHub, + gitUpdater, + meson, + ninja, + pkg-config, + stdenv, + zstd, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "zchunk"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "zchunk"; + repo = "zchunk"; + rev = finalAttrs.version; + hash = "sha256-X8qywx55TUVEOfYJMV5ARwyUdMjmN4hTmJQ6Upq5zyI="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + curl + zstd + ] ++ lib.optionals stdenv.isDarwin [ argp-standalone ]; + + outputs = [ + "out" + "dev" + "lib" + "man" + ]; + + strictDeps = true; + + passthru = { + updateScript = gitUpdater { }; + tests = lib.packagesFromDirectoryRecursive { + inherit callPackage; + directory = ./tests; + }; + }; + + meta = { + 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 = lib.licenses.bsd2; + mainProgram = "zck"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/zc/zchunk/tests/version.nix b/pkgs/by-name/zc/zchunk/tests/version.nix new file mode 100644 index 000000000000..936faace2dd4 --- /dev/null +++ b/pkgs/by-name/zc/zchunk/tests/version.nix @@ -0,0 +1,6 @@ +{ testers, zchunk }: + +testers.testVersion { + package = zchunk; + command = "zck --version"; +} diff --git a/pkgs/development/libraries/zchunk/default.nix b/pkgs/development/libraries/zchunk/default.nix deleted file mode 100644 index dd35961d085f..000000000000 --- a/pkgs/development/libraries/zchunk/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ 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; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 70542056c7d6..13ff80ee2fc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24411,8 +24411,6 @@ with pkgs; yyjson = callPackage ../development/libraries/yyjson { }; - zchunk = callPackage ../development/libraries/zchunk { }; - zeitgeist = callPackage ../development/libraries/zeitgeist { }; zlib = callPackage ../development/libraries/zlib { };