nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python3Packages.ncclient: cleanup, make src reproducible

+12 -7
+12 -7
pkgs/development/python-modules/ncclient/default.nix
··· 6 6 paramiko, 7 7 setuptools, 8 8 pytestCheckHook, 9 - pythonOlder, 10 9 }: 11 10 12 11 buildPythonPackage rec { ··· 13 14 version = "0.7.0"; 14 15 pyproject = true; 15 16 16 - disabled = pythonOlder "3.7"; 17 - 18 17 src = fetchFromGitHub { 19 18 owner = "ncclient"; 20 19 repo = "ncclient"; 21 20 tag = "v${version}"; 22 - hash = "sha256-GSa7UkBwbwggFqwNFTg2KNqGV5412EE41ma/dzPIEuU="; 21 + # Upstream uses .gitattributes to inject information about the revision 22 + # hash and the refname into `ncclient/_version.py`, see: 23 + # 24 + # - https://git-scm.com/docs/gitattributes#_export_subst and 25 + # - https://github.com/ncclient/ncclient/blob/e056e38af2843de0608da58e2f4662465c96d587/ncclient/_version.py#L25-L28 26 + postFetch = '' 27 + sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' $out/ncclient/_version.py 28 + ''; 29 + hash = "sha256-vSX+9nTl4r6vnP/vmavdmdChzOC8P2G093/DQNMQwS4="; 23 30 }; 24 31 25 32 build-system = [ ··· 41 36 42 37 pythonImportsCheck = [ "ncclient" ]; 43 38 44 - meta = with lib; { 39 + meta = { 45 40 description = "Python library for NETCONF clients"; 46 41 homepage = "https://github.com/ncclient/ncclient"; 47 42 changelog = "https://github.com/ncclient/ncclient/releases/tag/${src.tag}"; 48 - license = licenses.asl20; 49 - maintainers = with maintainers; [ xnaveira ]; 43 + license = lib.licenses.asl20; 44 + maintainers = with lib.maintainers; [ xnaveira ]; 50 45 }; 51 46 }