Files
nixpkgs/pkgs/development/python-modules/cryptg/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

59 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
cargo,
rustPlatform,
rustc,
setuptools,
setuptools-rust,
}:
buildPythonPackage rec {
pname = "cryptg";
version = "0.5.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "cher-nov";
repo = "cryptg";
rev = "v${version}";
hash = "sha256-4WerXUEkdkIkVEyZB4EzM1HITvNbO7a1Cfi3bpJGUVA=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-kR92lvyBCFxEvIlzRX796XQn71ARrlsfK+fAKrwimEo=";
};
build-system = [
setuptools
setuptools-rust
];
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustc
cargo
];
# has no tests
doCheck = false;
pythonImportsCheck = [ "cryptg" ];
postPatch = ''
substituteInPlace pyproject.toml --replace-fail "setuptools[core]" "setuptools"
'';
meta = {
description = "Official Telethon extension to provide much faster cryptography for Telegram API requests";
homepage = "https://github.com/cher-nov/cryptg";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ nickcao ];
};
}