1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
56 lines
1.1 KiB
Nix
56 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
cargo,
|
|
rustPlatform,
|
|
rustc,
|
|
setuptools,
|
|
setuptools-rust,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cryptg";
|
|
version = "0.5.2";
|
|
pyproject = true;
|
|
|
|
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 ];
|
|
};
|
|
}
|