1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/dotnetcore2/default.nix
Jonathan Ringer 006da38a3b python3Packages.dotnetcore2: fix src hash
Was errornously updated
2019-12-01 23:37:10 -08:00

60 lines
1.4 KiB
Nix

{ stdenv, lib, buildPythonPackage, fetchPypi, python, isPy27
, dotnet-sdk
, substituteAll
, distro
, unzip
}:
buildPythonPackage rec {
pname = "dotnetcore2";
version = "2.1.11";
format = "wheel";
disabled = isPy27;
src = fetchPypi {
inherit pname version format;
python = "py3";
platform = "manylinux1_x86_64";
sha256 = "0qhp94bjz4icz2f0fnhgck875chiqzy4lvsp6lwhj5jd0zsv2bb3";
};
nativeBuildInputs = [ unzip ];
propagatedBuildInputs = [ distro ];
# needed to apply patches
prePatch = ''
unzip dist/dotnet*
'';
patches = [
( substituteAll {
src = ./runtime.patch;
dotnet = dotnet-sdk;
}
)
];
# unfortunately the noraml pip install fails because the manylinux1 format check fails with NixOS
installPhase = ''
mkdir -p $out/${python.sitePackages}/${pname}
# copy metadata
cp -r dotnetcore2-2* $out/${python.sitePackages}
# copy non-dotnetcore related files
cp -r dotnetcore2/{__init__.py,runtime.py} $out/${python.sitePackages}/${pname}
'';
# 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 ];
};
}