2018-06-21 23:14:02 +02:00
|
|
|
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch
|
|
|
|
, utillinux, pygit2, gitMinimal, git-annex
|
|
|
|
}:
|
2017-10-14 12:54:31 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "git-annex-adapter";
|
2018-12-18 14:44:37 +01:00
|
|
|
version = "0.2.1";
|
2017-10-14 12:54:31 +02:00
|
|
|
|
2018-04-07 20:28:12 +02:00
|
|
|
disabled = !isPy3k;
|
2017-10-14 12:54:31 +02:00
|
|
|
|
2018-12-18 14:44:37 +01:00
|
|
|
# No tests in PyPI tarball
|
2017-10-14 12:54:31 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpernebbi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2018-12-18 14:44:37 +01:00
|
|
|
sha256 = "146q1jhcfc7f96ajkhjffskkljk2xzivs5ih5clb8qx0sh7mj097";
|
2017-10-14 12:54:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace git_annex_adapter/process.py \
|
|
|
|
--replace "'git', 'annex'" "'${git-annex}/bin/git-annex'" \
|
|
|
|
--replace "'git-annex'" "'${git-annex}/bin/git-annex'"
|
|
|
|
'';
|
|
|
|
|
2018-04-07 20:28:12 +02:00
|
|
|
checkInputs = [
|
|
|
|
utillinux # `rev` is needed in tests/test_process.py
|
2017-10-14 12:54:31 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pygit2 gitMinimal ];
|
|
|
|
|
|
|
|
buildInputs = [ git-annex ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
python -m unittest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/alpernebbi/git-annex-adapter;
|
|
|
|
description = "Call git-annex commands from Python";
|
|
|
|
license = licenses.gpl3Plus;
|
2018-06-21 23:14:02 +02:00
|
|
|
maintainers = with maintainers; [ dotlambda ma27 ];
|
2017-10-14 12:54:31 +02:00
|
|
|
};
|
|
|
|
}
|