[chore] lockfiles: update dependencies #1

Merged
jalil merged 3 commits from update into main 2024-06-16 14:16:18 +02:00
2 changed files with 23 additions and 5 deletions
Showing only changes of commit 965b289484 - Show all commits

1
.cargo/config Symbolic link
View file

@ -0,0 +1 @@
config.toml

View file

@ -6,13 +6,30 @@
cargoToml = readToml ./Cargo.toml;
pname = cargoToml.package.name;
inherit (cargoToml.package) version description;
src = lib.cleanSourceWith {
src = ./.;
name = "${pname}-source";
# Adapted from <https://github.com/ipetkov/crane/blob/master/lib/filterCargoSources.nix>
# no need to pull in crane for just this
filter = orig_path: type: let
path = toString orig_path;
base = baseNameOf path;
parentDir = baseNameOf (dirOf path);
matchesSuffix = lib.any (suffix: lib.hasSuffix suffix base) [
# Rust sources
".rs"
# TOML files are often used to configure cargo based tools (e.g. .cargo/config.toml)
".toml"
];
isCargoLock = base == "Cargo.lock";
# .cargo/config.toml is captured above
isOldStyleCargoConfig = parentDir == ".cargo" && base == "config";
in
type == "directory" || matchesSuffix || isCargoLock || isOldStyleCargoConfig;
};
in
rustPlatform.buildRustPackage {
inherit pname version;
src = builtins.path {
path = ./.;
name = "${pname}-source";
};
inherit pname version src;
cargoLock.lockFile = ./Cargo.lock;
useNextest = true;