Files
nixpkgs/pkgs/development/python-modules/johnnycanencrypt/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
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
2026-01-11 09:34:20 -08:00

78 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
httpx,
libiconv,
nettle,
pcsclite,
pkg-config,
pytestCheckHook,
rustPlatform,
vcrpy,
}:
buildPythonPackage rec {
pname = "johnnycanencrypt";
version = "0.16.0";
pyproject = true;
src = fetchFromGitHub {
owner = "kushaldas";
repo = "johnnycanencrypt";
tag = "v${version}";
hash = "sha256-9T8B6zG3zMOBMX9C+u34MGBAgQ8YR44CW2BTdO1CciI=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-V1z16GKaSQVjp+stWir7kAO2wsnOYPdhKi4KzIKmKx8=";
};
build-system = with rustPlatform; [
bindgenHook
cargoSetupHook
maturinBuildHook
];
nativeBuildInputs = [
pkg-config
]
++ (with rustPlatform; [
bindgenHook
cargoSetupHook
maturinBuildHook
]);
buildInputs = [
nettle
]
++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
dependencies = [ httpx ];
nativeCheckInputs = [
pytestCheckHook
vcrpy
];
preCheck = ''
# import from $out
rm -r johnnycanencrypt
'';
pythonImportsCheck = [ "johnnycanencrypt" ];
meta = {
description = "Python module for OpenPGP written in Rust";
homepage = "https://github.com/kushaldas/johnnycanencrypt";
changelog = "https://github.com/kushaldas/johnnycanencrypt/blob/v${version}/changelog.md";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ _0x4A6F ];
};
}