From 5a554023fa750559933c37909406afe54d771087d53fbb5cb32020e6d2d2c280 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Mon, 16 Sep 2024 23:14:33 +0200 Subject: [PATCH] Variable update --- flake.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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"