thoughts/flake.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2024-08-05 16:15:16 +00:00
{
description = "cl-yag static site generator";
inputs = {
cl-nix-lite.url = "github:hraban/cl-nix-lite";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self, nixpkgs, cl-nix-lite, flake-utils
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system}.extend cl-nix-lite.overlays.default;
in
{
2024-08-05 16:39:33 +00:00
defaultPackage.x86_64-linux =
# Notice the reference to nixpkgs here.
with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation {
name = "hello";
src = self;
buildPhase = "gcc -o hello ./hello.c";
installPhase = "mkdir -p $out/bin; install -t $out/bin hello";
};
};
2024-08-05 16:15:16 +00:00
devShell = pkgs.mkShell {
buildInputs = [
pkgs.ecl
pkgs.git
pkgs.gnumake
pkgs.asdf
pkgs.multimarkdown
];
shellHook = ''
echo "Welcome to the development shell for cl-yag static site generator!"
2024-08-05 16:39:33 +00:00
ecl --load generator.lisp
2024-08-05 16:15:16 +00:00
'';
};
});
}