e4ddc3ba75
Thanks to the Nix anti-patterns documented here... https://nix.dev/anti-patterns/language.html#reproducability-referencing-top-level-directory-with ...I'm cleaning up some of my Nix expressions. Read the article for more context.
16 lines
524 B
Nix
16 lines
524 B
Nix
{ pkgs, ... }:
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "covid-uk";
|
|
buildInputs = [];
|
|
src = builtins.path { path = ./.; name = "covid-uk"; };
|
|
# TODO(wpcarro): Need to run `yarn install` somehow.
|
|
# TODO(wpcarro): Need to run `npx tailwindcss build styles.css -o output.css`.
|
|
buildPhase = ''
|
|
mkdir -p $out
|
|
mkdir -p $out/node_modules/chart.js/dist
|
|
cp $src/node_modules/chart.js/dist/Chart.bundle.min.js $out/node_modules/chart.js/dist
|
|
cp $src/index.html $src/output.css $out
|
|
'';
|
|
dontInstall = true;
|
|
}
|