mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
overrides: cryptography: fix cargo hash for versions >= 3.6.0
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
3a10eb44e3
commit
e17c4960b2
1 changed files with 14 additions and 8 deletions
|
@ -198,14 +198,20 @@ self: super:
|
|||
} // 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 "3.5") rec {
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
|
||||
src = old.src;
|
||||
sourceRoot = "${old.pname}-${old.version}/${cargoRoot}";
|
||||
name = "${old.pname}-${old.version}";
|
||||
# This hash could no longer be valid for cryptography versions
|
||||
# different from 3.5.0
|
||||
sha256 = "sha256-tQoQfo+TAoqAea86YFxyj/LNQCiViu5ij/3wj7ZnYLI=";
|
||||
};
|
||||
cargoDeps =
|
||||
let
|
||||
getCargoHash = version:
|
||||
if lib.versionOlder version "3.6" then "sha256-tQoQfo+TAoqAea86YFxyj/LNQCiViu5ij/3wj7ZnYLI="
|
||||
# This hash could no longer be valid for cryptography versions
|
||||
# different from 3.6.0
|
||||
else "sha256-Y6TuW7AryVgSvZ6G8WNoDIvi+0tvx8ZlEYF5qB0jfNk=";
|
||||
in
|
||||
pkgs.rustPlatform.fetchCargoTarball {
|
||||
src = old.src;
|
||||
sourceRoot = "${old.pname}-${old.version}/${cargoRoot}";
|
||||
name = "${old.pname}-${old.version}";
|
||||
sha256 = getCargoHash old.version;
|
||||
};
|
||||
cargoRoot = "src/rust";
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue