From e87dbf00de5c638120e2b7bcb15b0ba8b06a2b2e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 15 Jul 2018 21:11:57 -0300 Subject: Add initial Hakyll website skeleton --- site/pastebin/nix-exps.html | 282 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 site/pastebin/nix-exps.html (limited to 'site/pastebin/nix-exps.html') diff --git a/site/pastebin/nix-exps.html b/site/pastebin/nix-exps.html new file mode 100644 index 0000000..f03279a --- /dev/null +++ b/site/pastebin/nix-exps.html @@ -0,0 +1,282 @@ + + + + + + + +Nix Stuff + + + + + + + +
+

Nix Stuff

+
+
 1: let
+ 2:   pkgsOriginal = import <nixpkgs> {};
+ 3:   pkgsSrc = pkgsOriginal.fetchzip {
+ 4:     url = "https://github.com/NixOS/nixpkgs/archive/18.03.zip";
+ 5:     sha256 = "0hk4y2vkgm1qadpsm4b0q1vxq889jhxzjx3ragybrlwwg54mzp4f";
+ 6:   };
+ 7:   pkgs = import (pkgsSrc) {};
+ 8:   stdenv = pkgs.stdenv;
+ 9: 
+10:   # Taken from:
+11:   # http://www.cs.yale.edu/homes/lucas.paul/posts/2017-04-10-hakyll-on-nix.html
+12:   websiteBuilder = pkgs.stdenv.mkDerivation {
+13:     name = "website-builder";
+14:     src = ./hakyll;
+15:     phases = "unpackPhase buildPhase";
+16:     buildInputs = [
+17:       (pkgs.haskellPackages.ghcWithPackages (p: with p; [ hakyll ]))
+18:     ];
+19:     buildPhase = ''
+20:       mkdir -p $out/bin
+21:       ghc -O2 -dynamic --make Main.hs -o $out/bin/generate-site
+22:     '';
+23:   };
+24: in rec {
+25:   euandrehWebsite = stdenv.mkDerivation rec {
+26:     name = "euandreh-website";
+27:     src = ./site;
+28:     phases = "unpackPhase buildPhase";
+29:     # version = "0.1";
+30:     buildInputs = [ websiteBuilder ];
+31:     buildPhase = ''
+32:       export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive";
+33:       export LANG=en_US.UTF-8
+34:       generate-site build
+35: 
+36:       mkdir $out
+37:       cp -r _site/* $out
+38:     '';
+39:   };
+40: }
+
+
+
+
+

2018-07-15 Sun 19:48

+
+ + -- cgit v1.2.3