diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2023-03-22 10:51:12 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2023-04-06 14:00:36 +0200 |
commit | 148fb1c770f738e5cfaf703712e020a49af60c4c (patch) | |
tree | 3ba7ab75ba30456fad2c4bf77c489c96b718ed52 /pkgs/applications/version-management/git-archive-all/default.nix | |
parent | 7f55ff0b2104d2867b88ffe1784b595aace3ff0f (diff) |
git-archive-all: init at 1.23.1
Diffstat (limited to 'pkgs/applications/version-management/git-archive-all/default.nix')
-rw-r--r-- | pkgs/applications/version-management/git-archive-all/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-archive-all/default.nix b/pkgs/applications/version-management/git-archive-all/default.nix new file mode 100644 index 0000000000000..22f16692ec8e9 --- /dev/null +++ b/pkgs/applications/version-management/git-archive-all/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, git +, pytestCheckHook +, pytest-mock +}: + +buildPythonApplication rec { + pname = "git-archive-all"; + version = "1.23.1"; + + src = fetchFromGitHub { + owner = "Kentzo"; + repo = "git-archive-all"; + rev = version; + hash = "sha256-fIPjggOx+CEorj1bazz8s81ZdppkTL0OlA5tRqCYZyc="; + }; + + # * Don't use pinned dependencies + # * Remove formatter and coverage generator + # * Don't fail on warnings. Almost all tests output this warning: + # ResourceWarning: unclosed file [...]/repo.tar + # https://github.com/Kentzo/git-archive-all/issues/90 + postPatch = '' + substituteInPlace setup.cfg \ + --replace pycodestyle==2.5.0 "" \ + --replace pytest==5.2.2 pytest \ + --replace pytest-cov==2.8.1 "" \ + --replace pytest-mock==1.11.2 pytest-mock \ + --replace "--cov=git_archive_all --cov-report=term --cov-branch" "" \ + --replace "filterwarnings = error" "" + substituteInPlace test_git_archive_all.py \ + --replace "import pycodestyle" "" + ''; + + nativeCheckInputs = [ + git + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + ]; + + disabledTests = [ "pycodestyle" ]; + + preCheck = '' + export HOME="$(mktemp -d)" + ''; + + meta = with lib; { + description = "Archive a repository with all its submodules"; + longDescription = '' + A python script wrapper for git-archive that archives a git superproject + and its submodules, if it has any. Takes into account .gitattributes + ''; + homepage = "https://github.com/Kentzo/git-archive-all"; + license = licenses.mit; + maintainers = with maintainers; [ fgaz ]; + }; +} |