From f58fadf388baf74279a728619188aa69a4ef0686 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 6 Apr 2020 16:51:17 -0700 Subject: [PATCH] Add prototype nix builder for website --- blog/builder.sh | 3 +++ blog/default.nix | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 blog/builder.sh create mode 100644 blog/default.nix diff --git a/blog/builder.sh b/blog/builder.sh new file mode 100644 index 0000000..ed97ec5 --- /dev/null +++ b/blog/builder.sh @@ -0,0 +1,3 @@ +source $stdenv/setup +cp -r $src/* . +hugo --baseUrl="https://danilafe.com" --destination=$out diff --git a/blog/default.nix b/blog/default.nix new file mode 100644 index 0000000..4279979 --- /dev/null +++ b/blog/default.nix @@ -0,0 +1,16 @@ +{ stdenv, hugo, fetchgit }: + +let + url = "https://dev.danilafe.com/Web-Projects/blog-static.git"; + rev = "b04d82f0b3d949c1d4cd64246cc9c9558241f9ed"; + sha256 = "02w05ff3mb8x3x65822vzg8lil0q6w4rfkj098fa0lwv8wv6x4cy"; +in + stdenv.mkDerivation { + name = "blog-static"; + version = rev; + src = fetchgit { + inherit url rev sha256; + }; + builder = ./builder.sh; + buildInputs = [ hugo ]; + }