-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
39 lines (36 loc) · 1.2 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
38
39
{
description = "sf.io site builder flake";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/22.11"; };
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
buildScript = pkgs.writeScriptBin "build-site.sh" ''
#!/bin/sh
pushd src
./blog-htmx.sh
./blog-practical-haskell-use-cases.sh
./blog-introducing-effects.sh
./blog-introducing-functional-programming-to-pythonistas.sh
./blog-sf-resources-in-reason.sh
./blog-nix-shell.sh
./blog-nix-shell-flakes.sh
./blog-operator-monocle.sh
./blog-operator-monocle-olm.sh
./blog-logreduce-web-interface-wasm.sh
popd
pushd website
pelican content -o output
popd
'';
in {
devShells.x86_64-linux.default = pkgs.mkShell {
name = "Website toolings shell";
buildInputs = [ pkgs.pandoc pkgs.python39Packages.pelican buildScript ];
shellHook = ''
echo "Welcome in the nix shell for $name"
echo "Run the build-site.sh command to build the website in website/output"
echo "Then run: firefox website/output/index.html"
'';
};
};
}