2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, pkg-config
|
2023-02-16 17:41:37 +00:00
|
|
|
, testers
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "bzip3";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.2.2";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kspalaiologos";
|
|
|
|
repo = "bzip3";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = finalAttrs.version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-B59Z7+5SFjt/UgppNtdUtzw96y+EVglHoKzq9Il9ud8=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-16 17:41:37 +00:00
|
|
|
echo -n "${finalAttrs.version}" > .tarball-version
|
2022-06-16 17:23:12 +00:00
|
|
|
patchShebangs build-aux
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
# build-aux/ax_subst_man_date.m4 calls git if the file exists
|
|
|
|
rm .gitignore
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2022-06-26 10:26:21 +00:00
|
|
|
pkg-config
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-arch-native"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ "--disable-link-time-optimization" ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = {
|
|
|
|
description = "A better and stronger spiritual successor to BZip2";
|
|
|
|
homepage = "https://github.com/kspalaiologos/bzip3";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/kspalaiologos/bzip3/blob/${finalAttrs.src.rev}/NEWS";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2023-02-16 17:41:37 +00:00
|
|
|
pkgConfigModules = [ "bzip3" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|