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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.4.0";
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-UVCZWcjlueKSGYqdm7oiJ5i7/irkWv7IOyeCWT2r4sk=";
|
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"
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-link-time-optimization" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
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 = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Better and stronger spiritual successor to BZip2";
|
2022-06-16 17:23:12 +00:00
|
|
|
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
|
|
|
})
|