Extract build script

This commit is contained in:
Tim Schubert 2020-12-31 03:04:27 +01:00
parent c77ffc0488
commit 643916762e
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
2 changed files with 6 additions and 3 deletions

3
build.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
find . -iname "*.md" -type f -exec sh -c 'pandoc -s -f commonmark -t html --template src/template.html -o "''${0%.md}.html" "''${0}"' {} \;

View file

@ -1,13 +1,13 @@
{ stdenv, pandoc }:
stdenv.mkDerivation rec {
src = ./src;
src = ./.;
nativeBuildInputs = [ pandoc ];
buildPhase = ''
find . -iname "*.md" -type f -exec sh -c 'pandoc -s -f commonmark -t html --template template.html -o "''${0%.md}.html" "''${0}"' {} \;
./build.sh
'';
installPhase = ''
mkdir -p $out
cp -r . $out/
cp -r src/* $out/
'';
name = "dadada.li";
version = "0.1";