depot/third_party/nixpkgs/pkgs/development/python-modules/cryptg/default.nix
Default email eeb71630af Project import generated by Copybara.
GitOrigin-RevId: 636051e353461f073ac55d5d42c1ed062a345046
2022-11-02 23:02:43 +01:00

46 lines
981 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, rustPlatform
, setuptools-rust
}:
buildPythonPackage rec {
pname = "cryptg";
version = "0.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "cher-nov";
repo = pname;
rev = "v${version}";
hash = "sha256-2HP1mKGPr8wOL5B0APJks3EVBicX2iMFI7vLJGTa1PM=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U=";
};
nativeBuildInputs = with rustPlatform;[
setuptools-rust
cargoSetupHook
rust.rustc
rust.cargo
];
# has no tests
doCheck = false;
pythonImportsCheck = [ "cryptg" ];
meta = with lib; {
description = "Official Telethon extension to provide much faster cryptography for Telegram API requests";
homepage = "https://github.com/cher-nov/cryptg";
license = licenses.cc0;
maintainers = with maintainers; [ nickcao ];
};
}