mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
cryptography: correctly identify when a wheel is used as input
This commit is contained in:
parent
d8a6e25608
commit
b3923af338
1 changed files with 4 additions and 3 deletions
|
@ -362,8 +362,9 @@ lib.composeManyExtensions [
|
|||
lib.warn "Unknown cryptography version: '${version}'. Please update getCargoHash." lib.fakeHash
|
||||
);
|
||||
sha256 = getCargoHash super.cryptography.version;
|
||||
isWheel = lib.hasSuffix ".whl" super.cryptography.src;
|
||||
scrypto =
|
||||
if lib.versionAtLeast super.cryptography.version "35" && sha256 == null then
|
||||
if isWheel then
|
||||
(
|
||||
super.cryptography.override { preferWheel = true; }
|
||||
) else super.cryptography;
|
||||
|
@ -374,7 +375,7 @@ lib.composeManyExtensions [
|
|||
nativeBuildInputs = (old.nativeBuildInputs or [ ])
|
||||
++ lib.optional (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ]
|
||||
++ lib.optional (!self.isPyPy) pyBuildPackages.cffi
|
||||
++ lib.optional (lib.versionAtLeast old.version "3.5")
|
||||
++ lib.optional (lib.versionAtLeast old.version "3.5" && !isWheel)
|
||||
(with pkgs.rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
|
||||
buildInputs = (old.buildInputs or [ ])
|
||||
++ [ (if lib.versionAtLeast old.version "37" then pkgs.openssl_3 else pkgs.openssl_1_1) ]
|
||||
|
@ -382,7 +383,7 @@ lib.composeManyExtensions [
|
|||
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [ self.cffi ];
|
||||
} // lib.optionalAttrs (lib.versionAtLeast old.version "3.4" && lib.versionOlder old.version "3.5") {
|
||||
CRYPTOGRAPHY_DONT_BUILD_RUST = "1";
|
||||
} // lib.optionalAttrs (lib.versionAtLeast old.version "35" && sha256 != null) rec {
|
||||
} // lib.optionalAttrs (lib.versionAtLeast old.version "3.5" && !isWheel) rec {
|
||||
cargoDeps =
|
||||
pkgs.rustPlatform.fetchCargoTarball {
|
||||
src = old.src;
|
||||
|
|
Loading…
Add table
Reference in a new issue