linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / tools / compression / pxz / default.nix
blobeb1f5d3570b1df72f0471a665f5a2d4aefac540b
1 { lib, stdenv, fetchgit, xz }:
3 let name = "pxz";
4     version = "4.999.9beta+git";
5 in
6 stdenv.mkDerivation {
7   name = name + "-" + version;
9   src = fetchgit {
10     url = "https://github.com/jnovy/pxz.git";
11     rev = "ae808463c2950edfdedb8fb49f95006db0a18667";
12     sha256 = "0na2kw8cf0qd8l1aywlv9m3xrxnqlcwxfdwp3f7x9vxwqx3k32kc";
13   };
15   buildInputs = [ xz ];
17   patches = [ ./_SC_ARG_MAX.patch ];
19   buildPhase = ''
20     gcc -o pxz pxz.c -llzma \
21         -fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 \
22         -DPXZ_BUILD_DATE=\"nixpkgs\" \
23         -DXZ_BINARY=\"${xz.bin}/bin/xz\" \
24         -DPXZ_VERSION=\"${version}\"
25   '';
27   installPhase = ''
28     mkdir -p $out/bin $out/share/man/man1
29     cp pxz $out/bin
30     cp pxz.1 $out/share/man/man1
31   '';
33   meta = {
34     homepage = "https://jnovy.fedorapeople.org/pxz/";
35     license = lib.licenses.gpl2Plus;
36     maintainers = with lib.maintainers; [pashev];
37     description = ''Parallel XZ is a compression utility that takes advantage of
38       running LZMA compression of different parts of an input file on multiple
39       cores and processors simultaneously. Its primary goal is to utilize all
40       resources to speed up compression time with minimal possible influence
41       on compression ratio'';
42     platforms = with lib.platforms; linux;
43   };