fix(default.nix): small issues here and there
All checks were successful
/ check (push) Successful in 2s
/ build (push) Successful in 1s

Mostly concerning the test output
This commit is contained in:
Jalil David Salamé Messina 2024-09-30 16:47:28 +02:00
parent b1e184d186
commit 095bc3bc8c
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -1,7 +1,4 @@
{ { lib, rustPlatform }:
lib,
rustPlatform,
}:
let let
readToml = path: builtins.fromTOML (builtins.readFile path); readToml = path: builtins.fromTOML (builtins.readFile path);
cargoToml = readToml ./Cargo.toml; cargoToml = readToml ./Cargo.toml;
@ -17,7 +14,6 @@ let
let let
path = toString orig_path; path = toString orig_path;
base = baseNameOf path; base = baseNameOf path;
parentDir = baseNameOf (dirOf path);
matchesSuffix = lib.any (suffix: lib.hasSuffix suffix base) [ matchesSuffix = lib.any (suffix: lib.hasSuffix suffix base) [
# Rust sources # Rust sources
".rs" ".rs"
@ -25,16 +21,16 @@ let
".toml" ".toml"
]; ];
isCargoLock = base == "Cargo.lock"; isCargoLock = base == "Cargo.lock";
# .cargo/config.toml is captured above
isOldStyleCargoConfig = parentDir == ".cargo" && base == "config";
in in
type == "directory" || matchesSuffix || isCargoLock || isOldStyleCargoConfig; type == "directory" || matchesSuffix || isCargoLock;
}; };
in in
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
inherit pname version src; inherit pname version src;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
useNextest = true; useNextest = true;
NEXTEST_HIDE_PROGRESS_BAR = 1;
NEXTEST_FAILURE_OUTPUT = "immediate-final";
meta = { meta = {
inherit description; inherit description;