1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
78 lines
1.9 KiB
Nix
78 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
cacert,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
git-annex,
|
|
gitMinimal,
|
|
pygit2,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
replaceVars,
|
|
util-linux,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "git-annex-adapter";
|
|
version = "0.2.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alpernebbi";
|
|
repo = "git-annex-adapter";
|
|
tag = "v${version}";
|
|
hash = "sha256-vb0vxnwAs0/yOjpyyoGWvX6Tu+cuziGNdnXbdzXexhg=";
|
|
};
|
|
|
|
patches = [
|
|
# fix tests with recent versions of git-annex
|
|
(fetchpatch {
|
|
url = "https://github.com/alpernebbi/git-annex-adapter/commit/6c210d828e8a57b12c716339ad1bf15c31cd4a55.patch";
|
|
sha256 = "17kp7pnm9svq9av4q7hfic95xa1w3z02dnr8nmg14sjck2rlmqsi";
|
|
})
|
|
(fetchpatch {
|
|
url = "https://github.com/alpernebbi/git-annex-adapter/commit/b78a8f445f1fb5cf34b28512fc61898ef166b5a1.patch";
|
|
hash = "sha256-BSVoOPWsgY1btvn68bco4yb90FAC7ay2kYZ+q9qDHHw=";
|
|
})
|
|
(fetchpatch {
|
|
url = "https://github.com/alpernebbi/git-annex-adapter/commit/d0d8905965a3659ce95cbd8f8b1e8598f0faf76b.patch";
|
|
hash = "sha256-UcRTKzD3sbXGIuxj4JzZDnvjTYyWVkfeWgKiZ1rAlus=";
|
|
})
|
|
(replaceVars ./git-annex-path.patch {
|
|
gitAnnex = "${git-annex}/bin/git-annex";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [
|
|
pygit2
|
|
cacert
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
gitMinimal
|
|
util-linux # `rev` is needed in tests/test_process.py
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "git_annex_adapter" ];
|
|
|
|
disabledTests = [
|
|
# KeyError and AssertionError
|
|
"test_annex_keys"
|
|
"test_batchjson_metadata"
|
|
"test_file_tree"
|
|
"test_jsonprocess_annex_metadata_batch"
|
|
"test_process_annex_metadata_batch"
|
|
];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/alpernebbi/git-annex-adapter";
|
|
description = "Call git-annex commands from Python";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|