From b657776d95700b3ba694568f6b92e6ca422bfd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 21 Apr 2025 09:01:33 -0700 Subject: [PATCH 1/2] python313Packages.pytensor: make src reproducible --- pkgs/development/python-modules/pytensor/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pytensor/default.nix b/pkgs/development/python-modules/pytensor/default.nix index 0a63afaf7fa8..5c1f81b4fcaa 100644 --- a/pkgs/development/python-modules/pytensor/default.nix +++ b/pkgs/development/python-modules/pytensor/default.nix @@ -39,6 +39,9 @@ buildPythonPackage rec { owner = "pymc-devs"; repo = "pytensor"; tag = "rel-${version}"; + postFetch = '' + sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' $out/pytensor/_version.py + ''; hash = "sha256-Iyiuvt86pfz8MmpwgDecKJFVOw+fKpEaA9m1MBA9Yxs="; }; From feb6b6b2c22d5d736c6cf8cdc481513210c01162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 21 Apr 2025 09:06:57 -0700 Subject: [PATCH 2/2] python313Packages.numba: make src reproducible --- pkgs/development/python-modules/numba/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 055482e063d2..b8053c53c453 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -47,14 +47,10 @@ buildPythonPackage rec { # # - https://git-scm.com/docs/gitattributes#_export_subst and # - https://github.com/numba/numba/blame/5ef7c86f76a6e8cc90e9486487294e0c34024797/numba/_version.py#L25-L31 - # - # Hence this hash may change if GitHub / Git will change it's behavior. - # Hopefully this will not happen until the next release. We are fairly sure - # that upstream relies on those strings to be valid, that's why we don't - # use `forceFetchGit = true;`.` If in the future we'll observe the hash - # changes too often, we can always use forceFetchGit, and inject the - # relevant strings ourselves, using `substituteInPlace`, in postFetch. - hash = "sha256-4CaTJPaQduJqD0NQOPp1qsDr/BeCjbfZhulVW/x2ZAU="; + postFetch = '' + sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' $out/numba/_version.py + ''; + hash = "sha256-d09armWFI55fqyYCzZNVOq6f5b8BTk0s8fjU0OGrNgo="; }; postPatch = ''