2022-05-20 05:31:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2022-06-26 04:14:24 +00:00
|
|
|
, pkg-config
|
2023-02-11 01:26:38 +00:00
|
|
|
, testers
|
2022-05-20 05:31:51 +00:00
|
|
|
}:
|
|
|
|
|
2023-02-11 01:26:38 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-05-20 05:31:51 +00:00
|
|
|
pname = "bzip3";
|
2023-12-07 03:56:57 +00:00
|
|
|
version = "1.4.0";
|
2022-05-20 05:31:51 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kspalaiologos";
|
|
|
|
repo = "bzip3";
|
2023-02-11 01:26:38 +00:00
|
|
|
rev = finalAttrs.version;
|
2023-12-07 03:56:57 +00:00
|
|
|
hash = "sha256-UVCZWcjlueKSGYqdm7oiJ5i7/irkWv7IOyeCWT2r4sk=";
|
2022-05-20 05:31:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-11 01:26:38 +00:00
|
|
|
echo -n "${finalAttrs.version}" > .tarball-version
|
2022-05-20 05:31:51 +00:00
|
|
|
patchShebangs build-aux
|
2022-11-07 23:05:04 +00:00
|
|
|
|
|
|
|
# build-aux/ax_subst_man_date.m4 calls git if the file exists
|
|
|
|
rm .gitignore
|
2022-05-20 05:31:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2022-06-26 04:14:24 +00:00
|
|
|
pkg-config
|
2022-05-20 05:31:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-arch-native"
|
2022-06-05 04:20:00 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-link-time-optimization" ];
|
2022-05-20 05:31:51 +00:00
|
|
|
|
2023-02-11 01:26:38 +00:00
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
2022-05-20 05:31:51 +00:00
|
|
|
meta = {
|
|
|
|
description = "Better and stronger spiritual successor to BZip2";
|
|
|
|
homepage = "https://github.com/kspalaiologos/bzip3";
|
2023-02-11 01:26:38 +00:00
|
|
|
changelog = "https://github.com/kspalaiologos/bzip3/blob/${finalAttrs.src.rev}/NEWS";
|
2022-05-20 05:31:51 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2023-02-11 01:26:38 +00:00
|
|
|
pkgConfigModules = [ "bzip3" ];
|
2022-06-05 04:20:00 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2022-05-20 05:31:51 +00:00
|
|
|
};
|
2023-02-11 01:26:38 +00:00
|
|
|
})
|