From 817ee74bda301b551d59cd79b9828ccf31b185b0 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 29 Aug 2023 06:40:46 -0400 Subject: [PATCH 1/2] chore(snowflake): patch `oscrypto` in the nix environment --- poetry-overrides.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/poetry-overrides.nix b/poetry-overrides.nix index b9e9a83f2c35..4cc98e23e377 100644 --- a/poetry-overrides.nix +++ b/poetry-overrides.nix @@ -17,6 +17,26 @@ in readtime = super.readtime.overridePythonAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.setuptools ]; }); + + # patch oscrypto for openssl 3 support: the fix is to relax some regexes that + # inspect the libcrypto version + # + # without these patches applied, snowflake doesn't work in the nix environment + # + # these overrides can be removed when oscrypto is released again (1.3.0 was + # released on 2022-03-17) + oscrypto = (super.oscrypto.override { preferWheel = false; }).overridePythonAttrs (attrs: { + patches = attrs.patches or [ ] ++ [ + (self.pkgs.fetchpatch { + url = "https://github.com/wbond/oscrypto/commit/ebbc944485b278192b60080ea1f495e287efb4f8.patch"; + sha256 = "sha256-c1faM8szkn/7AjDthzmDisytzO8UdrzDtPkuuITjkRQ="; + }) + (self.pkgs.fetchpatch { + url = "https://github.com/wbond/oscrypto/commit/d5f3437ed24257895ae1edd9e503cfb352e635a8.patch"; + sha256 = "sha256-sRwxD99EV8mmiOAjM8emews9gvDeFtpBV3sSLiNEziM="; + }) + ]; + }); } // super.lib.listToAttrs ( map (name: { From f9f8a7cc2585eba826f66dc1f82ca51ede5c33fb Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 29 Aug 2023 06:46:46 -0400 Subject: [PATCH 2/2] chore(deps): remove fixed poetry overrides --- poetry-overrides.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/poetry-overrides.nix b/poetry-overrides.nix index 4cc98e23e377..151694f689a3 100644 --- a/poetry-overrides.nix +++ b/poetry-overrides.nix @@ -11,12 +11,6 @@ in # `wheel` cannot be used as a wheel to unpack itself, since that would # require itself (infinite recursion) wheel = super.wheel.override { preferWheel = false; }; - paginate = super.paginate.overridePythonAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.setuptools ]; - }); - readtime = super.readtime.overridePythonAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ self.setuptools ]; - }); # patch oscrypto for openssl 3 support: the fix is to relax some regexes that # inspect the libcrypto version