Files
Jörg Thalheim 6388411ec2 treewide: stabilize fetchpatch GitHub compare URLs
GitHub compare endpoints (/compare/A...B.patch) are not byte-stable:
commit message headers, abbreviated SHA length and index lines drift
over time, causing FOD hash mismatches on Hydra without source changes
(observed for gixy on staging).

Switch all such URLs to .diff?full_index=1, which omits commit headers
and uses full 40-char blob SHAs in index lines. Combined with fetchpatch
normalization this yields stable hashes.

For py-slvs also expand the abbreviated commit SHAs in the URL to full
40-char SHAs.
2026-04-14 11:32:06 +02:00

45 lines
1013 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
fetchpatch2,
pytestCheckHook,
six,
setuptools,
}:
buildPythonPackage rec {
pname = "mohawk";
version = "1.1.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-0qDjqxCiCcx56V4o8t1UvUpz/RmY/+J7e6D5Yra+lyM=";
};
patches = [
(fetchpatch2 {
# https://github.com/kumar303/mohawk/pull/59
name = "nose-to-pytest.patch";
url = "https://github.com/kumar303/mohawk/compare/b7899166880e890f01cf2531b5686094ba08df8f...66157c7efbf6b0d18c30a9ffe5dfd84bef27bd3a.diff?full_index=1";
hash = "sha256-wUA62sHuZuyarVU3NjLy3XqTW0kZeUzfiw2vitkcfLg=";
})
];
build-system = [ setuptools ];
dependencies = [ six ];
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [ "mohawk/tests.py" ];
meta = {
description = "Python library for Hawk HTTP authorization";
homepage = "https://github.com/kumar303/mohawk";
license = lib.licenses.mpl20;
maintainers = [ ];
};
}