diff options
author | Felix Rath <felixm.rath@gmail.com> | 2021-05-03 19:17:00 +0200 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-05-15 16:20:43 -0700 |
commit | d68e0569a0b5be705f11922f6144b334e3905c13 (patch) | |
tree | 9bd419ee27437c8889d84ea9cdf8424c3f373e93 /pkgs/development/dotnet-modules | |
parent | d3b00c99a92e554ea74380b61ef4ee2f12adc88a (diff) |
python-language-server: cleanup deps, add missing phase hooks
also improve script a little bit
Diffstat (limited to 'pkgs/development/dotnet-modules')
4 files changed, 12 insertions, 100 deletions
diff --git a/pkgs/development/dotnet-modules/python-language-server/create_deps.sh b/pkgs/development/dotnet-modules/python-language-server/create_deps.sh index f3cdcbc0c108b..37f0585d1fef2 100755 --- a/pkgs/development/dotnet-modules/python-language-server/create_deps.sh +++ b/pkgs/development/dotnet-modules/python-language-server/create_deps.sh @@ -4,6 +4,8 @@ # Run this script to generate deps.nix # ./create_deps.sh /path/to/microsoft/python/language/server/source/checkout +set -euo pipefail + SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" if [ -d "$1" ]; then @@ -14,13 +16,13 @@ else fi # Generate lockfiles in source checkout -cd $CHECKOUT_PATH/src +cd "$CHECKOUT_PATH/src" dotnet nuget locals all --clear dotnet restore -v normal --no-cache PLS.sln --use-lock-file -r linux-x64 # Use the lockfiles to make a file with two columns: name and version number # for all possible package dependencies -cd $SCRIPTDIR +cd "$SCRIPTDIR" echo "" > all_versions.txt for lockfile in $(find "$CHECKOUT_PATH" -name packages.lock.json); do echo "Processing lockfile $lockfile" diff --git a/pkgs/development/dotnet-modules/python-language-server/default.nix b/pkgs/development/dotnet-modules/python-language-server/default.nix index 32fa73e90e86b..6502890af2beb 100644 --- a/pkgs/development/dotnet-modules/python-language-server/default.nix +++ b/pkgs/development/dotnet-modules/python-language-server/default.nix @@ -62,6 +62,8 @@ stdenv.mkDerivation { ]; buildPhase = '' + runHook preBuild + mkdir home export HOME=$(mktemp -d) export DOTNET_CLI_TELEMETRY_OPTOUT=1 @@ -75,14 +77,20 @@ stdenv.mkDerivation { pushd src/LanguageServer/Impl dotnet publish --no-restore -c Release -r linux-x64 popd + + runHook postBuild ''; installPhase = '' + runHook preInstall + mkdir -p $out cp -r output/bin/Release/linux-x64/publish $out/lib mkdir $out/bin makeWrapper $out/lib/Microsoft.Python.LanguageServer $out/bin/python-language-server + + runHook postInstall ''; postFixup = '' diff --git a/pkgs/development/dotnet-modules/python-language-server/deps.nix b/pkgs/development/dotnet-modules/python-language-server/deps.nix index e191c67a4f1d8..899f38d256dd8 100644 --- a/pkgs/development/dotnet-modules/python-language-server/deps.nix +++ b/pkgs/development/dotnet-modules/python-language-server/deps.nix @@ -47,36 +47,6 @@ in [ }) (fetchNuGet { - name = "Microsoft.AspNetCore.App.Ref"; - version = "3.0.1"; - sha256 = "0k2ry757qhm99xwm0wh4zalxn9nmxhfswd184z1fjr42szr511fb"; - }) - - (fetchNuGet { - name = "Microsoft.AspNetCore.App.Runtime.linux-x64"; - version = "3.0.2"; - sha256 = "0d4r744n3bk4v7ddfjpy5ils150h0693bil3c7v27n84037hqndj"; - }) - - (fetchNuGet { - name = "Microsoft.AspNetCore.App.Runtime.linux-x64"; - version = "3.0.3"; - sha256 = "1jcqy8i9fzb1pmkazi80yqr09zi5nk30n57i46ggr5ky45jngfq9"; - }) - - (fetchNuGet { - name = "Microsoft.AspNetCore.App.Runtime.linux-x64"; - version = "3.1.2"; - sha256 = "19wfh9yg4n2khbl7pvf6ngx95m5p8lw4l9y935pv7nh4xgwk02p9"; - }) - - (fetchNuGet { - name = "Microsoft.AspNetCore.App.Runtime.linux-x64"; - version = "3.1.3"; - sha256 = "0kvnzb9xjii48kg30ac63qdf0fn1y8j3nblbrfaqv2aiy6kp0iwn"; - }) - - (fetchNuGet { name = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "3.1.8"; sha256 = "140zr3nwkmf6xc52gq4iz6ycyh95fxy0jpgn637pkd9z423z8135"; @@ -107,60 +77,6 @@ in [ }) (fetchNuGet { - name = "Microsoft.NetCore.App.Host.linux-x64"; - version = "3.0.2"; - sha256 = "0y14y2x3wbi44i23ndmf4323cii8wrqw9s289gcab3s393l71sf5"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Host.linux-x64"; - version = "3.0.3"; - sha256 = "19igfvwsjzwkh90gqzabl6pdkyygslj2iwpsxg680phffzr411w4"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Host.linux-x64"; - version = "3.1.3"; - sha256 = "013ibnhsimgqj5l2dqma035xvsvrb47bn65z6xbxgg88383hpgvw"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Ref"; - version = "3.0.0"; - sha256 = "1qi382157ln7yngazvr3nskpjkab4x8sqx11l13xyg56vyyjyyiw"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Ref"; - version = "3.1.0"; - sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Runtime.linux-x64"; - version = "3.0.2"; - sha256 = "1h6d0nl495k0bh4my43l578l7m8qwah7ll42aax7jrib2py354f1"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Runtime.linux-x64"; - version = "3.0.3"; - sha256 = "1ykgfnphbkyck0gqbbh5n96w59z2bq47g896ygal1j4nblj3s44v"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Runtime.linux-x64"; - version = "3.1.2"; - sha256 = "0a332ia5pabnz7mdfc99a5hlc7drnwzlc7cj9b5c3an6dq636p66"; - }) - - (fetchNuGet { - name = "Microsoft.NetCore.App.Runtime.linux-x64"; - version = "3.1.3"; - sha256 = "1ynhzsr8a0hfby2wjhzkdiimj18izgfzp7m2yp3pby2iwb4v3xy9"; - }) - - (fetchNuGet { name = "Microsoft.NetCore.App.Runtime.linux-x64"; version = "3.1.8"; sha256 = "1bv9n9wzsqf9g8h6z10p61xkcx8ad4nnip83qv8yyfvhr4kdmbsa"; diff --git a/pkgs/development/dotnet-modules/python-language-server/manual_deps.txt b/pkgs/development/dotnet-modules/python-language-server/manual_deps.txt index c0f1fd503d939..ec49eee7e9cfb 100644 --- a/pkgs/development/dotnet-modules/python-language-server/manual_deps.txt +++ b/pkgs/development/dotnet-modules/python-language-server/manual_deps.txt @@ -1,16 +1,2 @@ Microsoft.AspNetCore.App.Runtime.linux-x64 3.1.8 -Microsoft.AspNetCore.App.Runtime.linux-x64 3.1.3 -Microsoft.AspNetCore.App.Ref 3.0.1 -Microsoft.AspNetCore.App.Runtime.linux-x64 3.1.2 -Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3 -Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.2 -Microsoft.NetCore.App.Ref 3.1.0 -Microsoft.NetCore.App.Ref 3.0.0 Microsoft.NetCore.App.Runtime.linux-x64 3.1.8 -Microsoft.NetCore.App.Runtime.linux-x64 3.1.3 -Microsoft.NetCore.App.Runtime.linux-x64 3.1.2 -Microsoft.NetCore.App.Runtime.linux-x64 3.0.2 -Microsoft.NetCore.App.Runtime.linux-x64 3.0.3 -Microsoft.NetCore.App.Host.linux-x64 3.1.3 -Microsoft.NetCore.App.Host.linux-x64 3.0.2 -Microsoft.NetCore.App.Host.linux-x64 3.0.3 |