1{ lib, buildPythonPackage, fetchPypi, nose, pkgconfig }:
2
3buildPythonPackage rec {
4 pname = "pkgconfig";
5 version = "1.4.0";
6
7 setupHook = pkgconfig.setupHook;
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "048c3b457da7b6f686b647ab10bf09e2250e4c50acfe6f215398a8b5e6fcdb52";
12 };
13
14 checkInputs = [ nose ];
15
16 nativeBuildInputs = [ pkgconfig ];
17
18 checkPhase = ''
19 nosetests
20 '';
21
22 patches = [ ./executable.patch ];
23 postPatch = ''
24 substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/pkg-config"'
25 '';
26
27 meta = with lib; {
28 description = "Interface Python with pkg-config";
29 homepage = https://github.com/matze/pkgconfig;
30 license = licenses.mit;
31 };
32}