git.iko.soy/typeable/nixpkgs
on master help sign in
coconut: init at 1.4.3
commit674d77e68ab4dfd915ccee9c363d4cece9942d2c authorFabián Heredia Montiel <fabianhjr@protonmail.com> dateTue 3 Nov 2020, 23:16 (6 years ago) parent4408345
3 files changed+56
pkgs/development/python-modules/coconut/default.nix+52 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/coconut/default.nixnew file+52
@@ -0,0 +1,52 @@
1+{
2+ lib,
3+ buildPythonApplication,
4+ fetchFromGitHub,
5+ fetchpatch,
6+
7+ cpyparsing,
8+ ipykernel,
9+ mypy,
10+ pygments,
11+ pytest,
12+ prompt_toolkit,
13+ tkinter,
14+ watchdog
15+}:
16+
17+buildPythonApplication rec {
18+ pname = "coconut";
19+ version = "1.4.3";
20+
21+ src = fetchFromGitHub {
22+ owner = "evhub";
23+ repo = "coconut";
24+ rev = "v${version}";
25+ sha256 = "1pz13vza3yy95dbylnq89fzc3mwgcqr7ds096wy25k6vxd9dp9c3";
26+ };
27+
28+ propagatedBuildInputs = [ cpyparsing pygments prompt_toolkit ipykernel mypy watchdog ];
29+
30+ patches = [
31+ (fetchpatch {
32+ name = "fix-setuptools-version-check.patch";
33+ url = "https://github.com/LibreCybernetics/coconut/commit/2916a087da1e063cc4438b68d4077347fd1ea4a2.patch";
34+ sha256 = "136jbd2rvnifw30y73vv667002nf7sbkm5qyihshj4db7ngysr6q";
35+ })
36+ ];
37+
38+ checkInputs = [ pytest tkinter ];
39+ # Currently most tests do not work on Hydra due to external fetches.
40+ checkPhase = ''
41+ pytest tests/constants_test.py
42+ pytest tests/main_test.py::TestShell::test_compile_to_file
43+ pytest tests/main_test.py::TestShell::test_convenience
44+ '';
45+
46+ meta = with lib; {
47+ homepage = "http://coconut-lang.org/";
48+ description = "Simple, elegant, Pythonic functional programming";
49+ license = licenses.asl20;
50+ maintainers = with maintainers; [ fabianhjr ];
51+ };
52+}
pkgs/top-level/all-packages.nix+2
@@ -1064,6 +1064,8 @@ in
10641064
10651065 cloud-custodian = python3Packages.callPackage ../tools/networking/cloud-custodian { };
10661066
1067+ coconut = with python3Packages; toPythonApplication coconut;
1068+
10671069 cod = callPackage ../tools/misc/cod { };
10681070
10691071 codespell = with python3Packages; toPythonApplication codespell;
pkgs/top-level/python-packages.nix+2
@@ -1250,6 +1250,8 @@ in {
12501250
12511251 cnvkit = callPackage ../development/python-modules/cnvkit { };
12521252
1253+ coconut = callPackage ../development/python-modules/coconut { };
1254+
12531255 cocotb = callPackage ../development/python-modules/cocotb { };
12541256
12551257 codecov = callPackage ../development/python-modules/codecov { };