2016-03-18 06:02:18 +01:00
|
|
|
{ stdenv, fetchurl, perl, unzip }:
|
2013-03-09 13:30:22 +01:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="zpaq";
|
2016-03-18 06:02:18 +01:00
|
|
|
version="706";
|
2013-03-09 13:30:22 +01:00
|
|
|
name="${baseName}-${version}";
|
2016-03-18 06:02:18 +01:00
|
|
|
hash="0wn5hs02aac61rjbba3s6wibyk73f1mfcbqnf34hcpyj2gl5i59k";
|
|
|
|
url="http://mattmahoney.net/dc/zpaq706.zip";
|
|
|
|
sha256="0wn5hs02aac61rjbba3s6wibyk73f1mfcbqnf34hcpyj2gl5i59k";
|
2013-03-09 13:30:22 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
2015-12-31 04:50:57 +01:00
|
|
|
|
2013-03-09 13:30:22 +01:00
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
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; {
|
2013-03-09 13:30:22 +01:00
|
|
|
inherit (s) version;
|
2015-12-31 04:50:57 +01:00
|
|
|
description = "Incremental journaling backup utility and archiver";
|
|
|
|
license = licenses.gpl3Plus ;
|
|
|
|
maintainers = with maintainers; [ raskin nckx ];
|
|
|
|
platforms = platforms.linux;
|
2013-03-09 13:30:22 +01:00
|
|
|
homepage = "http://mattmahoney.net/dc/zpaq.html";
|
|
|
|
};
|
|
|
|
}
|