Create a from-source Nix package for oils-for-nix
This commit is contained in:
commit
5f14fab320
5 changed files with 194 additions and 0 deletions
40
mypy-0.780.nix
Normal file
40
mypy-0.780.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
pname = "mypy";
|
||||
# This is the version oils-for-unix uses for mycpp Python-to-C++ translation
|
||||
version = "0.780";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python";
|
||||
repo = "mypy";
|
||||
rev = "v${version}";
|
||||
# Fetch submodules to include typeshed (required for type stubs)
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-czwCx6ZjCu3CrVmbI6NbstzWM0GvuPTWJiiUhXSznu4=";
|
||||
};
|
||||
|
||||
# Do not use mypyc to compile.
|
||||
# Rather, build interpreted so mycpp can extend its classes.
|
||||
preBuild = ''
|
||||
export MYPY_USE_MYPYC=0
|
||||
'';
|
||||
|
||||
# Skip tests to speed up build
|
||||
doCheck = false;
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
mypy-extensions
|
||||
typing-extensions
|
||||
typed-ast
|
||||
];
|
||||
|
||||
# Ensure we're not pulling in a compiled version
|
||||
pythonImportsCheck = [ "mypy" ];
|
||||
|
||||
meta.license = lib.licenses.mit;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue