2021-01-09 10:05:03 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pkg-config }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pkgconfig";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.5.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
inherit (pkg-config)
|
2020-06-18 07:06:33 +00:00
|
|
|
setupHooks
|
|
|
|
wrapperName
|
|
|
|
suffixSalt
|
|
|
|
targetPrefix
|
|
|
|
baseBinName
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "c34503829fd226822fd93c902b1cf275516908a023a24be0a02ba687f3a00399";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
propagatedNativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./executable.patch ];
|
|
|
|
postPatch = ''
|
2021-01-09 10:05:03 +00:00
|
|
|
substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
pythonImportsCheck = [ "pkgconfig" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Interface Python with pkg-config";
|
|
|
|
homepage = "https://github.com/matze/pkgconfig";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|