34 mainProgram = "nitropy";
38 inherit pname version;
42 inherit pname version;
43 hash = "sha256-pY6ATORZDPGRnkN6dse1s/DzQRpplDbPAGUHU4E7U9M=";
46 nativeBuildInputs = [ installShellFiles ];
48 build-system = [ flit-core ];
74 pythonRelaxDeps = true;
76 # pythonRelaxDepsHook runs in postBuild so cannot be used
77 pypaBuildFlags = [ "--skip-dependency-check" ];
79 # libnitrokey is not propagated to users of the pynitrokey Python package.
80 # It is only usable from the wrapped bin/nitropy
81 makeWrapperArgs = [ "--set LIBNK_PATH ${lib.makeLibraryPath [ libnitrokey ]}" ];
86 pythonImportsCheck = [ "pynitrokey" ];
89 installShellCompletion --cmd ${mainProgram} \
90 --bash <(_NITROPY_COMPLETE=bash_source $out/bin/${mainProgram}) \
91 --zsh <(_NITROPY_COMPLETE=zsh_source $out/bin/${mainProgram}) \
92 --fish <(_NITROPY_COMPLETE=fish_source $out/bin/${mainProgram})
96 description = "Python client for Nitrokey devices";
97 homepage = "https://github.com/Nitrokey/pynitrokey";
98 changelog = "https://github.com/Nitrokey/pynitrokey/releases/tag/v${version}";
99 license = with licenses; [
103 maintainers = with maintainers; [