2017-12-14 17:31:25 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonApplication
|
|
|
|
, colorama, decorator, psutil, pyte, six
|
|
|
|
, pytest, pytest-mock
|
|
|
|
}:
|
2017-06-14 08:57:38 +00:00
|
|
|
|
2017-12-14 17:31:25 +00:00
|
|
|
buildPythonApplication rec {
|
2017-06-14 08:57:38 +00:00
|
|
|
pname = "thefuck";
|
2018-05-22 20:01:26 +00:00
|
|
|
version = "3.27";
|
2017-06-14 08:57:38 +00:00
|
|
|
|
2017-12-14 17:31:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nvbn";
|
|
|
|
repo = "${pname}";
|
|
|
|
rev = version;
|
2018-05-22 20:01:26 +00:00
|
|
|
sha256 = "1lsg0g9lnpj2nidggm16b7jm4xzhg0dgy81crfzny62hah1zk0pj";
|
2017-06-14 08:57:38 +00:00
|
|
|
};
|
|
|
|
|
2017-12-14 17:31:25 +00:00
|
|
|
propagatedBuildInputs = [ colorama decorator psutil pyte six ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytest-mock ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export XDG_CACHE_HOME=$TMPDIR/cache
|
|
|
|
export XDG_CONFIG_HOME=$TMPDIR/config
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # The above is only enough for tests to pass outside the sandbox.
|
2017-06-14 08:57:38 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/nvbn/thefuck;
|
2017-06-14 08:57:38 +00:00
|
|
|
description = "Magnificent app which corrects your previous console command.";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|