diff --git a/flake.nix b/flake.nix index ac46e09..21a1aff 100644 --- a/flake.nix +++ b/flake.nix @@ -28,21 +28,27 @@ stdenv = final.gcc13Stdenv; }; }; + + chicken = final: prev: { + chicken = final.callPackage ./nix/chicken.nix { + stdenv = final.gcc13Stdenv; + }; + }; }; devShells = eachSystem (system: { default = let pkgs = import nixpkgs { - overlays = [ self.overlays.tcc-mob ]; + overlays = [ self.overlays.tcc-mob self.overlays.chicken ]; }; in pkgs.mkShell { - packages = with pkgs; [ tcc-mob pkg-config ]; + packages = with pkgs; [ tcc-mob chicken pkg-config ] + ++ (with pkgs.chickenPackages_5.chickenEggs; [ + lsp-server + transducers + ]); shellHook = '' - mkdir -p .chicken; cd .chicken - curl https://code.call-cc.org/releases/5.4.0/chicken-5.4.0.tar.gz | tar xzf - - cd .. - make -C .chicken/chicken-5.4.0 -j16 PREFIX=$(pwd)/.chicken C_COMPILER=${pkgs.tcc-mob}/bin/tcc - export CHICKEN_INSTALL_PREFIX="$(pwd)/.chicken" + export CC=${pkgs.tcc-mob}/bin/tcc export CHICKEN_INSTALL_REPOSITORY="$(pwd)/.chicken/eggs" export CHICKEN_REPOSITORY_PATH="${pkgs.chicken}/lib/chicken/11:$CHICKEN_REPOSITORY_PATH:$(pwd)/.chicken/eggs" export PATH="$PATH:$CHICKEN_INSTALL_PREFIX/bin"