2023-05-19 16:36:19 +03:00
|
|
|
{
|
2023-05-25 17:28:59 +03:00
|
|
|
inputs = {
|
2023-05-25 05:17:28 +03:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
crane = {
|
|
|
|
url = "github:ipetkov/crane";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-05-19 16:36:19 +03:00
|
|
|
};
|
|
|
|
|
2023-05-25 17:28:59 +03:00
|
|
|
outputs = { self, nixpkgs, flake-utils, rust-overlay, crane, ... }:
|
|
|
|
let
|
|
|
|
supportedSystems = flake-utils.lib.defaultSystems;
|
|
|
|
in
|
|
|
|
flake-utils.lib.eachSystem supportedSystems (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
rust-overlay.overlay
|
|
|
|
];
|
|
|
|
};
|
2023-05-19 16:36:19 +03:00
|
|
|
|
2023-05-25 17:28:59 +03:00
|
|
|
inherit (pkgs) lib;
|
2023-05-23 10:49:48 +03:00
|
|
|
|
2023-05-25 17:28:59 +03:00
|
|
|
cranePkgs = pkgs.callPackage ./crane.nix {
|
|
|
|
inherit crane supportedSystems;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages = rec {
|
|
|
|
inherit (cranePkgs) flake-checker;
|
|
|
|
default = flake-checker;
|
|
|
|
};
|
|
|
|
devShells = {
|
|
|
|
default = pkgs.mkShell ({
|
|
|
|
inputsFrom = [ cranePkgs.flake-checker ];
|
|
|
|
packages = with pkgs; [
|
|
|
|
bashInteractive
|
|
|
|
cranePkgs.rustNightly
|
2023-05-19 17:00:24 +03:00
|
|
|
|
2023-05-25 17:28:59 +03:00
|
|
|
cargo-bloat
|
|
|
|
cargo-edit
|
|
|
|
cargo-udeps
|
|
|
|
cargo-edit
|
|
|
|
cargo-watch
|
|
|
|
rust-analyzer
|
|
|
|
];
|
|
|
|
} // cranePkgs.cargoCrossEnvs);
|
|
|
|
};
|
|
|
|
});
|
2023-05-19 16:36:19 +03:00
|
|
|
}
|