From fe7065bfe0e73b5395b2de1fd06e5899404ffcd0 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 30 May 2025 00:29:16 +0200 Subject: [PATCH] thefuck: drop It was pinned to python311 last summer due to two uses of the removed module 'imp'. One of the uses are fixed on the upstream master branch but is unreleased, and the second use is fixed by two separate open PRs. The author is unresponsive and has been inactive since january 2024. Rather than rebase and apply the two fixes I feel it makes more sense to drop the package. --- nixos/modules/module-list.nix | 1 - nixos/modules/programs/thefuck.nix | 43 --------------------- nixos/modules/rename.nix | 4 ++ pkgs/by-name/th/thefuck/package.nix | 59 ----------------------------- pkgs/top-level/aliases.nix | 1 + 5 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 nixos/modules/programs/thefuck.nix delete mode 100644 pkgs/by-name/th/thefuck/package.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b618a08fc379..f53efee6a4a9 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -316,7 +316,6 @@ ./programs/systemtap.nix ./programs/tcpdump.nix ./programs/television.nix - ./programs/thefuck.nix ./programs/thunar.nix ./programs/thunderbird.nix ./programs/tmux.nix diff --git a/nixos/modules/programs/thefuck.nix b/nixos/modules/programs/thefuck.nix deleted file mode 100644 index dccc3079d31f..000000000000 --- a/nixos/modules/programs/thefuck.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -let - prg = config.programs; - cfg = prg.thefuck; - - bashAndZshInitScript = '' - eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias}) - ''; - fishInitScript = '' - ${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias} | source - ''; -in -{ - options = { - programs.thefuck = { - enable = lib.mkEnableOption "thefuck, an app which corrects your previous console command"; - - alias = lib.mkOption { - default = "fuck"; - type = lib.types.str; - - description = '' - `thefuck` needs an alias to be configured. - The default value is `fuck`, but you can use anything else as well. - ''; - }; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ thefuck ]; - - programs.bash.interactiveShellInit = bashAndZshInitScript; - programs.zsh.interactiveShellInit = lib.mkIf prg.zsh.enable bashAndZshInitScript; - programs.fish.interactiveShellInit = lib.mkIf prg.fish.enable fishInitScript; - }; -} diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 94e868dad32c..c75ee41099f4 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -66,6 +66,10 @@ in pantheon-tweaks is no longer a switchboard plugin but an independent app, adding the package to environment.systemPackages is sufficient. '') + (mkRemovedOptionModule [ "programs" "thefuck" ] '' + The corresponding package was removed from nixpkgs, + consider using `programs.pay-respects` instead. + '') (mkRemovedOptionModule [ "programs" "tilp2" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "programs" "way-cooler" ] ( "way-cooler is abandoned by its author: " diff --git a/pkgs/by-name/th/thefuck/package.nix b/pkgs/by-name/th/thefuck/package.nix deleted file mode 100644 index 69214db315cc..000000000000 --- a/pkgs/by-name/th/thefuck/package.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - python311Packages, - go, -}: - -python311Packages.buildPythonApplication rec { - pname = "thefuck"; - version = "3.32"; - - src = fetchFromGitHub { - owner = "nvbn"; - repo = "thefuck"; - tag = version; - hash = "sha256-bRCy95owBJaxoyCNQF6gEENoxCkmorhyKzZgU1dQN6I="; - }; - - dependencies = with python311Packages; [ - colorama - decorator - psutil - pyte - six - ]; - - nativeCheckInputs = - [ go ] - ++ (with python311Packages; [ - mock - pytest7CheckHook - pytest-mock - ]); - - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ - "test_settings_defaults" - "test_from_file" - "test_from_env" - "test_settings_from_args" - "test_get_all_executables_exclude_paths" - "test_with_blank_cache" - "test_with_filled_cache" - "test_when_etag_changed" - "test_for_generic_shell" - "test_on_first_run" - "test_on_run_after_other_commands" - "test_when_cant_configure_automatically" - "test_when_already_configured" - "test_when_successfully_configured" - ]; - - meta = { - homepage = "https://github.com/nvbn/thefuck"; - description = "Magnificent app which corrects your previous console command"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ marcusramberg ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 00958a6fc011..5b8fac8dd8c1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1884,6 +1884,7 @@ mapAliases { testVersion = testers.testVersion; # Added 2022-04-20 tfplugindocs = terraform-plugin-docs; # Added 2023-11-01 thiefmd = throw "'thiefmd' has been removed due to lack of maintenance upstream and incompatible with newer Pandoc. Please use 'apostrophe' or 'folio' instead"; # Added 2025-02-20 + thefuck = throw "'thefuck' has been removed due to lack of maintenance upstream and incompatible with python 3.12+. Consider using 'pay-respects' instead"; # Added 2025-05-30 invalidateFetcherByDrvHash = testers.invalidateFetcherByDrvHash; # Added 2022-05-05 tijolo = throw "'tijolo' has been removed due to being unmaintained"; # Added 2024-12-27 timescale-prometheus = throw "'timescale-prometheus' has been renamed to/replaced by 'promscale'"; # Converted to throw 2024-10-17