Skip to content

Commit

Permalink
pythonPackages.jupyterlab: fix yarn.lock permissions for labextension
Browse files Browse the repository at this point in the history
This commit adds a patch which fixes the following issue that affects mainly nix
users only:

jupyterlab/jupyterlab#7525
  • Loading branch information
jluttine committed Apr 8, 2021
1 parent 3d1a771 commit 3709b8f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/jupyterlab/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ buildPythonPackage rec {
sha256 = "929c60d7fb4aa704084c02d8ededc209b8b378e0b3adab46158b7fa6acc24230";
};

patches = [
# Fix https://github.com/jupyterlab/jupyterlab/issues/7525
./yarn-lock-permissions.patch
];

propagatedBuildInputs = [ jupyterlab_server notebook jupyter-packaging nbclassic ];

makeWrapperArgs = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/jupyterlab/commands.py b/jupyterlab/commands.py
index 154ceb307..d14485ea1 100644
--- a/jupyterlab/commands.py
+++ b/jupyterlab/commands.py
@@ -1248,6 +1248,8 @@ class _AppHandler(object):
f.write(template)
elif not osp.exists(lock_path):
shutil.copy(lock_template, lock_path)
+ import stat
+ os.chmod(lock_path, stat.S_IWRITE | stat.S_IREAD)

def _get_package_template(self, silent=False):
"""Get the template the for staging package.json file.

0 comments on commit 3709b8f

Please sign in to comment.