nixpkgs/pkgs/tools/archivers/zpaq/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, perl, unzip }:
stdenv.mkDerivation rec {
name = "zpaq-${version}";
2016-09-26 14:34:18 +01:00
version = "715";
src = let
mungedVersion = with stdenv.lib; concatStrings (splitString "." version);
in fetchurl {
2016-09-26 14:34:18 +01:00
sha256 = "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8";
url = "http://mattmahoney.net/dc/zpaq${mungedVersion}.zip";
2013-03-09 12:30:22 +00:00
};
2013-03-09 12:30:22 +00:00
sourceRoot = ".";
nativeBuildInputs = [ perl /* for pod2man */ ];
buildInputs = [ unzip ];
preBuild = let
CPPFLAGS = with stdenv; ""
+ (lib.optionalString (!isi686 && !isx86_64) "-DNOJIT ")
+ "-Dunix";
CXXFLAGS = "-O3 -DNDEBUG";
in ''
buildFlagsArray=( "CPPFLAGS=${CPPFLAGS}" "CXXFLAGS=${CXXFLAGS}" )
2013-03-09 12:30:22 +00:00
'';
enableParallelBuilding = true;
installFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.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;
2016-09-26 14:44:11 +01:00
inherit version;
2013-03-09 12:30:22 +00:00
};
}