2017-12-14 18:31:25 +01:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonApplication
|
|
|
|
, colorama, decorator, psutil, pyte, six
|
|
|
|
, pytest, pytest-mock
|
|
|
|
}:
|
2017-06-14 10:57:38 +02:00
|
|
|
|
2017-12-14 18:31:25 +01:00
|
|
|
buildPythonApplication rec {
|
2017-06-14 10:57:38 +02:00
|
|
|
pname = "thefuck";
|
2020-03-19 21:24:26 +01:00
|
|
|
version = "3.30";
|
2017-06-14 10:57:38 +02:00
|
|
|
|
2017-12-14 18:31:25 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nvbn";
|
2019-09-09 01:38:31 +02:00
|
|
|
repo = pname;
|
2017-12-14 18:31:25 +01:00
|
|
|
rev = version;
|
2020-03-19 21:24:26 +01:00
|
|
|
sha256 = "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg";
|
2017-06-14 10:57:38 +02:00
|
|
|
};
|
|
|
|
|
2017-12-14 18:31:25 +01: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 10:57:38 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nvbn/thefuck";
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "Magnificent app which corrects your previous console command";
|
2017-06-14 10:57:38 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|