summary refs log tree commit diff
path: root/pkgs/tools/compression/pbzip2/default.nix
blob: 94ca5eb58b1fe171af9f670673a32ff8284d9a47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl, bzip2 }:

let major = "1.1";
    version = "${major}.13";
in
stdenv.mkDerivation rec {
  pname = "pbzip2";
  inherit version;

  src = fetchurl {
    url = "https://launchpad.net/pbzip2/${major}/${version}/+download/${pname}-${version}.tar.gz";
    sha256 = "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg";
  };

  buildInputs = [ bzip2 ];

  preBuild = "substituteInPlace Makefile --replace g++ c++";

  installFlags = "PREFIX=$(out)";

  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal";

  meta = with stdenv.lib; {
    homepage = http://compression.ca/pbzip2/;
    description = "A parallel implementation of bzip2 for multi-core machines";
    license = licenses.bsd2;
    maintainers = with maintainers; [viric];
    platforms = platforms.unix;
  };
}