This commit is contained in:
2026-09-15 15:09:36 +01:00
parent ac70a9133a
commit cd3cf4d65f
+5 -1
View File
@@ -59,6 +59,8 @@
# Common arguments can be set here to avoid repeating them later # Common arguments can be set here to avoid repeating them later
# Note: changes here will rebuild all dependency crates # Note: changes here will rebuild all dependency crates
commonArgs = { commonArgs = {
pname = "barbar";
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version;
# Exclude build outputs regardless of git state (this repo is not # Exclude build outputs regardless of git state (this repo is not
# git-initialized, so cleanCargoSource would otherwise copy target/). # git-initialized, so cleanCargoSource would otherwise copy target/).
src = pkgs.lib.cleanSourceWith { src = pkgs.lib.cleanSourceWith {
@@ -96,7 +98,9 @@
my-crate = craneLib.buildPackage ( my-crate = craneLib.buildPackage (
commonArgs commonArgs
// { // {
cargoArtifacts = craneLib.buildDepsOnly commonArgs; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
src = craneLib.cleanCargoSource ./.;
});
# Additional environment variables or build phases/hooks can be set # Additional environment variables or build phases/hooks can be set
# here *without* rebuilding all dependency crates # here *without* rebuilding all dependency crates