2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
|
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
|
|
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
|
|
|
# files.
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lzip";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.24.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
outputs = [ "out" "man" "info" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://savannah/lzip/${pname}-${version}.tar.gz";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-MMnLagYF9HnElsN262KaSLChaW0WfjweCQxd76SBsWI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
patches = lib.optionals stdenv.hostPlatform.isMinGW [
|
|
|
|
./mingw-install-exe-file.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"CPPFLAGS=-DNDEBUG"
|
|
|
|
"CFLAGS=-O3"
|
|
|
|
"CXXFLAGS=-O3"
|
2022-02-10 20:34:41 +00:00
|
|
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
setupHook = ./lzip-setup-hook.sh;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.nongnu.org/lzip/lzip.html";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Lossless data compressor based on the LZMA algorithm";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ vlaci ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "lzip";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|