{ 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"; }; }); }; }