mirror of
https://github.com/msfjarvis/gitice
synced 2025-08-14 22:07:00 +05:30
refactor(flakes): use filtered source and extract args
This commit is contained in:
parent
c382b1d84c
commit
6c02e4edfd
1 changed files with 15 additions and 13 deletions
28
flake.nix
28
flake.nix
|
@ -53,7 +53,7 @@
|
||||||
rustStable =
|
rustStable =
|
||||||
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
||||||
src = ./.;
|
src = craneLib.cleanCargoSource ./.;
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
perl
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
|
@ -63,24 +63,26 @@
|
||||||
[pkgs.openssl]
|
[pkgs.openssl]
|
||||||
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
|
||||||
[pkgs.darwin.apple_sdk.frameworks.Security];
|
[pkgs.darwin.apple_sdk.frameworks.Security];
|
||||||
cargoArtifacts = craneLib.buildDepsOnly {inherit src buildInputs nativeBuildInputs;};
|
|
||||||
|
|
||||||
gitice = craneLib.buildPackage {
|
cargoArtifacts = craneLib.buildDepsOnly {
|
||||||
inherit src buildInputs nativeBuildInputs;
|
inherit src buildInputs nativeBuildInputs;
|
||||||
doCheck = false;
|
|
||||||
};
|
};
|
||||||
gitice-clippy = craneLib.cargoClippy {
|
|
||||||
inherit cargoArtifacts src buildInputs nativeBuildInputs;
|
commonArgs = {
|
||||||
|
inherit src cargoArtifacts buildInputs nativeBuildInputs;
|
||||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||||
};
|
};
|
||||||
gitice-fmt = craneLib.cargoFmt {inherit src;};
|
|
||||||
|
gitice = craneLib.buildPackage (commonArgs // {doCheck = false;});
|
||||||
|
gitice-clippy = craneLib.cargoClippy (commonArgs // {});
|
||||||
|
gitice-fmt = craneLib.cargoFmt (commonArgs // {});
|
||||||
gitice-audit =
|
gitice-audit =
|
||||||
craneLib.cargoAudit {inherit src advisory-db;};
|
craneLib.cargoAudit (commonArgs // {inherit advisory-db;});
|
||||||
gitice-nextest = craneLib.cargoNextest {
|
gitice-nextest = craneLib.cargoNextest (commonArgs
|
||||||
inherit cargoArtifacts src buildInputs nativeBuildInputs;
|
// {
|
||||||
partitions = 1;
|
partitions = 1;
|
||||||
partitionType = "count";
|
partitionType = "count";
|
||||||
};
|
});
|
||||||
in {
|
in {
|
||||||
checks = {
|
checks = {
|
||||||
inherit gitice gitice-audit gitice-clippy gitice-fmt gitice-nextest;
|
inherit gitice gitice-audit gitice-clippy gitice-fmt gitice-nextest;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue