nixpkgs/pkgs/tools/backup/ddar/default.nix

41 lines
1009 B
Nix
Raw Normal View History

2018-08-06 08:28:20 +01:00
{ lib, python2, fetchFromGitHub, roundup }:
2018-02-20 16:42:34 +00:00
2018-08-06 08:28:20 +01:00
python2.pkgs.buildPythonApplication rec {
2018-02-20 16:42:34 +00:00
pname = "ddar";
version = "1.0";
src = fetchFromGitHub {
owner = "basak";
repo = pname;
rev = "v${version}";
sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm";
};
2018-02-20 16:43:22 +00:00
prePatch = ''
substituteInPlace t/local-functions \
--replace 'PATH="$ddar_src:$PATH"' 'PATH="$out/bin:$PATH"'
# Test requires additional software and compilation of some C programs
substituteInPlace t/basic-test.sh \
--replace it_stores_and_extracts_corpus0 dont_test
'';
2018-02-20 16:42:34 +00:00
preBuild = ''
make -f Makefile.prep synctus/ddar_pb2.py
'';
nativeBuildInputs = with python2.pkgs; [ protobuf.protobuf ];
2018-08-06 08:28:20 +01:00
propagatedBuildInputs = with python2.pkgs; [ protobuf ];
2018-02-20 16:42:34 +00:00
2018-02-20 16:43:22 +00:00
checkInputs = [ roundup ];
checkPhase = ''
roundup t/basic-test.sh
'';
2018-02-20 16:42:34 +00:00
meta = with lib; {
description = "Unix de-duplicating archiver";
license = licenses.gpl3;
homepage = src.meta.homepage;
};
}