git-buildpackage: init at 0.9.37 (#381474)

authored by Pol Dellaiera and committed by GitHub 166dd6f3 e0472e20

+89
+89
pkgs/by-name/gi/git-buildpackage/package.nix
··· 1 + { 2 + lib, 3 + 4 + coreutils, 5 + fetchFromGitHub, 6 + python3Packages, 7 + stdenv, 8 + 9 + # nativeCheckInputs 10 + debian-devscripts, 11 + dpkg, 12 + gitMinimal, 13 + gitSetupHook, 14 + man, 15 + }: 16 + 17 + python3Packages.buildPythonApplication rec { 18 + pname = "git-buildpackage"; 19 + version = "0.9.37"; 20 + pyproject = true; 21 + 22 + src = fetchFromGitHub { 23 + owner = "agx"; 24 + repo = "git-buildpackage"; 25 + tag = "debian/${version}"; 26 + hash = "sha256-0gfryd1GrVfL11u/IrtLSJAABRsTpFfPOGxWfVdYtgE="; 27 + fetchSubmodules = true; 28 + }; 29 + 30 + postPatch = '' 31 + substituteInPlace gbp/command_wrappers.py \ 32 + --replace-fail "/bin/true" "${lib.getExe' coreutils "true"}" \ 33 + --replace-fail "/bin/false" "${lib.getExe' coreutils "false"}" 34 + ''; 35 + 36 + build-system = [ 37 + python3Packages.setuptools 38 + ]; 39 + 40 + dependencies = with python3Packages; [ 41 + python-dateutil 42 + ]; 43 + 44 + pythonImportsCheck = [ 45 + "gbp" 46 + ]; 47 + 48 + nativeCheckInputs = 49 + [ 50 + debian-devscripts 51 + dpkg 52 + gitMinimal 53 + gitSetupHook 54 + man 55 + ] 56 + ++ (with python3Packages; [ 57 + coverage 58 + pytest-cov 59 + pytestCheckHook 60 + pyyaml 61 + rpm 62 + ]); 63 + 64 + disabledTests = 65 + [ 66 + # gbp.command_wrappers.CommandExecFailed: 67 + # Couldn't commit to 'pristine-tar' with upstream 'upstream': 68 + # execution failed: [Errno 2] No such file or directory: 'pristine-tar' 69 + "tests.doctests.test_PristineTar.test_pristine_tar" 70 + 71 + # When gitMinimal is used instead of git: 72 + # UNEXPECTED EXCEPTION: GitRepositoryError("Invalid git command 'branch': No manual entry for git-branch") 73 + "tests.doctests.test_GitRepository.test_repo" 74 + ] 75 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 76 + # gbp.git.repository.GitRepositoryError: 77 + # Cannot create Git repository at '/does/not/exist': 78 + # [Errno 30] Read-only file system: '/does' 79 + "tests.doctests.test_GitRepository.test_create_noperm" 80 + ]; 81 + 82 + meta = { 83 + description = "Suite to help with maintaining Debian packages in Git repositories"; 84 + homepage = "https://honk.sigxcpu.org/piki/projects/git-buildpackage/"; 85 + license = lib.licenses.gpl2Only; 86 + maintainers = with lib.maintainers; [ nim65s ]; 87 + mainProgram = "git-buildpackage"; 88 + }; 89 + }