From d68e0569a0b5be705f11922f6144b334e3905c13 Mon Sep 17 00:00:00 2001 From: Felix Rath Date: Mon, 3 May 2021 19:17:00 +0200 Subject: python-language-server: cleanup deps, add missing phase hooks also improve script a little bit --- .../python-language-server/create_deps.sh | 6 +- .../python-language-server/default.nix | 8 +++ .../dotnet-modules/python-language-server/deps.nix | 84 ---------------------- .../python-language-server/manual_deps.txt | 14 ---- 4 files changed, 12 insertions(+), 100 deletions(-) (limited to 'pkgs/development') 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 f3cdcbc0c10..37f0585d1fe 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 32fa73e90e8..6502890af2b 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 e191c67a4f1..899f38d256d 100644 --- a/pkgs/development/dotnet-modules/python-language-server/deps.nix +++ b/pkgs/development/dotnet-modules/python-language-server/deps.nix @@ -46,36 +46,6 @@ in [ sha256 = "190d755l60j3l5m1661wj19gj9w6ngza56q3vkijkkmbbabdmqln"; }) - (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"; @@ -106,60 +76,6 @@ in [ sha256 = "1v2lr0vbssqayzgxvdwb54jmvz7mvlih4l9h7i71gm3c62nlbq8y"; }) - (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"; 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 c0f1fd503d9..ec49eee7e9c 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 -- cgit 1.4.1