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