-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
37 lines (32 loc) · 1.16 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "michzappa's web site, written and published with emacs.";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOs/nixpkgs/nixpkgs-unstable";
};
outputs = { self, ... }@inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (system:
let pkgs = (import nixpkgs { inherit system; });
in rec {
publisherEmacs = (pkgs.emacsWithPackages (epkgs:
(with epkgs; [ htmlize lox-mode nix-mode racket-mode tuareg ])));
devShell =
pkgs.mkShell { buildInputs = with pkgs; [ publisherEmacs ]; };
packages.site = pkgs.stdenv.mkDerivation {
name = "michzappa-dot-com";
src = self;
buildInputs = [ publisherEmacs ];
buildPhase = ''
# Tangle the literate program file.
emacs ./org/publishing_this_site_with_emacs.org --batch --funcall org-babel-tangle
# Publish.
emacs --batch --load publish.el --funcall mz/publish-site
'';
installPhase = ''
cp -r public $out
'';
};
defaultPackage = self.packages.${system}.site;
});
}