depot/third_party/nixpkgs/pkgs/development/python-modules/coconut/default.nix
Default email 620eecebfb Project import generated by Copybara.
GitOrigin-RevId: 2deb07f3ac4eeb5de1c12c4ba2911a2eb1f6ed61
2021-10-28 08:52:43 +02:00

52 lines
1.3 KiB
Nix

{ lib
, buildPythonApplication
, fetchFromGitHub
, fetchpatch
, cpyparsing
, ipykernel
, mypy
, pexpect
, pygments
, pytestCheckHook
, prompt-toolkit
, tkinter
, watchdog
}:
buildPythonApplication rec {
pname = "coconut";
version = "1.5.0";
src = fetchFromGitHub {
owner = "evhub";
repo = "coconut";
rev = "v${version}";
sha256 = "1gc0fwqwzn1j6mcg1f6fw832w66pbaaq9mmi0r4kw3xn5f877icz";
};
propagatedBuildInputs = [ cpyparsing ipykernel mypy pygments prompt-toolkit watchdog ];
postPatch = ''
substituteInPlace coconut/kernel_installer.py \
--replace "fixpath(os.path.join(sys.exec_prefix, icoconut_custom_kernel_install_loc))" \
"fixpath(icoconut_custom_kernel_install_loc)"
'';
checkInputs = [ pexpect pytestCheckHook tkinter ];
# Currently most tests do not work on Hydra due to external fetches.
pytestFlagsArray = [
"tests/constants_test.py"
"tests/main_test.py::TestShell::test_compile_to_file"
"tests/main_test.py::TestShell::test_convenience"
];
pythonImportsCheck = [ "coconut" ];
meta = with lib; {
homepage = "http://coconut-lang.org/";
description = "Simple, elegant, Pythonic functional programming";
license = licenses.asl20;
maintainers = with maintainers; [ fabianhjr ];
};
}