Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6a20b4323d22
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 590feeecfbbe
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 1, 2021

  1. xdot: fix tests

    `nix-shell -p xdot` was failing, with an error like:
    
        builder for '/nix/store/n3yjqssn531c52sbkmpqvczmy5c0lm8n-python3.8-xdot-1.2.drv' failed with exit code 1; last 10 log lines:
              import numpy
          ModuleNotFoundError: No module named 'numpy'
    
    Adding numpy uncovered another error, about not being able to initialize
    gtk:
    
        error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
        error: --- Error -------------------------------------------------------------------------------------------------------------------------------------------- nix-shell
        builder for '/nix/store/brz6q1ri12z51z3l2p5d6ny2jsf3qkjg-python3.8-xdot-1.2.drv' failed with exit code 1; last 10 log lines:
              raise RuntimeError(
          RuntimeError: Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case.
    r-k-b committed Jan 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6d355e4 View commit details

Commits on Jan 3, 2021

  1. Merge pull request #107872 from r-k-b/fix-xdot-numpy-and-gtk-test-dep…

    …endencies
    
    xdot: fix tests
    SuperSandro2000 authored Jan 3, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    590feee View commit details
Showing with 11 additions and 4 deletions.
  1. +11 −4 pkgs/development/python-modules/xdot/default.nix
15 changes: 11 additions & 4 deletions pkgs/development/python-modules/xdot/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k
, wrapGAppsHook, gobject-introspection, pygobject3, graphviz, gtk3 }:
{ lib, buildPythonPackage, fetchPypi, isPy3k, python3, xvfb_run, stdenv
, wrapGAppsHook, gobject-introspection, pygobject3, graphviz, gtk3, numpy }:

buildPythonPackage rec {
pname = "xdot";
@@ -11,9 +11,16 @@ buildPythonPackage rec {
};

disabled = !isPy3k;

nativeBuildInputs = [ wrapGAppsHook ];
propagatedBuildInputs = [ gobject-introspection pygobject3 graphviz gtk3 ];
propagatedBuildInputs = [ gobject-introspection pygobject3 graphviz gtk3 numpy ];
checkInputs = [ xvfb_run ];

checkPhase = ''
xvfb-run -s '-screen 0 800x600x24' ${python3.interpreter} nix_run_setup test
'';

# https://github.com/NixOS/nixpkgs/pull/107872#issuecomment-752175866
doCheck = stdenv.isLinux;

meta = with lib; {
description = "An interactive viewer for graphs written in Graphviz's dot";