2016-03-18 06:02:18 +01:00
|
|
|
{ stdenv, fetchurl, perl, unzip }:
|
2016-04-28 13:26:39 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "zpaq-${version}";
|
2016-05-06 11:09:34 +02:00
|
|
|
version = "7.13";
|
2015-12-31 04:50:57 +01:00
|
|
|
|
2016-04-28 13:26:39 +02:00
|
|
|
src = let
|
|
|
|
mungedVersion = with stdenv.lib; concatStrings (splitString "." version);
|
|
|
|
in fetchurl {
|
2016-05-06 11:09:34 +02:00
|
|
|
sha256 = "06fry12c92nxds2m5cd69h0cpxvp0mxhssagmjiwxpmgn57wy84i";
|
2016-04-28 13:26:39 +02:00
|
|
|
url = "http://mattmahoney.net/dc/zpaq${mungedVersion}.zip";
|
2013-03-09 13:30:22 +01:00
|
|
|
};
|
2015-12-31 04:50:57 +01:00
|
|
|
|
2013-03-09 13:30:22 +01:00
|
|
|
sourceRoot = ".";
|
2015-12-31 04:50:57 +01:00
|
|
|
|
2016-03-18 06:02:18 +01:00
|
|
|
nativeBuildInputs = [ perl /* for pod2man */ ];
|
2015-12-31 04:50:57 +01:00
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
2016-03-18 06:02:18 +01:00
|
|
|
preBuild = let
|
|
|
|
CPPFLAGS = with stdenv; ""
|
|
|
|
+ (lib.optionalString (!isi686 && !isx86_64) "-DNOJIT ")
|
|
|
|
+ "-Dunix";
|
|
|
|
CXXFLAGS = with stdenv; ""
|
|
|
|
+ (lib.optionalString (isi686) "-march=i686 ")
|
|
|
|
+ (lib.optionalString (isx86_64) "-march=nocona ")
|
|
|
|
+ "-O3 -mtune=generic -DNDEBUG";
|
|
|
|
in ''
|
|
|
|
buildFlagsArray=( "CPPFLAGS=${CPPFLAGS}" "CXXFLAGS=${CXXFLAGS}" )
|
2013-03-09 13:30:22 +01:00
|
|
|
'';
|
2015-12-31 04:50:57 +01:00
|
|
|
|
2016-03-18 06:02:18 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2015-12-31 04:50:57 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Incremental journaling backup utility and archiver";
|
2016-04-28 13:26:39 +02:00
|
|
|
homepage = http://mattmahoney.net/dc/zpaq.html;
|
2015-12-31 04:50:57 +01:00
|
|
|
license = licenses.gpl3Plus ;
|
|
|
|
maintainers = with maintainers; [ raskin nckx ];
|
|
|
|
platforms = platforms.linux;
|
2013-03-09 13:30:22 +01:00
|
|
|
};
|
|
|
|
}
|