Skip to content

Commit

Permalink
honcho: 0.6.6 -> 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrahan committed Jul 26, 2017
1 parent 69c2c99 commit cadb42f
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions pkgs/tools/system/honcho/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
{ stdenv, fetchFromGitHub, pythonPackages }:

let honcho = pythonPackages.buildPythonApplication rec {
name = "honcho-${version}";
version = "0.6.6";
let
inherit (pythonPackages) python;
pname = "honcho";

in

pythonPackages.buildPythonApplication rec {
name = "${pname}-${version}";
version = "1.0.1";
namePrefix = "";

src = fetchFromGitHub {
owner = "nickstenning";
repo = "honcho";
rev = "v${version}";
sha256 = "0lawwcyrrsd9z9jcr94qn1yabl9bzc529jkpc51jq720fhdlfcr0";
sha256 = "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b";
};

buildInputs = with pythonPackages; [ nose mock jinja2 ];
buildInputs = with pythonPackages; [ jinja2 pytest mock coverage ];

buildPhase = ''
${python.interpreter} setup.py build
'';

installPhase = ''
mkdir -p "$out/lib/${python.libPrefix}/site-packages"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \
--prefix="$out"
'';

checkPhase = ''
runHook preCheck
nosetests
PATH=$out/bin:$PATH coverage run -m pytest
runHook postCheck
'';

doCheck = false;

meta = with stdenv.lib; {
description = "A Python clone of Foreman, a tool for managing Procfile-based applications";
license = licenses.mit;
homepage = https://github.com/nickstenning/honcho;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
};

in

# Some of honcho's tests require that honcho be installed in the environment in
# order to work. This is a trick to build it without running tests, then pass
# it to itself as a buildInput so the tests work.
honcho.overrideDerivation (x: { buildInputs = [ honcho ]; doCheck = true; })
}

0 comments on commit cadb42f

Please sign in to comment.