From f4b98ac64f26de87c0e9f1e91137414d4f14045c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 17:43:22 +0100 Subject: [PATCH] ddar: fix tests --- pkgs/tools/backup/ddar/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/backup/ddar/default.nix b/pkgs/tools/backup/ddar/default.nix index d09ffdcdc4d2..eac589813f47 100644 --- a/pkgs/tools/backup/ddar/default.nix +++ b/pkgs/tools/backup/ddar/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonApplication, fetchFromGitHub, python, protobuf, sqlite, roundup }: +{ lib, buildPythonApplication, fetchFromGitHub, python, protobuf, roundup }: buildPythonApplication rec { pname = "ddar"; @@ -11,12 +11,26 @@ buildPythonApplication rec { sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm"; }; + 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 + ''; + preBuild = '' make -f Makefile.prep synctus/ddar_pb2.py ''; propagatedBuildInputs = [ protobuf ]; + checkInputs = [ roundup ]; + + checkPhase = '' + roundup t/basic-test.sh + ''; + meta = with lib; { description = "Unix de-duplicating archiver"; license = licenses.gpl3;