at master 955 B view raw
1{ 2 autoreconfHook, 3 buildPythonPackage, 4 gpgme, 5 lib, 6 setuptools, 7 swig, 8}: 9 10buildPythonPackage { 11 pname = "gpgme"; 12 inherit (gpgme) version src; 13 pyproject = true; 14 15 patches = gpgme.patches or [ ]; 16 17 postPatch = '' 18 substituteInPlace lang/python/setup.py.in \ 19 --replace-fail "gpgme_h = '''" "gpgme_h = '${lib.getDev gpgme}/include/gpgme.h'" \ 20 --replace-fail "@VERSION@" "${gpgme.version}" 21 ''; 22 23 configureFlags = gpgme.configureFlags ++ [ 24 "--enable-languages=python" 25 ]; 26 27 postConfigure = " 28 cd lang/python 29 "; 30 31 preBuild = '' 32 make copystamp 33 ''; 34 35 build-system = [ setuptools ]; 36 37 nativeBuildInputs = [ 38 autoreconfHook 39 swig 40 ]; 41 42 buildInputs = [ 43 gpgme 44 ]; 45 46 pythonImportsCheck = [ "gpg" ]; 47 48 meta = gpgme.meta // { 49 description = "Python bindings to the GPGME API of the GnuPG cryptography library"; 50 homepage = "https://dev.gnupg.org/source/gpgme/browse/master/lang/python/"; 51 }; 52}