2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2022-03-30 09:31:56 +00:00
|
|
|
, pxz
|
|
|
|
, xz
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pxz";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "4.999.9beta";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jnovy";
|
|
|
|
repo = "pxz";
|
|
|
|
rev = "124382a6d0832b13b7c091f72264f8f3f463070a";
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-NYhPujm5A0j810IKUZEHru/oLXCW7xZf5FjjKAbatZY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
patches = [ ./flush-stdout-help-version.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '`date +%Y%m%d`' '19700101'
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
substituteInPlace pxz.c \
|
|
|
|
--replace 'XZ_BINARY "xz"' 'XZ_BINARY "${lib.getBin xz}/bin/xz"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [ xz ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"BINDIR=${placeholder "out"}/bin"
|
|
|
|
"MANDIR=${placeholder "out"}/share/man"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-03-30 09:31:56 +00:00
|
|
|
package = pxz;
|
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://jnovy.fedorapeople.org/pxz/";
|
2021-07-24 12:14:16 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ pashev ];
|
|
|
|
description = "compression utility that runs LZMA compression of different parts on multiple cores simultaneously";
|
|
|
|
longDescription = ''
|
|
|
|
Parallel XZ is a compression utility that takes advantage of
|
2020-04-24 23:36:52 +00:00
|
|
|
running LZMA compression of different parts of an input file on multiple
|
|
|
|
cores and processors simultaneously. Its primary goal is to utilize all
|
|
|
|
resources to speed up compression time with minimal possible influence
|
2021-07-24 12:14:16 +00:00
|
|
|
on compression ratio
|
|
|
|
'';
|
2022-03-30 09:31:56 +00:00
|
|
|
mainProgram = "pxz";
|
2021-07-24 12:14:16 +00:00
|
|
|
platforms = with platforms; linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|