8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ lib, python2, fetchFromGitHub, roundup, ncurses }:
|
|
|
|
python2.pkgs.buildPythonApplication rec {
|
|
pname = "ddar";
|
|
version = "1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "basak";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
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
|
|
'';
|
|
|
|
nativeBuildInputs = with python2.pkgs; [ protobuf.protobuf ];
|
|
propagatedBuildInputs = with python2.pkgs; [ protobuf ];
|
|
|
|
checkInputs = [ roundup ncurses ];
|
|
|
|
checkPhase = ''
|
|
roundup t/basic-test.sh
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Unix de-duplicating archiver";
|
|
license = licenses.gpl3;
|
|
homepage = src.meta.homepage;
|
|
};
|
|
}
|