1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-20 16:39:31 +03:00
nixpkgs/pkgs/development/python-modules/pygraphviz/default.nix

53 lines
1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, substituteAll
, graphviz
, coreutils
, pkg-config
, pytest
}:
2017-06-21 20:55:56 +02:00
buildPythonPackage rec {
pname = "pygraphviz";
version = "1.9";
2017-06-21 20:55:56 +02:00
disabled = !isPy3k;
2017-06-21 20:55:56 +02:00
src = fetchPypi {
inherit pname version;
hash = "sha256-+hj3xs6ig0Gk5GbtDPBWgrCmgoiv6N18lCZ4L3wa4Bw=";
extension = "zip";
2017-06-21 20:55:56 +02: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 = ''
runHook preCheck
pytest --pyargs pygraphviz
runHook postCheck
'';
2017-06-21 20:55:56 +02:00
pythonImportsCheck = [ "pygraphviz" ];
meta = with lib; {
2017-06-21 20:55:56 +02:00
description = "Python interface to Graphviz graph drawing package";
homepage = "https://github.com/pygraphviz/pygraphviz";
2017-06-21 20:55:56 +02:00
license = licenses.bsd3;
maintainers = with maintainers; [ matthiasbeyer dotlambda ];
2017-06-21 20:55:56 +02:00
};
}