2023-07-17 02:42:55 +03:00
|
|
|
{
|
|
|
|
description = "Build a cargo project without extra checks";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
|
|
crane = {
|
|
|
|
url = "github:ipetkov/crane";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-06-11 00:12:11 +03:00
|
|
|
|
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-07-17 02:42:55 +03:00
|
|
|
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2024-06-11 00:12:11 +03:00
|
|
|
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }:
|
2023-07-17 02:42:55 +03:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
2024-06-11 00:12:11 +03:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [(import rust-overlay)];
|
2024-05-28 06:08:00 +03:00
|
|
|
craneLib = crane.mkLib pkgs;
|
2023-07-17 02:42:55 +03:00
|
|
|
my-crate = craneLib.buildPackage {
|
|
|
|
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
checks = {
|
|
|
|
inherit my-crate;
|
|
|
|
};
|
|
|
|
|
|
|
|
packages.default = my-crate;
|
|
|
|
|
|
|
|
apps.default = flake-utils.lib.mkApp {
|
|
|
|
drv = my-crate;
|
|
|
|
};
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
2023-07-17 09:01:10 +03:00
|
|
|
name = "limbusart-shell";
|
|
|
|
|
2023-07-17 02:42:55 +03:00
|
|
|
inputsFrom = builtins.attrValues self.checks.${system};
|
|
|
|
|
2023-07-17 09:01:10 +03:00
|
|
|
packages = with pkgs; [
|
2023-07-17 02:42:55 +03:00
|
|
|
cargo
|
2024-06-11 00:12:11 +03:00
|
|
|
(rust-bin.stable.latest.default.override {extensions = ["rust-src"];})
|
2023-07-17 02:42:55 +03:00
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|