bile 0.1.0

A simple build system, structured around Lua scripts.
{
  system ? builtins.currentSystem,
  rust-overlay ? fetchGit {
    url = "https://github.com/oxalica/rust-overlay";
    shallow = true;
  },
  naersk ? fetchGit {
    url = "https://github.com/nix-community/naersk";
    shallow = true;
  },
  nixpkgs ? <nixpkgs>,
  rustup-toolchain ? ./rust-toolchain.toml,
}:
let
  pkgs = import nixpkgs {
    overlays = [ (import rust-overlay) ];
    inherit system;
  };

  rust-toolchain = (pkgs.rust-bin.fromRustupToolchainFile rustup-toolchain);

  naerskLib = pkgs.callPackage naersk {
    cargo = rust-toolchain;
    rustc = rust-toolchain;
  };
in
rec {
  bile = naerskLib.buildPackage {
    name = "bile";
    src = ./.;

    buildInputs = with pkgs; [
      pkg-config
      luajit
    ];

    cargoBuildOptions = x: x ++ [ "--no-default-features" ];
  };

  default = bile;
}