Cargo.toml: enable uucore logind integration, add systemd compile flag
Some checks failed
Build and test / check (push) Successful in 1m6s
Build and test / build (push) Failing after 1m29s
Build and test / test (push) Failing after 1m50s
Build and test / docs (push) Successful in 2m52s

This commit is contained in:
2026-01-09 15:42:05 +09:00
parent 3e642fa460
commit 6b94e42ed4
3 changed files with 24 additions and 4 deletions

View File

@@ -28,12 +28,16 @@ toml = "0.9.10"
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
# onc-rpc = "0.3.2"
sd-notify = "0.4.5"
sd-notify = { version = "0.4.5", optional = true }
serde_json = "1.0.148"
uucore = { version = "0.5.0", features = ["utmpx"] }
zlink = { version = "0.2.0", features = ["introspection"] }
clap_complete = "4.5.65"
[features]
default = ["systemd"]
systemd = ["sd-notify", "uucore/feat_systemd_logind"]
[lib]
name = "roowho2_lib"
path = "src/lib.rs"

View File

@@ -53,10 +53,17 @@
nativeBuildInputs = with pkgs; [
toolchain
cargo-edit
];
] ++ (lib.optionals stdenv.buildPlatform.isLinux [
systemdLibs
]);
env.RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
env.RUSTFLAGS = "-Zhigher-ranked-assumptions";
env = {
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
RUSTFLAGS = "-Zhigher-ranked-assumptions";
CARGO_CFG_FEATURE = lib.concatStringsSep "," (lib.optionals pkgs.stdenv.buildPlatform.isLinux [
"systemd"
]);
};
});
overlays = {

View File

@@ -5,6 +5,7 @@
, buildPackages
, installShellFiles
, versionCheckHook
, systemdLibs
, cargoToml
, cargoLock
@@ -21,6 +22,14 @@ rustPlatform.buildRustPackage {
RUSTFLAGS = "-Zhigher-ranked-assumptions";
buildFeatures = lib.optionals stdenv.hostPlatform.isLinux [
"systemd"
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
systemdLibs
];
nativeBuildInputs = [ installShellFiles ];
postInstall = let
emulator = stdenv.hostPlatform.emulator buildPackages;