pizauth: fix systemd feature

Although we had `systemd` included in `buildFeatures`, it didn't reach
`$out/bin/pizauth`, because upstream's Makefile used
`target/release/pizauth` as a Makefile target that `cargo build
--release` (with or without `--features=systemd`) solves.
This commit is contained in:
Doron Behar
2026-06-14 18:14:53 +03:00
parent 6eb837c54d
commit 583024221d
+8
View File
@@ -27,6 +27,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
preConfigure = ''
substituteInPlace lib/systemd/user/pizauth.service \
--replace-fail /usr/bin/ ''${!outputBin}/bin/
# Upstream's Makefile uses target/release/pizauth as a Makefile target that
# the `install` target depends upon. Nixpkgs' cargoBuildHook defaults to
# using the explicit `--target @rustcTargetSpec@` flag, so that the
# executable always ends up in
# `target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release`. To make the
# Makefile not run cargo build again, we use this substitution.
substituteInPlace Makefile \
--replace-fail target/release target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release
'';
postInstall = ''