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
52
pkgs/development/python-modules/termplotlib/default.nix
Normal file
52
pkgs/development/python-modules/termplotlib/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, substituteAll
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, exdown
|
||||
, numpy
|
||||
, gnuplot
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "termplotlib";
|
||||
version = "0.3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nschloe";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1qfrv2w7vb2bbjvd5lqfq57c23iqkry0pwmif1ha3asmz330rja1";
|
||||
};
|
||||
|
||||
format = "pyproject";
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
exdown
|
||||
];
|
||||
pythonImportsCheck = [ "termplotlib" ];
|
||||
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./gnuplot-subprocess.patch;
|
||||
gnuplot = "${gnuplot.out}/bin/gnuplot";
|
||||
})
|
||||
];
|
||||
|
||||
# The current gnuplot version renders slightly different test
|
||||
# graphs, with emphasis on slightly. The plots are still correct.
|
||||
# Tests pass on gnuplot 5.4.1, but fail on 5.4.2.
|
||||
disabledTests = [
|
||||
"test_plot"
|
||||
"test_nolabel"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "matplotlib for your terminal";
|
||||
homepage = "https://github.com/nschloe/termplotlib";
|
||||
license = with licenses; [ gpl3Plus ];
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/src/termplotlib/helpers.py b/src/termplotlib/helpers.py
|
||||
index 4b67fd0..38a2242 100644
|
||||
--- a/src/termplotlib/helpers.py
|
||||
+++ b/src/termplotlib/helpers.py
|
||||
@@ -32,7 +32,7 @@ def is_unicode_standard_output():
|
||||
|
||||
|
||||
def get_gnuplot_version():
|
||||
- out = subprocess.check_output(["gnuplot", "--version"]).decode()
|
||||
+ out = subprocess.check_output(["@gnuplot@", "--version"]).decode()
|
||||
m = re.match("gnuplot (\\d).(\\d) patchlevel (\\d)\n", out)
|
||||
if m is None:
|
||||
raise RuntimeError("Couldn't get gnuplot version")
|
||||
diff --git a/src/termplotlib/plot.py b/src/termplotlib/plot.py
|
||||
index 0f46b87..1418fd1 100644
|
||||
--- a/src/termplotlib/plot.py
|
||||
+++ b/src/termplotlib/plot.py
|
||||
@@ -17,7 +17,7 @@ def plot(
|
||||
ticks_scale: int = 0,
|
||||
):
|
||||
p = subprocess.Popen(
|
||||
- ["gnuplot"],
|
||||
+ ["@gnuplot@"],
|
||||
stdout=subprocess.PIPE,
|
||||
stdin=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
Loading…
Add table
Add a link
Reference in a new issue