48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
description = "Lila language";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
crane.url = "github:ipetkov/crane";
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ flake-parts, crane, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
imports = [
|
|
./devShells/flake-module.nix
|
|
];
|
|
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
|
|
perSystem =
|
|
{ pkgs, lib, ... }:
|
|
let
|
|
craneLib = crane.mkLib pkgs;
|
|
|
|
pestFilter = path: _type: (builtins.match ".*\.pest$" path) != null;
|
|
sourceFilter = path: type: (craneLib.filterCargoSources path type) || (pestFilter path type);
|
|
|
|
lilac-crate = craneLib.buildPackage ({
|
|
src = lib.cleanSourceWith {
|
|
src = ./.;
|
|
filter = sourceFilter;
|
|
name = "source";
|
|
};
|
|
});
|
|
in
|
|
{
|
|
checks = {
|
|
inherit lilac-crate;
|
|
};
|
|
|
|
packages.lilac = lilac-crate;
|
|
};
|
|
};
|
|
}
|