54 lines
1.1 KiB
Nix
54 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;
|
|
|
|
sourceFilter =
|
|
path: type:
|
|
builtins.any (suffix: lib.hasSuffix suffix path) [
|
|
".pest"
|
|
]
|
|
|| (craneLib.filterCargoSources path type);
|
|
|
|
lilac-crate = craneLib.buildPackage ({
|
|
pname = "lilac";
|
|
src = lib.cleanSourceWith {
|
|
src = ./.;
|
|
filter = sourceFilter;
|
|
name = "source";
|
|
};
|
|
});
|
|
in
|
|
{
|
|
checks = {
|
|
inherit lilac-crate;
|
|
};
|
|
|
|
packages.lilac = lilac-crate;
|
|
};
|
|
};
|
|
}
|