Unverified Commit a2a0d3fb authored by Masum Reza's avatar Masum Reza Committed by GitHub
Browse files

Merge pull request #325875 from eclairevoyant/tf-fix

thefuck: fix build, modernise, reformat, move to by-name
parents 23bc2819 371f2fc5
Loading
Loading
Loading
Loading
+27 −12
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, buildPythonApplication
, colorama, decorator, psutil, pyte, six
, go, mock, pytest7CheckHook, pytest-mock
{
  lib,
  stdenv,
  fetchFromGitHub,
  python311Packages,
  go,
}:

buildPythonApplication rec {
python311Packages.buildPythonApplication rec {
  pname = "thefuck";
  version = "3.32";

  src = fetchFromGitHub {
    owner = "nvbn";
    repo = pname;
    rev = version;
    sha256 = "sha256-bRCy95owBJaxoyCNQF6gEENoxCkmorhyKzZgU1dQN6I=";
    repo = "thefuck";
    rev = "refs/tags/${version}";
    hash = "sha256-bRCy95owBJaxoyCNQF6gEENoxCkmorhyKzZgU1dQN6I=";
  };

  propagatedBuildInputs = [ colorama decorator psutil pyte six ];
  dependencies = with python311Packages; [
    colorama
    decorator
    psutil
    pyte
    six
  ];

  nativeCheckInputs = [ go mock pytest7CheckHook pytest-mock ];
  nativeCheckInputs =
    [ go ]
    ++ (with python311Packages; [
      mock
      pytest7CheckHook
      pytest-mock
    ]);

  disabledTests = lib.optionals stdenv.isDarwin [
    "test_settings_defaults"
@@ -35,10 +50,10 @@ buildPythonApplication rec {
    "test_when_successfully_configured"
  ];

  meta = with lib; {
  meta = {
    homepage = "https://github.com/nvbn/thefuck";
    description = "Magnificent app which corrects your previous console command";
    license = licenses.mit;
    maintainers = with maintainers; [ marcusramberg ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ marcusramberg ];
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -13392,8 +13392,6 @@ with pkgs;
    themes = recurseIntoAttrs (getPackagesWithPrefix "theme");
  };
  thefuck = python3Packages.callPackage ../tools/misc/thefuck { };
  theme-sh = callPackage ../tools/misc/theme-sh { };
  thiefmd = callPackage ../applications/editors/thiefmd { };