3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/omnisharp-roslyn/default.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv
2019-04-11 22:45:02 +01:00
, fetchurl
, mono6
, msbuild
, dotnet-sdk
2019-04-11 22:45:02 +01:00
, makeWrapper
, dotnetPackages
2019-04-11 22:45:02 +01:00
}:
stdenv.mkDerivation rec {
pname = "omnisharp-roslyn";
2021-04-02 15:59:08 +01:00
version = "1.37.8";
2020-05-24 14:09:15 +01:00
2019-04-11 22:45:02 +01:00
src = fetchurl {
url = "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${version}/omnisharp-mono.tar.gz";
2021-04-02 15:59:08 +01:00
sha256 = "0kgv4l15rli9a7grmcsbv72csmxi7vqa7lrrr8bd4cq9ighh54q3";
2019-04-11 22:45:02 +01:00
};
nativeBuildInputs = [ makeWrapper dotnet-sdk dotnetPackages.Nuget ];
2019-04-11 22:45:02 +01:00
preUnpack = ''
mkdir src
cd src
sourceRoot=.
'';
installPhase = ''
mkdir -p $out/bin
cd ..
2020-11-22 05:59:26 +00:00
cp -r src $out/
rm -r $out/src/.msbuild
cp -r ${msbuild}/lib/mono/msbuild $out/src/.msbuild
chmod -R u+w $out/src
mv $out/src/.msbuild/Current/{bin,Bin}
makeWrapper ${mono6}/bin/mono $out/bin/omnisharp \
2019-04-11 22:45:02 +01:00
--add-flags "$out/src/OmniSharp.exe"
'';
meta = with lib; {
2019-04-11 22:45:02 +01:00
description = "OmniSharp based on roslyn workspaces";
2020-05-24 14:09:15 +01:00
homepage = "https://github.com/OmniSharp/omnisharp-roslyn";
2019-04-11 22:45:02 +01:00
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ tesq0 ericdallo ];
2019-04-11 22:45:02 +01:00
};
}