2019-02-20 14:05:16 +00:00
|
|
|
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, substituteAll
|
|
|
|
, python, utillinux, pygit2, gitMinimal, git-annex
|
2018-06-21 22:14:02 +01:00
|
|
|
}:
|
2017-10-14 11:54:31 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "git-annex-adapter";
|
2018-12-18 13:44:37 +00:00
|
|
|
version = "0.2.1";
|
2017-10-14 11:54:31 +01:00
|
|
|
|
2018-04-07 19:28:12 +01:00
|
|
|
disabled = !isPy3k;
|
2017-10-14 11:54:31 +01:00
|
|
|
|
2018-12-18 13:44:37 +00:00
|
|
|
# No tests in PyPI tarball
|
2017-10-14 11:54:31 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alpernebbi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2018-12-18 13:44:37 +00:00
|
|
|
sha256 = "146q1jhcfc7f96ajkhjffskkljk2xzivs5ih5clb8qx0sh7mj097";
|
2017-10-14 11:54:31 +01:00
|
|
|
};
|
|
|
|
|
2019-02-20 14:05:16 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./git-annex-path.patch;
|
|
|
|
gitAnnex = "${git-annex}/bin/git-annex";
|
|
|
|
})
|
|
|
|
];
|
2017-10-14 11:54:31 +01:00
|
|
|
|
2018-04-07 19:28:12 +01:00
|
|
|
checkInputs = [
|
2019-02-20 14:05:16 +00:00
|
|
|
gitMinimal
|
2018-04-07 19:28:12 +01:00
|
|
|
utillinux # `rev` is needed in tests/test_process.py
|
2017-10-14 11:54:31 +01:00
|
|
|
];
|
|
|
|
|
2019-02-20 14:05:16 +00:00
|
|
|
propagatedBuildInputs = [ pygit2 ];
|
2017-10-14 11:54:31 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-02-20 14:05:16 +00:00
|
|
|
${python.interpreter} -m unittest
|
2017-10-14 11:54:31 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/alpernebbi/git-annex-adapter";
|
2017-10-14 11:54:31 +01:00
|
|
|
description = "Call git-annex commands from Python";
|
|
|
|
license = licenses.gpl3Plus;
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-10-14 11:54:31 +01:00
|
|
|
};
|
|
|
|
}
|