Skip to content

Commit

Permalink
pythonPackages.mrbob: fix build
Browse files Browse the repository at this point in the history
Tests broke on Hydra as the `checkPhase` wasn't configured properly. By
explicitly relying on `nosetests` and injecting `LC_ALL` into the
`checkPhase` the tests work again.

The license (bsd3) according to `LICENSE` distributed with the upstream
package wasn't specified in the meta section which could've caused legal
issues.

The expression has been moved into its own file to reduce the length and
complexity of `pkgs/top-level/python-packages.nix`.

See https://hydra.nixos.org/build/70689499/log
See #36453

(cherry picked from commit 9215e03)
  • Loading branch information
Ma27 authored and Robert Schütz committed Mar 31, 2018
1 parent 0a224fe commit cde1f31
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
28 changes: 28 additions & 0 deletions pkgs/development/python-modules/mrbob/default.nix
@@ -0,0 +1,28 @@
{ buildPythonPackage, stdenv, glibcLocales, mock, nose, isPy3k, argparse, jinja2, six
, fetchPypi, lib
}:

buildPythonPackage rec {
pname = "mrbob";
version = "0.1.2";

src = fetchPypi {
inherit pname version;
sha256 = "6737eaf98aaeae85e07ebef844ee5156df2f06a8b28d7c3dcb056f811c588121";
};

disabled = isPy3k;

checkInputs = [ nose glibcLocales mock ];
checkPhase = ''
LC_ALL="en_US.UTF-8" nosetests
'';

propagatedBuildInputs = [ argparse jinja2 six ];

meta = with stdenv.lib; {
homepage = https://github.com/domenkozar/mr.bob;
description = "A tool to generate code skeletons from templates";
license = licenses.bsd3;
};
}
25 changes: 1 addition & 24 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -9896,30 +9896,7 @@ in {

};


mrbob = buildPythonPackage rec {
name = "mrbob-${version}";
version = "0.1.2";

src = pkgs.fetchurl {
url = "mirror://pypi/m/mr.bob/mr.bob-${version}.tar.gz";
sha256 = "6737eaf98aaeae85e07ebef844ee5156df2f06a8b28d7c3dcb056f811c588121";
};

buildInputs = [ pkgs.glibcLocales self.mock ];

disabled = isPy3k;

LC_ALL="en_US.UTF-8";

propagatedBuildInputs = with self; [ argparse jinja2 six ] ++
(optionals isPy26 [ importlib ordereddict ]);

meta = {
homepage = https://github.com/domenkozar/mr.bob.git;
description = "A tool to generate code skeletons from templates";
};
};
mrbob = callPackage ../development/python-modules/mrbob {};

msgpack = callPackage ../development/python-modules/msgpack {};

Expand Down

0 comments on commit cde1f31

Please sign in to comment.