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:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user