nixpkgs/pkgs/development/libraries/zchunk/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

54 lines
1.2 KiB
Nix

{ stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, meson
, ninja
, zstd
, curl
, argp-standalone
}:
stdenv.mkDerivation rec {
pname = "zchunk";
version = "1.1.8";
outputs = [ "out" "lib" "dev" ];
src = fetchFromGitHub {
owner = "zchunk";
repo = pname;
rev = version;
sha256 = "0q1jafxh5nqgn2w5ciljkh8h46xma0qia8a5rj9m0pxixcacqj6q";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
zstd
curl
] ++ stdenv.lib.optional stdenv.isDarwin argp-standalone;
# Darwin needs a patch for argp-standalone usage and differing endian.h location on macOS
# https://github.com/zchunk/zchunk/pull/35
patches = [
(fetchpatch {
name = "darwin-support.patch";
url = "https://github.com/zchunk/zchunk/commit/f7db2ac0a95028a7f82ecb89862426bf53a69232.patch";
sha256 = "0cm84gyii4ly6nsmagk15g9kbfa13rw395nqk3fdcwm0dpixlkh4";
})
];
meta = with stdenv.lib; {
description = "File format designed for highly efficient deltas while maintaining good compression";
homepage = "https://github.com/zchunk/zchunk";
license = licenses.bsd2;
maintainers = with maintainers; [];
platforms = platforms.unix;
};
}