1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pkg-config 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "pkgconfig"; 11 version = "1.5.5"; 12 format = "pyproject"; 13 14 inherit (pkg-config) 15 setupHooks 16 wrapperName 17 suffixSalt 18 targetPrefix 19 baseBinName 20 ; 21 22 src = fetchFromGitHub { 23 owner = "matze"; 24 repo = "pkgconfig"; 25 rev = "v${version}"; 26 sha256 = "sha256-uuLUGRNLCR3NS9g6OPCI+qG7tPWsLhI3OE5WmSI3vm8="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pkgconfig/pkgconfig.py \ 31 --replace "pkg_config_exe = os.environ.get('PKG_CONFIG', None) or 'pkg-config'" "pkg_config_exe = '${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config'" 32 33 # those pc files are missing and pkg-config validates that they exist 34 substituteInPlace data/fake-openssl.pc \ 35 --replace "Requires: libssl libcrypto" "" 36 ''; 37 38 nativeBuildInputs = [ poetry-core ]; 39 40 checkInputs = [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "pkgconfig" ]; 43 44 meta = with lib; { 45 description = "Interface Python with pkg-config"; 46 homepage = "https://github.com/matze/pkgconfig"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ SuperSandro2000 ]; 49 }; 50}