nixpkgs-suyu/pkgs/development/tools/omnisharp-roslyn/default.nix
2021-01-23 20:30:03 +07:00

42 lines
896 B
Nix

{ lib, stdenv
, fetchurl
, mono5
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "omnisharp-roslyn";
version = "1.37.4";
src = fetchurl {
url = "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${version}/omnisharp-mono.tar.gz";
sha256 = "0pknphydf194n7rjyax4mh8n7j8679j0jflw63gfgh37daxry0r2";
};
nativeBuildInputs = [ makeWrapper ];
preUnpack = ''
mkdir src
cd src
sourceRoot=.
'';
installPhase = ''
mkdir -p $out/bin
cd ..
cp -r src $out/
ls -al $out/src
makeWrapper ${mono5}/bin/mono $out/bin/omnisharp \
--add-flags "$out/src/OmniSharp.exe"
'';
meta = with lib; {
description = "OmniSharp based on roslyn workspaces";
homepage = "https://github.com/OmniSharp/omnisharp-roslyn";
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ tesq0 ];
};
}