70 exercises in 20 chapters, from first s-expressions to restarts, macros, CLOS, and a tiny Lisp interpreter. Each exercise ships broken with a solved twin and a hint. Includes a watch-mode runner, a plain-CL check harness, a nix flake, and verification tooling. All plain SBCL, no dependencies.
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
description = "Lisplings: small exercises to get you used to reading and writing Common Lisp code";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
forAllSystems = f:
|
|
nixpkgs.lib.genAttrs systems
|
|
(system: f system nixpkgs.legacyPackages.${system});
|
|
|
|
# Copy the project without the rustlings reference checkout or
|
|
# any local progress state.
|
|
projectSource = nixpkgs.lib.cleanSourceWith {
|
|
src = ./.;
|
|
filter = path: type:
|
|
!builtins.elem (nixpkgs.lib.baseNameOf path)
|
|
[ "rustlings"
|
|
".lisplings-state.sexp"
|
|
".lisplings-orig"
|
|
];
|
|
};
|
|
in
|
|
{
|
|
devShells = forAllSystems (_system: pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = [ pkgs.sbcl ];
|
|
};
|
|
});
|
|
|
|
packages = forAllSystems (_system: pkgs: {
|
|
default = pkgs.callPackage ./nix/package.nix {
|
|
src = projectSource;
|
|
};
|
|
});
|
|
|
|
apps = forAllSystems (system: _pkgs: {
|
|
default = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.default}/bin/lisplings";
|
|
};
|
|
});
|
|
};
|
|
}
|