nixpkgs/pkgs/development/python-modules/pygraphviz/default.nix

49 lines
967 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, substituteAll
, graphviz
, coreutils
, pkg-config
, pytest
}:
2017-06-21 19:55:56 +01:00
buildPythonPackage rec {
pname = "pygraphviz";
version = "1.7";
2017-06-21 19:55:56 +01:00
disabled = !isPy3k;
2017-06-21 19:55:56 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "a7bec6609f37cf1e64898c59f075afd659106cf9356c5f387cecaa2e0cdb2304";
extension = "zip";
2017-06-21 19:55:56 +01:00
};
patches = [
# pygraphviz depends on graphviz executables and wc being in PATH
(substituteAll {
src = ./path.patch;
path = lib.makeBinPath [ graphviz coreutils ];
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ graphviz ];
checkInputs = [ pytest ];
checkPhase = ''
pytest --pyargs pygraphviz
'';
2017-06-21 19:55:56 +01:00
meta = with lib; {
2017-06-21 19:55:56 +01:00
description = "Python interface to Graphviz graph drawing package";
homepage = "https://github.com/pygraphviz/pygraphviz";
2017-06-21 19:55:56 +01:00
license = licenses.bsd3;
maintainers = with maintainers; [ matthiasbeyer dotlambda ];
2017-06-21 19:55:56 +01:00
};
}