nix: create initial flake
This commit is contained in:
parent
c21cb47a54
commit
057fe88a21
3 changed files with 142 additions and 0 deletions
48
flake.nix
Normal file
48
flake.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue