50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{
|
|
description = "A flake to use a development version of Chicken.";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
systems.url = "github:nix-systems/default-linux";
|
|
};
|
|
|
|
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];
|
|
});
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
|
(builtins.substring 0 4 longDate)
|
|
(builtins.substring 4 2 longDate)
|
|
(builtins.substring 6 2 longDate)
|
|
]);
|
|
version = "6.0.0";
|
|
in {
|
|
overlays = {
|
|
default = self.overlays.chicken;
|
|
|
|
chicken = final: prev: {
|
|
chicken = final.callPackage ./nix/default.nix {
|
|
stdenv = final.gcc13Stdenv;
|
|
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
|
};
|
|
};
|
|
};
|
|
|
|
devShells = eachSystem (system: {
|
|
default = let
|
|
pkgs = import nixpkgs {
|
|
overlays = [ self.overlays.chicken ];
|
|
};
|
|
in pkgs.mkShell {
|
|
packages = [ pkgs.chicken ];
|
|
};
|
|
});
|
|
};
|
|
}
|