diff options
| author | marius <mail@marius.pm> | 2025-09-01 17:27:16 +0200 |
|---|---|---|
| committer | marius <mail@marius.pm> | 2025-09-01 17:27:16 +0200 |
| commit | 0147e08d3d8bb364207666225d758d097b8ed915 (patch) | |
| tree | c8ffe7ef1a32cb76397f15267a62bb694a84f2c5 /flake.nix | |
| download | website-0147e08d3d8bb364207666225d758d097b8ed915.tar.gz website-0147e08d3d8bb364207666225d758d097b8ed915.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | flake.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..09e48c6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,49 @@ +{ + description = "Hauntingly cool website"; + + inputs.nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; + + outputs = + { nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in + { + packages.${system}.default = pkgs.stdenv.mkDerivation { + pname = "website"; + version = "0.1.0"; + + src = ./.; + + nativeBuildInputs = [ + pkgs.guile + pkgs.haunt + ]; + + buildPhase = '' + haunt build + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -r site/* $out/ + + runHook postInstall + ''; + }; + + devShells.${system}.default = pkgs.mkShell { + buildInputs = [ + pkgs.guile + pkgs.haunt + pkgs.guile-commonmark + ]; + shellHook = '' + echo "Entered Haunt dev shell. Run: haunt build/serve" + ''; + }; + }; +} |