mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
* Fixed a bug for build via nix, when c3c-checks and c3c-debug didn't have a git hash * Got rid of python3 requirement for checks in nix as it's no longer needed * Now c3c properly displays it's build date in nix build * Add more platforms for checks in nix build * Add installation and compilation on Nix to README
43 lines
964 B
Nix
43 lines
964 B
Nix
{
|
|
description = "C3 compiler flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, ... }@inputs: inputs.flake-utils.lib.eachDefaultSystem
|
|
(system:
|
|
let pkgs = import inputs.nixpkgs { inherit system; };
|
|
c3cBuild = set: pkgs.callPackage ./nix/default.nix (set // {
|
|
rev = self.rev or "unknown";
|
|
});
|
|
in {
|
|
packages = {
|
|
default = self.packages.${system}.c3c;
|
|
|
|
c3c = c3cBuild {};
|
|
|
|
c3c-checks = c3cBuild {
|
|
checks = true;
|
|
};
|
|
|
|
c3c-debug = c3cBuild {
|
|
debug = true;
|
|
};
|
|
|
|
c3c-debug-checks = c3cBuild {
|
|
debug = true;
|
|
checks = true;
|
|
};
|
|
};
|
|
|
|
devShells = {
|
|
default = pkgs.callPackage ./nix/shell.nix {
|
|
c3c = self.packages.${system}.c3c-debug;
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|