python313Packages.debugpy: make src reproducible

This commit is contained in:
Kira Bruneau
2025-12-06 00:09:27 -05:00
parent ac5a69f29b
commit 7ef5f46a95
@@ -32,6 +32,16 @@ buildPythonPackage rec {
owner = "microsoft";
repo = "debugpy";
tag = "v${version}";
# Upstream uses .gitattributes to inject information about the revision
# hash and the refname into `src/debugpy/_version.py`, see:
#
# - https://git-scm.com/docs/gitattributes#_export_subst and
# - https://github.com/microsoft/debugpy/blob/v1.8.17/src/debugpy/_version.py#L24-L30
postFetch = ''
sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' "$out/src/debugpy/_version.py"
'';
hash = "sha256-eAiCtSJUqLASapxnYCyq1UCiGz6QmKQum7Vs3MoU1s8=";
};