Rename Crate Flake
This commit is contained in:
22
flake.nix
22
flake.nix
@@ -50,14 +50,14 @@
|
|||||||
|
|
||||||
# Build the actual crate itself, reusing the dependency
|
# Build the actual crate itself, reusing the dependency
|
||||||
# artifacts from above.
|
# artifacts from above.
|
||||||
my-crate = craneLib.buildPackage (commonArgs // {
|
newalan = craneLib.buildPackage (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
checks = {
|
checks = {
|
||||||
# Build the crate as part of `nix flake check` for convenience
|
# Build the crate as part of `nix flake check` for convenience
|
||||||
inherit my-crate;
|
inherit newalan;
|
||||||
|
|
||||||
# Run clippy (and deny all warnings) on the crate source,
|
# Run clippy (and deny all warnings) on the crate source,
|
||||||
# again, resuing the dependency artifacts from above.
|
# again, resuing the dependency artifacts from above.
|
||||||
@@ -65,29 +65,29 @@
|
|||||||
# Note that this is done as a separate derivation so that
|
# Note that this is done as a separate derivation so that
|
||||||
# we can block the CI if there are issues here, but not
|
# we can block the CI if there are issues here, but not
|
||||||
# prevent downstream consumers from building our crate by itself.
|
# prevent downstream consumers from building our crate by itself.
|
||||||
my-crate-clippy = craneLib.cargoClippy (commonArgs // {
|
newalan-clippy = craneLib.cargoClippy (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||||
});
|
});
|
||||||
|
|
||||||
my-crate-doc = craneLib.cargoDoc (commonArgs // {
|
newalan-doc = craneLib.cargoDoc (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
|
|
||||||
# Check formatting
|
# Check formatting
|
||||||
my-crate-fmt = craneLib.cargoFmt {
|
newalan-fmt = craneLib.cargoFmt {
|
||||||
inherit src;
|
inherit src;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Audit dependencies
|
# Audit dependencies
|
||||||
my-crate-audit = craneLib.cargoAudit {
|
newalan-audit = craneLib.cargoAudit {
|
||||||
inherit src advisory-db;
|
inherit src advisory-db;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Run tests with cargo-nextest
|
# Run tests with cargo-nextest
|
||||||
# Consider setting `doCheck = false` on `my-crate` if you do not want
|
# Consider setting `doCheck = false` on `newalan` if you do not want
|
||||||
# the tests to run twice
|
# the tests to run twice
|
||||||
my-crate-nextest = craneLib.cargoNextest (commonArgs // {
|
newalan-nextest = craneLib.cargoNextest (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
partitions = 1;
|
partitions = 1;
|
||||||
partitionType = "count";
|
partitionType = "count";
|
||||||
@@ -95,15 +95,15 @@
|
|||||||
} // lib.optionalAttrs (system == "x86_64-linux") {
|
} // lib.optionalAttrs (system == "x86_64-linux") {
|
||||||
# NB: cargo-tarpaulin only supports x86_64 systems
|
# NB: cargo-tarpaulin only supports x86_64 systems
|
||||||
# Check code coverage (note: this will not upload coverage anywhere)
|
# Check code coverage (note: this will not upload coverage anywhere)
|
||||||
my-crate-coverage = craneLib.cargoTarpaulin (commonArgs // {
|
newalan-coverage = craneLib.cargoTarpaulin (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.default = my-crate;
|
packages.default = newalan;
|
||||||
|
|
||||||
apps.default = flake-utils.lib.mkApp {
|
apps.default = flake-utils.lib.mkApp {
|
||||||
drv = my-crate;
|
drv = newalan;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
|
|||||||
Reference in New Issue
Block a user