mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
python311Packages,
|
|
go,
|
|
}:
|
|
|
|
python311Packages.buildPythonApplication rec {
|
|
pname = "thefuck";
|
|
version = "3.32";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nvbn";
|
|
repo = "thefuck";
|
|
rev = "refs/tags/${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 ];
|
|
};
|
|
}
|