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" ```
69 lines
1.4 KiB
Nix
69 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
docstring-to-markdown,
|
|
fetchFromGitHub,
|
|
jedi,
|
|
lsprotocol,
|
|
poetry-core,
|
|
pygls,
|
|
pydantic,
|
|
pyhamcrest,
|
|
pytestCheckHook,
|
|
python-lsp-jsonrpc,
|
|
pythonOlder,
|
|
stdenv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "jedi-language-server";
|
|
version = "0.41.4";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pappasam";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-RDLwL9AZ3G8CzVwDtWqFFZNH/ulpHeFBhglbWNv/ZIk=";
|
|
};
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
docstring-to-markdown
|
|
jedi
|
|
lsprotocol
|
|
pydantic
|
|
pygls
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pyhamcrest
|
|
python-lsp-jsonrpc
|
|
];
|
|
|
|
preCheck = ''
|
|
HOME="$(mktemp -d)"
|
|
'';
|
|
|
|
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# https://github.com/pappasam/jedi-language-server/issues/313
|
|
"test_publish_diagnostics_on_change"
|
|
"test_publish_diagnostics_on_save"
|
|
];
|
|
|
|
pythonImportsCheck = [ "jedi_language_server" ];
|
|
|
|
meta = with lib; {
|
|
description = "Language Server for the latest version(s) of Jedi";
|
|
mainProgram = "jedi-language-server";
|
|
homepage = "https://github.com/pappasam/jedi-language-server";
|
|
changelog = "https://github.com/pappasam/jedi-language-server/blob/${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
};
|
|
}
|