Skip to content

Commit ea7ebb0

Browse files
committed
Add pypy3 sample environment
1 parent e37022e commit ea7ebb0

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

modules/kernels/python/default.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
, python3
1111

12+
, name
13+
1214
, settings
1315
, settingsSchema
1416
}:
@@ -22,7 +24,7 @@ let
2224
hasPythonLspServer = python: (lib.hasAttr "python-lsp-server" python.pkgs) && (lib.versionAtLeast python.pythonVersion "3.7");
2325
hasPythonLanguageServer = python: lib.hasAttr "python-language-server" python.pkgs;
2426

25-
displayName = "Python " + python3.version;
27+
displayName = name + " " + python3.version;
2628
kernelName = "python3";
2729

2830
packageOptions = python3.pkgs;

modules/kernels/python/module.nix

+4
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ in
132132
else lib.getAttr x config.pkgs;
133133
in
134134
config.pkgs.callPackage ./. {
135+
name = "Python";
136+
135137
python3 = basePython;
136138

137139
settings = config.kernels.python3;
@@ -142,6 +144,8 @@ in
142144
(mkIf config.kernels.pypy3.enable {
143145
builtKernels.pypy3 =
144146
config.pkgs.callPackage ./. {
147+
name = "PyPy";
148+
145149
python3 = lib.getAttr config.kernels.pypy3.python3Package config.pkgs;
146150

147151
settings = config.kernels.pypy3;

sample_environments.nix

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ args: {
1919
mega = import ./sample_environments/mega.nix args;
2020
octave = import ./sample_environments/octave.nix args;
2121
postgres = import ./sample_environments/postgres.nix args;
22+
pypy3 = import ./sample_environments/pypy3.nix args;
2223
python3 = import ./sample_environments/python3.nix args;
2324
r = import ./sample_environments/r.nix args;
2425
ruby = import ./sample_environments/ruby.nix args;

sample_environments/pypy3.nix

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ codedown
2+
, channels ? {}
3+
, ...
4+
}:
5+
6+
codedown.makeEnvironment {
7+
kernels.pypy3.enable = true;
8+
kernels.pypy3.packages = [
9+
"matplotlib"
10+
"scipy"
11+
"rope"
12+
];
13+
}

0 commit comments

Comments
 (0)