mirror of
https://github.com/msfjarvis/text-editor.git
synced 2024-06-03 04:18:57 +05:30
Harsh Shandilya
230fe4744c
Flake lock file updates: • Updated input 'advisory-db': 'github:rustsec/advisory-db/1f538e6f3b8ad37e89b1386e06be080fbe474b3c' (2023-06-29) → 'github:rustsec/advisory-db/1d2202ea2b32fabd3307641010301bfe187ef11a' (2024-01-24) • Updated input 'crane': 'github:ipetkov/crane/4d350bb94fdf8ec9d2e22d68bb13e136d73aa9d8' (2023-06-29) → 'github:ipetkov/crane/c798790eabec3e3da48190ae3698ac227aab770c' (2024-01-28) • Removed input 'crane/flake-compat' • Removed input 'crane/flake-utils' • Removed input 'crane/rust-overlay' • Removed input 'crane/rust-overlay/flake-utils' • Removed input 'crane/rust-overlay/nixpkgs' • Updated input 'devshell': 'github:numtide/devshell/3864857b2754ab0e16c7c7c626f0e5a1d4e42f38' (2023-06-28) → 'github:numtide/devshell/83cb93d6d063ad290beee669f4badf9914cc16ec' (2024-01-15) • Added input 'devshell/flake-utils': follows 'flake-utils' • Removed input 'devshell/systems' • Updated input 'fenix': 'github:nix-community/fenix/1b25873f884bb9db4924d98b3ec46a378ed60920' (2023-07-01) → 'github:nix-community/fenix/46a368edf5f1cc16573157797e5acead834d5b2c' (2024-01-30) • Updated input 'fenix/rust-analyzer-src': 'github:rust-lang/rust-analyzer/46cd8b849590a18c3e4f2eb8a0ade486d1c855a8' (2023-06-30) → 'github:rust-lang/rust-analyzer/d13951f25c4cb880bff09a3c02a796ecc51f69ac' (2024-01-29) • Updated input 'flake-utils': 'github:numtide/flake-utils/dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7' (2023-06-25) → 'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/60a783e00517fce85c42c8c53fe0ed05ded5b2a4' (2023-06-28) → 'github:NixOS/nixpkgs/222c1940fafeda4dea161858ffe6ebfc853d3db5' (2024-01-30)
90 lines
2.5 KiB
Nix
90 lines
2.5 KiB
Nix
{
|
|
description = "text-editor";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
inputs.systems.url = "github:msfjarvis/flake-systems";
|
|
|
|
inputs.advisory-db.url = "github:rustsec/advisory-db";
|
|
inputs.advisory-db.flake = false;
|
|
|
|
inputs.crane.url = "github:ipetkov/crane";
|
|
inputs.crane.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.devshell.url = "github:numtide/devshell";
|
|
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.devshell.inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.fenix.url = "github:nix-community/fenix";
|
|
inputs.fenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
inputs.flake-utils.inputs.systems.follows = "systems";
|
|
|
|
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
|
inputs.flake-compat.flake = false;
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
advisory-db,
|
|
crane,
|
|
devshell,
|
|
fenix,
|
|
flake-utils,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [devshell.overlays.default];
|
|
};
|
|
|
|
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
|
|
file = ./rust-toolchain.toml;
|
|
sha256 = "sha256-gdYqng0y9iHYzYPAdkC/ka3DRny3La/S5G8ASj0Ayyc=";
|
|
};
|
|
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
|
commonArgs = {
|
|
src = craneLib.cleanCargoSource ./.;
|
|
buildInputs = [];
|
|
nativeBuildInputs = [];
|
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
|
};
|
|
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {doCheck = false;});
|
|
|
|
text-editor = craneLib.buildPackage (commonArgs // {doCheck = false;});
|
|
text-editor-clippy = craneLib.cargoClippy (commonArgs
|
|
// {
|
|
inherit cargoArtifacts;
|
|
});
|
|
text-editor-fmt = craneLib.cargoFmt (commonArgs // {});
|
|
text-editor-audit = craneLib.cargoAudit (commonArgs // {inherit advisory-db;});
|
|
in {
|
|
checks = {
|
|
inherit text-editor text-editor-audit text-editor-clippy text-editor-fmt;
|
|
};
|
|
|
|
packages.default = text-editor;
|
|
|
|
apps.default = flake-utils.lib.mkApp {drv = text-editor;};
|
|
|
|
devShells.default = pkgs.devshell.mkShell {
|
|
bash = {interactive = "";};
|
|
|
|
env = [
|
|
{
|
|
name = "DEVSHELL_NO_MOTD";
|
|
value = 1;
|
|
}
|
|
];
|
|
|
|
packages = with pkgs; [
|
|
cargo-nextest
|
|
rustStable
|
|
];
|
|
};
|
|
});
|
|
}
|