1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00

xdelta: add lzmaSupport; enable by default

This commit is contained in:
Tobias Geerinckx-Rice 2016-01-11 17:20:40 +01:00
parent 83289318f0
commit 5e9b49dd53

View file

@ -1,7 +1,15 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
{ stdenv, fetchFromGitHub, autoreconfHook
, lzmaSupport ? true, xz ? null
}:
let version = "3.0.11"; in
stdenv.mkDerivation {
assert lzmaSupport -> xz != null;
let
version = "3.0.11";
mkWith = flag: name: if flag
then "--with-${name}"
else "--without-${name}";
in stdenv.mkDerivation {
name = "xdelta-${version}";
src = fetchFromGitHub {
@ -12,11 +20,17 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = []
++ stdenv.lib.optionals lzmaSupport [ xz ];
postPatch = ''
cd xdelta3
'';
configureFlags = [
(mkWith lzmaSupport "liblzma")
];
enableParallelBuilding = true;
doCheck = true;