pub.solar/shell.nix

23 lines
725 B
Nix

with (import (fetchTarball https://github.com/nixos/nixpkgs/archive/nixpkgs-unstable.tar.gz) {});
let
google-font-downloader = writeShellScriptBin "google-font-downloader" ''
echo "Attempting to fetch $1"
${nodejs}/bin/npx google-font-downloader -- $1
rm ./_includes/styles/typography.css
echo "/* To regenerate this file, run $ google-font-downloader '$1' */" >> ./_includes/styles/typography.css
echo "" >> ./_includes/styles/typography.css
cat ./google-fonts-*.css >> ./_includes/styles/typography.css
rm ./google-fonts-*.css
'';
in
mkShell {
buildInputs = [
deno
google-font-downloader
];
shellHook = ''
deno run -A https://deno.land/x/lume@v1.12.0/install.ts
'';
}