1{ lib, python2, fetchFromGitHub, roundup, ncurses }:
2
3python2.pkgs.buildPythonApplication rec {
4 pname = "ddar";
5 version = "1.0";
6
7 src = fetchFromGitHub {
8 owner = "basak";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm";
12 };
13
14 prePatch = ''
15 substituteInPlace t/local-functions \
16 --replace 'PATH="$ddar_src:$PATH"' 'PATH="$out/bin:$PATH"'
17 # Test requires additional software and compilation of some C programs
18 substituteInPlace t/basic-test.sh \
19 --replace it_stores_and_extracts_corpus0 dont_test
20 '';
21
22 preBuild = ''
23 make -f Makefile.prep synctus/ddar_pb2.py
24 '';
25
26 nativeBuildInputs = with python2.pkgs; [ protobuf.protobuf ];
27 propagatedBuildInputs = with python2.pkgs; [ protobuf ];
28
29 checkInputs = [ roundup ncurses ];
30
31 checkPhase = ''
32 roundup t/basic-test.sh
33 '';
34
35 meta = with lib; {
36 description = "Unix de-duplicating archiver";
37 license = licenses.gpl3;
38 homepage = src.meta.homepage;
39 };
40}