{ description = "A flake to use Chicken 6 with TinyCC."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = inputs @ { self, nixpkgs, systems, ... }: let inherit (nixpkgs) lib; forAllSystems = lib.genAttrs [ "aarch64-linux" "i686-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; pkgsFor = forAllSystems (system: import nixpkgs { localSystem.system = system; overlays = with self.overlays; [chicken]; }); mkDate = longDate: (lib.concatStringsSep "-" [ (builtins.substring 0 4 longDate) (builtins.substring 4 2 longDate) (builtins.substring 6 2 longDate) ]); version = "5.4.0"; in { overlays = { default = self.overlays.sdl3; sdl3 = final: prev: { sdl3 = final.callPackage ./nix/sdl3.nix { stdenv = final.gcc13Stdenv; version = "2.99.0+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); }; }; }; devShells = forAllSystems (system: { default = let pkgs = import nixpkgs { overlays = [ self.overlays.sdl3 ]; }; in pkgs.mkShell { packages = with pkgs; [ pkg-config rlwrap sdl3 chicken chickenPackages_5.chickenEggs.apropos ] ++ (with pkgs.chickenPackages_5.chickenEggs; [ apropos chicken-doc srfi-1 srfi-18 lsp-server r7rs srfi-152 ]); }; }); }; }