Files
nixpkgs/pkgs/development/python-modules/gto/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

101 lines
1.9 KiB
Nix

{
lib,
buildPythonPackage,
cacert,
entrypoints,
fetchFromGitHub,
freezegun,
funcy,
gitMinimal,
pydantic,
pydantic-settings,
pytest-cov-stub,
pytest-mock,
pytest-test-utils,
pytestCheckHook,
pythonOlder,
rich,
ruamel-yaml,
scmrepo,
semver,
setuptools-scm,
setuptools,
tabulate,
typer,
}:
buildPythonPackage rec {
pname = "gto";
version = "1.9.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "iterative";
repo = "gto";
tag = version;
hash = "sha256-LXYpOnk9W/ellG70qZLihmvk4kvVcwZfE5buPNU2qzQ=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
entrypoints
funcy
pydantic
pydantic-settings
rich
ruamel-yaml
scmrepo
semver
tabulate
typer
];
nativeCheckInputs = [
freezegun
gitMinimal
pytest-cov-stub
pytest-mock
pytest-test-utils
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
git config --global user.email "nobody@example.com"
git config --global user.name "Nobody"
# _pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0)::reason(0)
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
'';
disabledTests = [
# Tests want to with a remote repo
"remote_repo"
"remote_git_repo"
"test_action_doesnt_push_even_if_repo_has_remotes_set"
# ValueError: stderr not separately captured
"test_register"
"test_assign"
"test_stderr_gto_exception"
"test_stderr_exception"
];
pythonImportsCheck = [ "gto" ];
meta = {
description = "Module for Git Tag Operations";
homepage = "https://github.com/iterative/gto";
changelog = "https://github.com/iterative/gto/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "gto";
};
}