honcho: 0.6.6 -> 1.0.1

This commit is contained in:
Charles Strahan 2017-07-25 23:21:27 -04:00
parent 69c2c997e0
commit cadb42fafb
No known key found for this signature in database
GPG Key ID: BB47AB4B8489B5A5

View File

@ -1,25 +1,44 @@
{ stdenv, fetchFromGitHub, pythonPackages }: { stdenv, fetchFromGitHub, pythonPackages }:
let honcho = pythonPackages.buildPythonApplication rec { let
name = "honcho-${version}"; inherit (pythonPackages) python;
version = "0.6.6"; pname = "honcho";
in
pythonPackages.buildPythonApplication rec {
name = "${pname}-${version}";
version = "1.0.1";
namePrefix = ""; namePrefix = "";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nickstenning"; owner = "nickstenning";
repo = "honcho"; repo = "honcho";
rev = "v${version}"; rev = "v${version}";
sha256 = "0lawwcyrrsd9z9jcr94qn1yabl9bzc529jkpc51jq720fhdlfcr0"; sha256 = "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b";
}; };
buildInputs = with pythonPackages; [ nose mock jinja2 ]; buildInputs = with pythonPackages; [ jinja2 pytest mock coverage ];
checkPhase = ''
runHook preCheck buildPhase = ''
nosetests ${python.interpreter} setup.py build
runHook postCheck
''; '';
doCheck = false; 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
PATH=$out/bin:$PATH coverage run -m pytest
runHook postCheck
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A Python clone of Foreman, a tool for managing Procfile-based applications"; description = "A Python clone of Foreman, a tool for managing Procfile-based applications";
@ -28,11 +47,4 @@ let honcho = pythonPackages.buildPythonApplication rec {
maintainers = with maintainers; [ benley ]; maintainers = with maintainers; [ benley ];
platforms = platforms.unix; 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; })