2024-09-16 10:16:45 +00:00
|
|
|
{
|
|
|
|
description = "A flake to use a development version of Chicken.";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
systems.url = "github:nix-systems/default";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
systems,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
eachSystem = lib.genAttrs (import systems);
|
|
|
|
pkgsFor = eachSystem (system:
|
|
|
|
import nixpkgs {
|
|
|
|
localSystem.system = system;
|
|
|
|
overlays = with self.overlays; [chicken tcc-mob];
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
overlays = {
|
|
|
|
default = self.overlays.chicken;
|
|
|
|
|
|
|
|
tcc-mob = final: prev: {
|
|
|
|
tcc-mob = final.callPackage ./nix/tinycc.nix {
|
|
|
|
stdenv = final.gcc13Stdenv;
|
|
|
|
};
|
|
|
|
};
|
2024-09-16 21:14:33 +00:00
|
|
|
|
|
|
|
chicken = final: prev: {
|
|
|
|
chicken = final.callPackage ./nix/chicken.nix {
|
|
|
|
stdenv = final.gcc13Stdenv;
|
|
|
|
};
|
|
|
|
};
|
2024-09-16 10:16:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
devShells = eachSystem (system: {
|
|
|
|
default = let
|
|
|
|
pkgs = import nixpkgs {
|
2024-09-16 21:14:33 +00:00
|
|
|
overlays = [ self.overlays.tcc-mob self.overlays.chicken ];
|
2024-09-16 10:16:45 +00:00
|
|
|
};
|
|
|
|
in pkgs.mkShell {
|
2024-09-16 21:14:33 +00:00
|
|
|
packages = with pkgs; [ tcc-mob chicken pkg-config ]
|
|
|
|
++ (with pkgs.chickenPackages_5.chickenEggs; [
|
|
|
|
lsp-server
|
|
|
|
transducers
|
|
|
|
]);
|
2024-09-16 10:16:45 +00:00
|
|
|
shellHook = ''
|
2024-09-16 21:14:33 +00:00
|
|
|
export CC=${pkgs.tcc-mob}/bin/tcc
|
2024-09-16 10:16:45 +00:00
|
|
|
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"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|