nixpkgs/pkgs/development/python-modules/cryptg/default.nix
Alyssa Ross 5e06b3cb19 treewide: don't use rustPlatform.rust
This will be deprecated in the next commit.
2023-05-12 15:31:21 +00:00

55 lines
1.0 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, cargo
, rustPlatform
, rustc
, setuptools-rust
, libiconv
}:
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 = [
setuptools-rust
rustPlatform.cargoSetupHook
rustc
cargo
];
buildInputs = lib.optionals stdenv.isDarwin [
libiconv
];
# 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 ];
};
}