Refactor packages
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
49
packages/obsidian/plugins/excalidraw/default.nix
Normal file
49
packages/obsidian/plugins/excalidraw/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-excalidraw --subpackage mathjaxToSVG
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.excalidraw";
|
||||
version = "2.8.3";
|
||||
|
||||
pkg = pkgs.fetchFromGitHub {
|
||||
owner = "zsviczian";
|
||||
repo = "obsidian-excalidraw-plugin";
|
||||
rev = version;
|
||||
hash = "sha256-vfswTT+FzzcddUQSoy6xseE+PzsWtRx8RkYzqGn6wFQ=";
|
||||
};
|
||||
|
||||
mathjaxToSVG = pkgs.buildNpmPackage {
|
||||
pname = "obsidian.plugins.excalidraw.mathjaxToSVG";
|
||||
version = "1.0.0";
|
||||
|
||||
src = "${pkg}/MathjaxToSVG";
|
||||
npmDepsHash = "sha256-AosKWlX08dpXNQ2YlrfR6jEInmU02Ztf26nmV19Jxok=";
|
||||
|
||||
configurePhase = ''
|
||||
mkdir dist
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ./dist/index.js $out/index.js
|
||||
'';
|
||||
};
|
||||
|
||||
src = pkg;
|
||||
patches = [ ./package-lock.patch ];
|
||||
|
||||
npmDepsHash = "sha256-6Y22TD6BMljRGrL/qT54F7bFXcQbY1bQ5GuKEqAXIwY=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir dist
|
||||
mkdir -p ./MathjaxToSVG/dist
|
||||
cp ${mathjaxToSVG}/index.js ./MathjaxToSVG/dist/index.js
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ./dist/manifest.json $out/manifest.json
|
||||
cp ./dist/main.js $out/main.js
|
||||
cp ./dist/styles.css $out/styles.css
|
||||
'';
|
||||
}
|
7984
packages/obsidian/plugins/excalidraw/package-lock.patch
Normal file
7984
packages/obsidian/plugins/excalidraw/package-lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user