If someone can do a more sophisticated test then nix-building this, feel free to
send me your results and how you produced them.
Otherwise, suggestions and review welcome of course!
Matthias Beyer (1):
python3Packages.pygraphviz: 1.6 -> 1.7
.../python-modules/pygraphviz/default.nix | 4 ++--
.../pygraphviz/graphviz-path.patch | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
--
2.29.2
Hey Matthias,
Will test this out soon.
On Thu, Feb 11, 2021 at 05:40:43PM +0100, Matthias Beyer wrote:
> If someone can do a more sophisticated test then nix-building this,> feel free to send me your results and how you produced them.> Otherwise, suggestions and review welcome of course!
One thing I recently turned on was in nixpkgs/config.nix:
checkMeta = true
This catches meta evaluation issues which we were missing before
submitting to github.
I'm sure you know but instead of a cover letter you can simply do
git send-email --annotate HEAD^
and then add your non-commit comments under the --- line:
> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>> ---
*right here*
> .../python-modules/pygraphviz/default.nix | 4 ++--> .../pygraphviz/graphviz-path.patch | 16 ++++++++--------> 2 files changed, 10 insertions(+), 10 deletions(-)
It's not too big of a deal but saves an email if you're only sending a
single patch anyways.
Cheers,
Will
On Thu, Feb 11 2021, Matthias Beyer wrote:
> If someone can do a more sophisticated test then nix-building this, feel free to> send me your results and how you produced them.> Otherwise, suggestions and review welcome of course!
I got it working by doing the following:
- At the root of your nixpkgs checkout, create a `test.nix` file with
the following contents:
with import ./. { };
let
pythonEnv = python38.withPackages (ps: [
ps.pygraphviz
]);
in
mkShell {
buildInputs = [
pythonEnv
graphviz
];
}
- Run `nix-shell test.nix`
- Run `python3`
- Paste the following code in the repl: [1]
import pygraphviz as pgv
A = pgv.AGraph()
A.add_edge(1, 2)
A.add_edge(2, 3)
A.add_edge(1, 3)
print(A.string()) # print to screen
A.write("simple.dot") # write to simple.dot
B = pgv.AGraph("simple.dot") # create a new graph from file
B.layout() # layout with default (neato)
B.draw("simple.png") # draw png
A `simple.png` file should be created with a simple graph.
[1]: https://pygraphviz.github.io/documentation/stable/auto_examples/plot_simple.html#sphx-glr-auto-examples-plot-simple-py
Tested-by: Xinglu Chen <public@yoctocell.xyz>