diff options
author | Radu <radu@pml4t.net> | 2023-11-24 16:52:57 -0500 |
---|---|---|
committer | Radu <radu@pml4t.net> | 2023-11-24 22:17:59 -0500 |
commit | 290f849c64c9f198f09b592daa48ecdae957375f (patch) | |
tree | fab417d5837cde3cd9b4db54dd61d59ca098a69d /flake.nix | |
parent | ef17d1d29212f5dc0218bfca1c30709e5a35f7b2 (diff) |
Support GFM using `remarked` and fix some bugs
- This avoids edge cases in the primitive parser I wrote.
- Add KaTeX stylesheet (cause of rendering issues, not Pronto).
- Bundle with Webpack.
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -11,15 +11,22 @@ manifest = builtins.fromJSON (builtins.readFile ./manifest.json); pkgs = import nixpkgs { localSystem = { inherit system; }; }; in { - packages.default = pkgs.stdenvNoCC.mkDerivation { + packages.default = pkgs.buildNpmPackage rec { inherit (manifest) version; pname = "asap"; src = ./.; nativeBuildInputs = [ pkgs.zip ]; - buildPhase = '' + npmDepsHash = "sha256-gPFeEXDwAqIamXoAK6/Y6fmDHyIHXucdYHj6YoItDK4="; + npmBuildScript = "build:prod"; + installPhase = '' + runHook preInstall + mkdir $out - zip --recurse-paths $out/asap.zip \ - manifest.json page.js styles.css hljs/ katex/ STIXTwoMath-Regular.otf + cd dist/ + cp main.licenses.txt $out/licenses.txt + zip --recurse-paths $out/asap.zip ./ + + runHook postInstall ''; }; }); |