Make the package work, building Elm and NodeJS dependencies.
This commit is contained in:
39
default.nix
39
default.nix
@@ -1,27 +1,26 @@
|
||||
{ mkYarnModules, bergamot-elm }:
|
||||
{ stdenv, mkYarnModules, bergamot-elm }:
|
||||
|
||||
let
|
||||
# Generate a Nix expression from the yarn.lock file
|
||||
yarnModules = pkgs.mkYarnModules {
|
||||
src = ./.;
|
||||
packageJson = ./package.json;
|
||||
yarnModules = mkYarnModules {
|
||||
version = "1.0.0";
|
||||
pname = "web-files";
|
||||
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
|
||||
'';
|
||||
}
|
||||
stdenv.mkDerivation {
|
||||
name = "web-files";
|
||||
src = ./.;
|
||||
|
||||
# Use the generated yarnModules
|
||||
buildInputs = [ yarnModules bergamot-elm ];
|
||||
|
||||
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