Initial commit: draft (maybe not working) flake.nix
This commit is contained in:
27
default.nix
Normal file
27
default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ mkYarnModules, bergamot-elm }:
|
||||
|
||||
let
|
||||
# Generate a Nix expression from the yarn.lock file
|
||||
yarnModules = pkgs.mkYarnModules {
|
||||
src = ./.;
|
||||
packageJson = ./package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
};
|
||||
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "web-files";
|
||||
|
||||
# Use the generated yarnModules
|
||||
buildInputs = [ yarnModules bergamot-elm ];
|
||||
|
||||
buildPhase = ''
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out $out/katex $out/katex-expression $out/bergamot
|
||||
cp ${yarnModules}/node_modules/katex/dist/katex.min.css $out/katex
|
||||
cp ${yarnModules}/node_modules/@navsnpm/katex-expression/dist/katex-expression/katex-expression.esm.js $out/katex-expression
|
||||
cp ${bergamot-elm}/Main.min.js $out/bergamot/bergamot.js
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user