Skip to content

Commit 7a6716f

Browse files
authored
Merge pull request tweag#78 from tweag/yarn2nix
Make it possible to generate folder from lockfiles
2 parents 12b5490 + 4f81dfa commit 7a6716f

File tree

5 files changed

+6718
-21
lines changed

5 files changed

+6718
-21
lines changed

default.nix

+8-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let
5353
name = "jupyterlab-shell";
5454
inputsFrom = extraInputsFrom pkgs;
5555
buildInputs =
56-
[ jupyterlab generateDirectory pkgs.nodejs ] ++
56+
[ jupyterlab generateDirectory generateLockFile pkgs.nodejs ] ++
5757
(map (k: k.runtimePackages) kernels) ++
5858
(extraPackages pkgs);
5959
shellHook = ''
@@ -66,4 +66,10 @@ let
6666
passthru = oldAttrs.passthru or {} // { inherit env; };
6767
});
6868
in
69-
{ inherit jupyterlabWith kernels mkDirectoryWith mkDockerImage; }
69+
{ inherit
70+
jupyterlabWith
71+
kernels
72+
mkDirectoryWith
73+
mkDirectoryFromLockFile
74+
mkDockerImage;
75+
}
+273
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
{
2+
"name": "@jupyterlab/application-top",
3+
"version": "1.2.2",
4+
"private": true,
5+
"scripts": {
6+
"build": "webpack",
7+
"build:dev": "jlpm run build",
8+
"build:dev:minimize": "jlpm run build:dev",
9+
"build:prod": "ensure-max-old-space webpack --config webpack.prod.config.js",
10+
"build:prod:minimize": "ensure-max-old-space webpack --config webpack.prod.minimize.config.js",
11+
"build:prod:release": "ensure-max-old-space webpack --config webpack.prod.release.config.js",
12+
"build:prod:stats": "ensure-max-old-space webpack --profile --config webpack.prod.minimize.config.js --json > stats.json",
13+
"build:stats": "webpack --profile --json > stats.json",
14+
"clean": "rimraf build",
15+
"prepublishOnly": "npm run build",
16+
"watch": "webpack --watch"
17+
},
18+
"dependencies": {
19+
"@jupyterlab/application": "~1.2.0",
20+
"@jupyterlab/application-extension": "~1.2.0",
21+
"@jupyterlab/apputils-extension": "~1.2.0",
22+
"@jupyterlab/codemirror-extension": "~1.2.0",
23+
"@jupyterlab/completer-extension": "~1.2.1",
24+
"@jupyterlab/console-extension": "~1.2.1",
25+
"@jupyterlab/coreutils": "~3.2.0",
26+
"@jupyterlab/csvviewer-extension": "~1.2.1",
27+
"@jupyterlab/docmanager-extension": "~1.2.0",
28+
"@jupyterlab/documentsearch-extension": "~1.2.1",
29+
"@jupyterlab/extensionmanager-extension": "~1.2.1",
30+
"@jupyterlab/filebrowser-extension": "~1.2.0",
31+
"@jupyterlab/fileeditor-extension": "~1.2.1",
32+
"@jupyterlab/help-extension": "~1.2.0",
33+
"@jupyterlab/htmlviewer-extension": "~1.2.0",
34+
"@jupyterlab/hub-extension": "~1.2.0",
35+
"@jupyterlab/imageviewer-extension": "~1.2.0",
36+
"@jupyterlab/inspector-extension": "~1.2.1",
37+
"@jupyterlab/javascript-extension": "~1.2.0",
38+
"@jupyterlab/json-extension": "~1.2.0",
39+
"@jupyterlab/launcher-extension": "~1.2.0",
40+
"@jupyterlab/logconsole-extension": "~1.0.2",
41+
"@jupyterlab/mainmenu-extension": "~1.2.0",
42+
"@jupyterlab/markdownviewer-extension": "~1.2.0",
43+
"@jupyterlab/mathjax2-extension": "~1.2.0",
44+
"@jupyterlab/notebook-extension": "~1.2.1",
45+
"@jupyterlab/pdf-extension": "~1.2.0",
46+
"@jupyterlab/rendermime-extension": "~1.2.0",
47+
"@jupyterlab/running-extension": "~1.2.0",
48+
"@jupyterlab/settingeditor-extension": "~1.2.0",
49+
"@jupyterlab/shortcuts-extension": "~1.2.0",
50+
"@jupyterlab/statusbar-extension": "~1.2.1",
51+
"@jupyterlab/tabmanager-extension": "~1.2.0",
52+
"@jupyterlab/terminal-extension": "~1.2.0",
53+
"@jupyterlab/theme-dark-extension": "~1.2.0",
54+
"@jupyterlab/theme-light-extension": "~1.2.0",
55+
"@jupyterlab/tooltip-extension": "~1.2.1",
56+
"@jupyterlab/ui-components-extension": "~1.2.0",
57+
"@jupyterlab/vdom-extension": "~1.2.1",
58+
"@jupyterlab/vega4-extension": "~1.2.0",
59+
"@jupyterlab/vega5-extension": "~1.2.0",
60+
"jupyterlab-ihaskell": "~0.0.9"
61+
},
62+
"devDependencies": {
63+
"@jupyterlab/buildutils": "^1.2.1",
64+
"css-loader": "~2.1.1",
65+
"duplicate-package-checker-webpack-plugin": "^3.0.0",
66+
"file-loader": "~3.0.1",
67+
"fs-extra": "^8.0.1",
68+
"glob": "~7.1.2",
69+
"handlebars": "^4.1.2",
70+
"html-loader": "~0.5.5",
71+
"html-webpack-plugin": "~3.2.0",
72+
"mini-css-extract-plugin": "~0.6.0",
73+
"raw-loader": "~2.0.0",
74+
"rimraf": "~2.6.2",
75+
"sort-package-json": "~1.22.1",
76+
"source-map-loader": "~0.2.1",
77+
"style-loader": "~0.23.1",
78+
"svg-url-loader": "~2.3.2",
79+
"svgo": "~1.2.1",
80+
"svgo-loader": "~2.2.0",
81+
"terser-webpack-plugin": "^1.3.0",
82+
"url-loader": "~1.1.2",
83+
"webpack": "^4.32.2",
84+
"webpack-bundle-analyzer": "^3.4.1",
85+
"webpack-cli": "^3.3.0",
86+
"webpack-merge": "^4.2.1",
87+
"whatwg-fetch": "^3.0.0",
88+
"yarn-deduplicate": "^1.1.1"
89+
},
90+
"resolutions": {
91+
"@jupyterlab/application": "~1.2.0",
92+
"@jupyterlab/application-extension": "~1.2.0",
93+
"@jupyterlab/apputils": "~1.2.0",
94+
"@jupyterlab/apputils-extension": "~1.2.0",
95+
"@jupyterlab/attachments": "~1.2.0",
96+
"@jupyterlab/cells": "~1.2.1",
97+
"@jupyterlab/codeeditor": "~1.2.0",
98+
"@jupyterlab/codemirror": "~1.2.0",
99+
"@jupyterlab/codemirror-extension": "~1.2.0",
100+
"@jupyterlab/completer": "~1.2.0",
101+
"@jupyterlab/completer-extension": "~1.2.1",
102+
"@jupyterlab/console": "~1.2.1",
103+
"@jupyterlab/console-extension": "~1.2.1",
104+
"@jupyterlab/coreutils": "~3.2.0",
105+
"@jupyterlab/csvviewer": "~1.2.0",
106+
"@jupyterlab/csvviewer-extension": "~1.2.1",
107+
"@jupyterlab/docmanager": "~1.2.0",
108+
"@jupyterlab/docmanager-extension": "~1.2.0",
109+
"@jupyterlab/docregistry": "~1.2.0",
110+
"@jupyterlab/documentsearch": "~1.2.1",
111+
"@jupyterlab/documentsearch-extension": "~1.2.1",
112+
"@jupyterlab/extensionmanager": "~1.2.1",
113+
"@jupyterlab/extensionmanager-extension": "~1.2.1",
114+
"@jupyterlab/filebrowser": "~1.2.0",
115+
"@jupyterlab/filebrowser-extension": "~1.2.0",
116+
"@jupyterlab/fileeditor": "~1.2.0",
117+
"@jupyterlab/fileeditor-extension": "~1.2.1",
118+
"@jupyterlab/help-extension": "~1.2.0",
119+
"@jupyterlab/htmlviewer": "~1.2.0",
120+
"@jupyterlab/htmlviewer-extension": "~1.2.0",
121+
"@jupyterlab/hub-extension": "~1.2.0",
122+
"@jupyterlab/imageviewer": "~1.2.0",
123+
"@jupyterlab/imageviewer-extension": "~1.2.0",
124+
"@jupyterlab/inspector": "~1.2.0",
125+
"@jupyterlab/inspector-extension": "~1.2.1",
126+
"@jupyterlab/javascript-extension": "~1.2.0",
127+
"@jupyterlab/json-extension": "~1.2.0",
128+
"@jupyterlab/launcher": "~1.2.0",
129+
"@jupyterlab/launcher-extension": "~1.2.0",
130+
"@jupyterlab/logconsole": "~1.0.1",
131+
"@jupyterlab/logconsole-extension": "~1.0.2",
132+
"@jupyterlab/mainmenu": "~1.2.0",
133+
"@jupyterlab/mainmenu-extension": "~1.2.0",
134+
"@jupyterlab/markdownviewer": "~1.2.0",
135+
"@jupyterlab/markdownviewer-extension": "~1.2.0",
136+
"@jupyterlab/mathjax2": "~1.2.0",
137+
"@jupyterlab/mathjax2-extension": "~1.2.0",
138+
"@jupyterlab/metapackage": "~1.2.2",
139+
"@jupyterlab/nbconvert-css": "~0.3.2",
140+
"@jupyterlab/notebook": "~1.2.1",
141+
"@jupyterlab/notebook-extension": "~1.2.1",
142+
"@jupyterlab/observables": "~2.4.0",
143+
"@jupyterlab/outputarea": "~1.2.1",
144+
"@jupyterlab/pdf-extension": "~1.2.0",
145+
"@jupyterlab/rendermime": "~1.2.0",
146+
"@jupyterlab/rendermime-extension": "~1.2.0",
147+
"@jupyterlab/rendermime-interfaces": "~1.5.0",
148+
"@jupyterlab/running": "~1.2.0",
149+
"@jupyterlab/running-extension": "~1.2.0",
150+
"@jupyterlab/services": "~4.2.0",
151+
"@jupyterlab/settingeditor": "~1.2.0",
152+
"@jupyterlab/settingeditor-extension": "~1.2.0",
153+
"@jupyterlab/shortcuts-extension": "~1.2.0",
154+
"@jupyterlab/statusbar": "~1.2.0",
155+
"@jupyterlab/statusbar-extension": "~1.2.1",
156+
"@jupyterlab/tabmanager-extension": "~1.2.0",
157+
"@jupyterlab/terminal": "~1.2.0",
158+
"@jupyterlab/terminal-extension": "~1.2.0",
159+
"@jupyterlab/theme-dark-extension": "~1.2.0",
160+
"@jupyterlab/theme-light-extension": "~1.2.0",
161+
"@jupyterlab/tooltip": "~1.2.0",
162+
"@jupyterlab/tooltip-extension": "~1.2.1",
163+
"@jupyterlab/ui-components": "~1.2.0",
164+
"@jupyterlab/ui-components-extension": "~1.2.0",
165+
"@jupyterlab/vdom": "~1.2.0",
166+
"@jupyterlab/vdom-extension": "~1.2.1",
167+
"@jupyterlab/vega4-extension": "~1.2.0",
168+
"@jupyterlab/vega5-extension": "~1.2.0",
169+
"@phosphor/algorithm": "^1.2.0",
170+
"@phosphor/application": "^1.7.0",
171+
"@phosphor/commands": "^1.7.0",
172+
"@phosphor/coreutils": "^1.3.1",
173+
"@phosphor/disposable": "^1.3.0",
174+
"@phosphor/domutils": "^1.1.3",
175+
"@phosphor/dragdrop": "^1.3.0",
176+
"@phosphor/messaging": "^1.3.0",
177+
"@phosphor/properties": "^1.1.3",
178+
"@phosphor/signaling": "^1.3.0",
179+
"@phosphor/virtualdom": "^1.2.0",
180+
"@phosphor/widgets": "^1.9.0",
181+
"react": "~16.8.4",
182+
"react-dom": "~16.8.4",
183+
"jupyterlab-ihaskell": "~0.0.9"
184+
},
185+
"engines": {
186+
"node": ">=6.11.5"
187+
},
188+
"jupyterlab": {
189+
"name": "JupyterLab",
190+
"version": "1.2.2",
191+
"extensions": {
192+
"@jupyterlab/application-extension": "",
193+
"@jupyterlab/apputils-extension": "",
194+
"@jupyterlab/codemirror-extension": "",
195+
"@jupyterlab/completer-extension": "",
196+
"@jupyterlab/console-extension": "",
197+
"@jupyterlab/csvviewer-extension": "",
198+
"@jupyterlab/docmanager-extension": "",
199+
"@jupyterlab/documentsearch-extension": "",
200+
"@jupyterlab/extensionmanager-extension": "",
201+
"@jupyterlab/filebrowser-extension": "",
202+
"@jupyterlab/fileeditor-extension": "",
203+
"@jupyterlab/help-extension": "",
204+
"@jupyterlab/htmlviewer-extension": "",
205+
"@jupyterlab/hub-extension": "",
206+
"@jupyterlab/imageviewer-extension": "",
207+
"@jupyterlab/inspector-extension": "",
208+
"@jupyterlab/launcher-extension": "",
209+
"@jupyterlab/logconsole-extension": "",
210+
"@jupyterlab/mainmenu-extension": "",
211+
"@jupyterlab/markdownviewer-extension": "",
212+
"@jupyterlab/mathjax2-extension": "",
213+
"@jupyterlab/notebook-extension": "",
214+
"@jupyterlab/rendermime-extension": "",
215+
"@jupyterlab/running-extension": "",
216+
"@jupyterlab/settingeditor-extension": "",
217+
"@jupyterlab/shortcuts-extension": "",
218+
"@jupyterlab/statusbar-extension": "",
219+
"@jupyterlab/tabmanager-extension": "",
220+
"@jupyterlab/terminal-extension": "",
221+
"@jupyterlab/theme-dark-extension": "",
222+
"@jupyterlab/theme-light-extension": "",
223+
"@jupyterlab/tooltip-extension": "",
224+
"@jupyterlab/ui-components-extension": "",
225+
"@jupyterlab/vdom-extension": "",
226+
"jupyterlab-ihaskell": ""
227+
},
228+
"mimeExtensions": {
229+
"@jupyterlab/javascript-extension": "",
230+
"@jupyterlab/json-extension": "",
231+
"@jupyterlab/pdf-extension": "",
232+
"@jupyterlab/vega4-extension": "",
233+
"@jupyterlab/vega5-extension": ""
234+
},
235+
"buildDir": "./build",
236+
"outputDir": "..",
237+
"singletonPackages": [
238+
"@jupyterlab/application",
239+
"@jupyterlab/apputils",
240+
"@jupyterlab/console",
241+
"@jupyterlab/coreutils",
242+
"@jupyterlab/docmanager",
243+
"@jupyterlab/extensionmanager",
244+
"@jupyterlab/filebrowser",
245+
"@jupyterlab/fileeditor",
246+
"@jupyterlab/imageviewer",
247+
"@jupyterlab/launcher",
248+
"@jupyterlab/notebook",
249+
"@jupyterlab/rendermime",
250+
"@jupyterlab/rendermime-interfaces",
251+
"@jupyterlab/services",
252+
"@jupyterlab/terminal",
253+
"@jupyterlab/tooltip",
254+
"@phosphor/algorithm",
255+
"@phosphor/application",
256+
"@phosphor/commands",
257+
"@phosphor/coreutils",
258+
"@phosphor/disposable",
259+
"@phosphor/domutils",
260+
"@phosphor/dragdrop",
261+
"@phosphor/messaging",
262+
"@phosphor/properties",
263+
"@phosphor/signaling",
264+
"@phosphor/virtualdom",
265+
"@phosphor/widgets",
266+
"react",
267+
"react-dom",
268+
"jupyterlab-ihaskell"
269+
],
270+
"linkedPackages": {},
271+
"staticDir": "../static"
272+
}
273+
}

example/Haskell/local-package/shell.nix

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
let
22
jupyterLibPath = ../../..;
3-
nixpkgsPath = jupyterLibPath + "/nix";
4-
pkgs = import nixpkgsPath {};
5-
jupyter = import jupyterLibPath { pkgs=pkgs; };
3+
jupyter = import jupyterLibPath {};
64

75
ihaskellWithPackages = jupyter.kernels.iHaskellWith {
86
name = "Local";
@@ -14,10 +12,10 @@ let
1412
jupyterlabWithKernels =
1513
jupyter.jupyterlabWith {
1614
kernels = [ ihaskellWithPackages ];
17-
directory = jupyter.mkDirectoryWith {
18-
extensions = [
19-
"jupyterlab-ihaskell"
20-
];
15+
directory = jupyter.mkDirectoryFromLockFile {
16+
yarnlock = ./yarn.lock;
17+
packagejson = ./package.json;
18+
sha256 = "1ak8i3kydn4l3vk24lp19j185s2gi0gck26k77v2rkj9ql6j9wci";
2119
};
2220
};
2321
in

0 commit comments

Comments
 (0)