2019-08-30 21:39:47 +02:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, python, isPy27
|
|
|
|
, dotnet-sdk
|
|
|
|
, substituteAll
|
|
|
|
, distro
|
|
|
|
, unzip
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dotnetcore2";
|
2020-04-15 23:00:51 +02:00
|
|
|
version = "2.1.13";
|
2019-08-30 21:39:47 +02:00
|
|
|
format = "wheel";
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version format;
|
|
|
|
python = "py3";
|
|
|
|
platform = "manylinux1_x86_64";
|
2020-04-15 23:00:51 +02:00
|
|
|
sha256 = "1fbg3pn7g0a6pg0gb5vaapcc3cdp6wfnliim57fn3cnzmx5d8p6i";
|
2019-08-30 21:39:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ distro ];
|
|
|
|
|
|
|
|
# needed to apply patches
|
|
|
|
prePatch = ''
|
|
|
|
unzip dist/dotnet*
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
( substituteAll {
|
|
|
|
src = ./runtime.patch;
|
|
|
|
dotnet = dotnet-sdk;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
];
|
|
|
|
|
2020-04-15 23:00:51 +02:00
|
|
|
# prevent exposing a broken dotnet executable
|
|
|
|
postInstall = ''
|
|
|
|
rm -r $out/${python.sitePackages}/${pname}/bin
|
2019-08-30 21:39:47 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
# no tests, ensure it's one useful function works
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -c 'from dotnetcore2 import runtime; print(runtime.get_runtime_path())'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "DotNet Core runtime";
|
|
|
|
homepage = "https://github.com/dotnet/core";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|