pkgs/jupyterlab-myst: init
This commit is contained in:
parent
0f96644673
commit
43b393399e
4 changed files with 10029 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
ears-cli = pkgs.callPackage ./ears-cli.nix { };
|
||||
fw-ectool = pkgs.callPackage ./fw-ectool.nix { };
|
||||
hexagon = pkgs.callPackage ./hexagon.nix { };
|
||||
jupyterlab-myst = pkgs.python3Packages.callPackage ./jupyterlab-myst { };
|
||||
jupyterlab-vim = pkgs.python3Packages.callPackage ./jupyterlab-vim { };
|
||||
mcaselector = pkgs.callPackage ./mcaselector.nix { };
|
||||
nix-modrinth-prefetch = pkgs.callPackage ./nix-modrinth-prefetch.nix { };
|
||||
|
|
22
pkgs/jupyterlab-myst/add-tailwind-base-directive.patch
Normal file
22
pkgs/jupyterlab-myst/add-tailwind-base-directive.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From 161242f714b4dfb971bbc95163e2873042057a9b Mon Sep 17 00:00:00 2001
|
||||
From: Infinidoge <infinidoge@inx.moe>
|
||||
Date: Wed, 23 Oct 2024 02:14:29 -0400
|
||||
Subject: [PATCH] add @tailwind base directive
|
||||
|
||||
---
|
||||
style/jupyterlab-typography.css | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/style/jupyterlab-typography.css b/style/jupyterlab-typography.css
|
||||
index 63eb5c6..f4c884a 100644
|
||||
--- a/style/jupyterlab-typography.css
|
||||
+++ b/style/jupyterlab-typography.css
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* @tailwind base; */
|
||||
+@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
--
|
||||
2.46.1
|
||||
|
89
pkgs/jupyterlab-myst/default.nix
Normal file
89
pkgs/jupyterlab-myst/default.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, yarnConfigHook
|
||||
, fetchYarnDeps
|
||||
|
||||
, jupyterlab
|
||||
, jupyter
|
||||
, jupyter-packaging
|
||||
, hatchling
|
||||
, hatch-jupyter-builder
|
||||
, hatch-nodejs-version
|
||||
, nodejs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyterlab-myst";
|
||||
version = "0-unstable-2024-07-30";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jupyter-book";
|
||||
repo = "jupyterlab-myst";
|
||||
rev = "4c70b0312aee6f2f65c18d1aeec80521c1fa5bc3";
|
||||
hash = "sha256-Q7sQ2Al4/HCogGayYifBLX/yElDWS4wcTJVe4nFOQY8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./add-tailwind-base-directive.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
cp ${./yarn.lock} yarn.lock
|
||||
substituteInPlace package.json \
|
||||
--replace-fail '"@myst-theme/frontmatter": "^0.9.0"' '"@myst-theme/frontmatter": "^0.13.2"'
|
||||
'';
|
||||
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = ./yarn.lock;
|
||||
hash = "sha256-ou3Tjml5VU1O14k/oIDufj3QV2sQYD8EzVGAPhF9RZI=";
|
||||
};
|
||||
|
||||
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 = ''
|
||||
substituteInPlace node_modules/@types/markdown-it/lib/index.d.ts \
|
||||
--replace 'readonly linkify: LinkifyIt.LinkifyIt;' 'readonly linkify: typeof LinkifyIt;'
|
||||
|
||||
# Generate the jupyterlab extension files
|
||||
yarn --offline run build:prod
|
||||
'';
|
||||
|
||||
# has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "jupyterlab_myst" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Use MyST Markdown directly in Jupyter Lab";
|
||||
homepage = "https://github.com/jupyter-book/jupyterlab-myst";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
9917
pkgs/jupyterlab-myst/yarn.lock
Normal file
9917
pkgs/jupyterlab-myst/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue