mirror of
https://github.com/msfjarvis/gitice
synced 2025-08-14 10:37:01 +05:30
chore: reformat all files with nixfmt-rfc-style
This commit is contained in:
parent
bd500e2a08
commit
a7b12817bf
3 changed files with 103 additions and 82 deletions
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
57
flake.nix
57
flake.nix
|
@ -22,7 +22,8 @@
|
|||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
inputs.flake-compat.flake = false;
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
advisory-db,
|
||||
crane,
|
||||
|
@ -31,51 +32,68 @@
|
|||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
overlays = [ devshell.overlays.default ];
|
||||
};
|
||||
|
||||
rustNightly = (import fenix {inherit pkgs;}).fromToolchainFile {
|
||||
rustNightly = (import fenix { inherit pkgs; }).fromToolchainFile {
|
||||
file = ./rust-toolchain.toml;
|
||||
sha256 = "sha256-XPGNBesOSwZJCXgynlavqa5QdsTAnodTmbx6t6XUWsY=";
|
||||
};
|
||||
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustNightly;
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
nativeBuildInputs = [];
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ ];
|
||||
buildInputs = [ ];
|
||||
cargoArtifacts = craneLib.buildDepsOnly {
|
||||
inherit src buildInputs nativeBuildInputs;
|
||||
};
|
||||
|
||||
commonArgs = {
|
||||
inherit src cargoArtifacts buildInputs nativeBuildInputs;
|
||||
inherit
|
||||
src
|
||||
cargoArtifacts
|
||||
buildInputs
|
||||
nativeBuildInputs
|
||||
;
|
||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||
};
|
||||
|
||||
gitice = craneLib.buildPackage (commonArgs // {doCheck = false;});
|
||||
gitice-clippy = craneLib.cargoClippy (commonArgs // {});
|
||||
gitice-fmt = craneLib.cargoFmt (commonArgs // {});
|
||||
gitice-audit =
|
||||
craneLib.cargoAudit (commonArgs // {inherit advisory-db;});
|
||||
gitice-nextest = craneLib.cargoNextest (commonArgs
|
||||
gitice = craneLib.buildPackage (commonArgs // { doCheck = false; });
|
||||
gitice-clippy = craneLib.cargoClippy (commonArgs // { });
|
||||
gitice-fmt = craneLib.cargoFmt (commonArgs // { });
|
||||
gitice-audit = craneLib.cargoAudit (commonArgs // { inherit advisory-db; });
|
||||
gitice-nextest = craneLib.cargoNextest (
|
||||
commonArgs
|
||||
// {
|
||||
partitions = 1;
|
||||
partitionType = "count";
|
||||
});
|
||||
in {
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
inherit gitice gitice-audit gitice-clippy gitice-fmt gitice-nextest;
|
||||
inherit
|
||||
gitice
|
||||
gitice-audit
|
||||
gitice-clippy
|
||||
gitice-fmt
|
||||
gitice-nextest
|
||||
;
|
||||
};
|
||||
|
||||
packages.default = gitice;
|
||||
|
||||
apps.default = flake-utils.lib.mkApp {drv = gitice;};
|
||||
apps.default = flake-utils.lib.mkApp { drv = gitice; };
|
||||
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
|
@ -94,5 +112,6 @@
|
|||
stdenv.cc
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue