about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/archivers/zpaq/default.nix
blob: 7c394e27d178f8a864da568b350dcff6a4ac5805 (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
31
32
33
{ lib, stdenv, fetchFromGitHub, perl }:

stdenv.mkDerivation rec {
  pname = "zpaq";
  version = "7.15";

  src = fetchFromGitHub {
    owner = "zpaq";
    repo = "zpaq";
    rev = version;
    sha256 = "0v44rlg9gvwc4ggr2lhcqll8ppal3dk7zsg5bqwcc5lg3ynk2pz4";
  };

  nativeBuildInputs = [ perl /* for pod2man */ ];

  CPPFLAGS = [ "-Dunix" ] ++
    lib.optional (!stdenv.isi686 && !stdenv.isx86_64) "-DNOJIT";
  CXXFLAGS = [ "-O3" "-DNDEBUG" ];

  enableParallelBuilding = true;

  makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
  installFlags = [ "PREFIX=$(out)" ];

  meta = with lib; {
    description = "Incremental journaling backup utility and archiver";
    homepage = "http://mattmahoney.net/dc/zpaq.html";
    license = licenses.gpl3Plus ;
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.linux;
    mainProgram = "zpaq";
  };
}