Rebecca Turner b5ab55f256
git-revise: macOS: Skip failing GPG test
Fixes a failure due to no GPG agent being run for the test suite:

```
E               subprocess.CalledProcessError: Command '['gpg', '--batch', '--passphrase', '', '--quick-gen-key', b'Test User <test@example.com>']' returned non-zero exit status 2.

/nix/store/wwqdmdr2f5wrjnsjs64bny8df471rh9b-python3-3.12.9/lib/python3.12/subprocess.py:573: CalledProcessError
----------------------------- Captured stdout call -----------------------------
[master (root-commit) 5aa2dc9] commit 1
 Author: Bash Author <bash_author@example.com>
----------------------------- Captured stderr call -----------------------------
gpg: keybox '/private/tmp/nix-build-python3.12-git-revise-0.7.0-unstable-2025-01-28.drv-0/tmpfmshzluc/pubring.kbx' created
gpg: error running '/nix/store/69pwwprid9rhgkz9ip9nq71p0r2b73b7-gnupg-2.4.7/bin/gpg-agent': exit status 2
gpg: failed to start gpg-agent '/nix/store/69pwwprid9rhgkz9ip9nq71p0r2b73b7-gnupg-2.4.7/bin/gpg-agent': General error
gpg: can't connect to the gpg-agent: General error
gpg: agent_genkey failed: No agent running
gpg: key generation failed: No agent running
=========================== short test summary info ============================
FAILED tests/test_gpgsign.py::test_gpgsign - subprocess.CalledProcessError: Command '['gpg', '--batch', '--passphrase', ...
======================== 1 failed, 37 passed in 20.81s =========================
```

I've also marked myself as a maintiner, as @emilazy no longer uses Git
directly.
2025-03-03 09:19:04 -08:00

50 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
pythonOlder,
git,
gnupg,
fetchFromGitHub,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "git-revise";
version = "0.7.0-unstable-2025-01-28";
format = "setuptools";
# Missing tests on PyPI
src = fetchFromGitHub {
owner = "mystor";
repo = pname;
rev = "189c9fe150e5587def75c51709246c47c93e3b4d";
hash = "sha256-bqhRV0WtWRUKkBG2tEvctxdoYRkcrpL4JZSHYzox8so=";
};
disabled = pythonOlder "3.8";
nativeCheckInputs =
[
git
pytestCheckHook
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
gnupg
];
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# `gpg: agent_genkey failed: No agent running`
"test_gpgsign"
];
meta = with lib; {
description = "Efficiently update, split, and rearrange git commits";
homepage = "https://github.com/mystor/git-revise";
changelog = "https://github.com/mystor/git-revise/blob/${version}/CHANGELOG.md";
license = licenses.mit;
mainProgram = "git-revise";
maintainers = with maintainers; [ _9999years ];
};
}