uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
57
pkgs/development/python-modules/anytree/default.nix
Normal file
57
pkgs/development/python-modules/anytree/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, substituteAll
|
||||
, six
|
||||
, withGraphviz ? true
|
||||
, graphviz
|
||||
, fontconfig
|
||||
# Tests
|
||||
, pytestCheckHook
|
||||
, nose
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "anytree";
|
||||
version = "2.8.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "3f0f93f355a91bc3e6245319bf4c1d50e3416cc7a35cc1133c1ff38306bbccab";
|
||||
};
|
||||
|
||||
patches = lib.optionals withGraphviz [
|
||||
(substituteAll {
|
||||
src = ./graphviz.patch;
|
||||
inherit graphviz;
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
six
|
||||
];
|
||||
|
||||
# tests print “Fontconfig error: Cannot load default config file”
|
||||
preCheck = lib.optionalString withGraphviz ''
|
||||
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
||||
'';
|
||||
|
||||
# circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree
|
||||
doCheck = withGraphviz;
|
||||
|
||||
checkInputs = [ pytestCheckHook nose ];
|
||||
|
||||
pytestFlagsArray = lib.optionals (pythonOlder "3.4") [
|
||||
# Use enums, which aren't available pre-python3.4
|
||||
"--ignore=tests/test_resolver.py"
|
||||
"--ignore=tests/test_search.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful and Lightweight Python Tree Data Structure";
|
||||
homepage = "https://github.com/c0fec0de/anytree";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
13
pkgs/development/python-modules/anytree/graphviz.patch
Normal file
13
pkgs/development/python-modules/anytree/graphviz.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/anytree/exporter/dotexporter.py b/anytree/exporter/dotexporter.py
|
||||
index 9c10a68..209a952 100644
|
||||
--- a/anytree/exporter/dotexporter.py
|
||||
+++ b/anytree/exporter/dotexporter.py
|
||||
@@ -228,7 +228,7 @@ class DotExporter(object):
|
||||
for line in self:
|
||||
dotfile.write(("%s\n" % line).encode("utf-8"))
|
||||
dotfile.flush()
|
||||
- cmd = ["dot", dotfilename, "-T", fileformat, "-o", filename]
|
||||
+ cmd = ["@graphviz@/bin/dot", dotfilename, "-T", fileformat, "-o", filename]
|
||||
check_call(cmd)
|
||||
try:
|
||||
remove(dotfilename)
|
||||
Loading…
Add table
Add a link
Reference in a new issue