pizauth: use a global enableSystemd package flag

Makes overlays easier for systems such as [sixos][1] or [finix][2].

[1]: https://codeberg.org/amjoseph/sixos
[2]: https://github.com/finix-community/finix
This commit is contained in:
Doron Behar
2026-06-14 18:03:59 +03:00
parent d41eab53bd
commit 6eb837c54d
+3 -2
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
stdenv,
nix-update-script,
enableSystemd ? stdenv.hostPlatform.isLinux,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -19,7 +20,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-pxzPcieUXE3VOyGNDaeDHUQPayRDZXpW57VWMejlZ4k=";
buildFeatures = lib.optionals stdenv.hostPlatform.isLinux [
buildFeatures = lib.optionals enableSystemd [
"systemd"
];
@@ -29,7 +30,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
'';
postInstall = ''
make PREFIX=$out install ${lib.optionalString stdenv.hostPlatform.isLinux "install-systemd"}
make PREFIX=$out install ${lib.optionalString enableSystemd "install-systemd"}
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=pizauth-(.*)" ]; };