1{ lib 2, stdenv 3, fetchFromGitHub 4, buildDotnetModule 5, dotnetCorePackages 6, stdenvNoCC 7, autoPatchelfHook 8, openssl 9, icu 10}: 11 12buildDotnetModule rec { 13 pname = "python-language-server"; 14 version = "2022-02-18"; 15 16 src = fetchFromGitHub { 17 owner = "microsoft"; 18 repo = "python-language-server"; 19 rev = "52c1afd34b5acb0b44597bb8681232876fe94084"; 20 sha256 = "05s8mwi3dqzjghgpr1mfs1b7cgrq818bbj1v7aly6axc8c2n4gny"; 21 }; 22 23 projectFile = "src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj"; 24 nugetDeps = ./deps.nix; 25 26 dotnet-sdk = dotnetCorePackages.sdk_3_1; 27 dotnet-runtime = dotnetCorePackages.runtime_3_1; 28 29 dotnetRestoreFlags = [ "--runtime ${dotnet-sdk.systemToDotnetRid stdenvNoCC.targetPlatform.system}" ]; 30 31 nativeBuildInputs = [ autoPatchelfHook ]; 32 buildInputs = [ stdenv.cc.cc.lib ]; 33 runtimeDeps = [ openssl icu ]; 34 35 postFixup = '' 36 mv $out/bin/Microsoft.Python.LanguageServer $out/bin/python-language-server 37 ''; 38 39 passthru.updateScript = ./updater.sh; 40 41 meta = with lib; { 42 description = "Microsoft Language Server for Python"; 43 homepage = "https://github.com/microsoft/python-language-server"; 44 license = licenses.asl20; 45 maintainers = with maintainers; [ thomasjm ]; 46 platforms = [ "x86_64-linux" ]; 47 }; 48}