pkgs/jupyterlab-vim: init

This commit is contained in:
Infinidoge 2024-10-23 01:43:13 -04:00
parent 3bdc48c7d6
commit 3619f6e8d1
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E
3 changed files with 5035 additions and 0 deletions

View file

@ -12,4 +12,5 @@
bytecode-viewer = pkgs.callPackage ./bytecode-viewer.nix { }; bytecode-viewer = pkgs.callPackage ./bytecode-viewer.nix { };
unmap = pkgs.callPackage ./unmap { }; unmap = pkgs.callPackage ./unmap { };
tmx-cups-ppd = pkgs.callPackage ./tmx-cups-ppd.nix { }; tmx-cups-ppd = pkgs.callPackage ./tmx-cups-ppd.nix { };
jupyterlab-vim = pkgs.python3Packages.callPackage ./jupyterlab-vim { };
} }

View file

@ -0,0 +1,81 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, yarnConfigHook
, fetchYarnDeps
, jupyterlab
, jupyter
, jupyter-packaging
, hatchling
, hatch-jupyter-builder
, hatch-nodejs-version
, nodejs
}:
buildPythonPackage rec {
pname = "jupyterlab-vim";
version = "4.1.4";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyterlab-contrib";
repo = "jupyterlab-vim";
rev = "v${version}";
hash = "sha256-VIT60kiBSYfGQ23aiFjpcAdDdpLseOvFPL64dQplkr8=";
};
prePatch = ''
cp ${./yarn.lock} yarn.lock
'';
yarnOfflineCache = fetchYarnDeps {
yarnLock = ./yarn.lock;
hash = "sha256-z82r763EG+QGu2KbZ2PaKueAs9wrpTYul/O/O7It7lY=";
};
nativeBuildInputs = [
yarnConfigHook
nodejs
];
build-system = [
hatchling
hatch-jupyter-builder
hatch-nodejs-version
jupyterlab
jupyter
jupyter-packaging
];
dependencies = [
jupyterlab
jupyter
jupyter-packaging
];
preConfigure = ''
substituteInPlace package.json \
--replace-fail 'jlpm' 'yarn'
'';
preBuild = ''
# Generate the jupyterlab extension files
yarn --offline run build:prod
'';
# has no tests
doCheck = false;
pythonImportsCheck = [ "jupyterlab_vim" ];
meta = with lib; {
description = "Vim notebook cell bindings for JupterLab";
homepage = "https://github.com/jupyterlab-contrib/jupterlab-vim";
license = licenses.mit;
maintainers = [ ];
};
}

File diff suppressed because it is too large Load diff