{ crane, lib }: let src = crane.cleanCargoSource ./.; args = { inherit src; strictDeps = true; meta = with lib.meta; { maintainers = with lib.maintainers; [ vikanezrimaya ]; platforms = ["aarch64-linux" "x86_64-linux"]; }; }; cargoArtifacts = crane.buildDepsOnly args; args' = args // { inherit cargoArtifacts; }; in crane.buildPackage (args' // { postInstall = '' install -Dm755 ${./xdg-desktop-portal-systemd.portal} $out/share/xdg-desktop-portal/portals/xdg-desktop-portal-systemd.portal mkdir -p $out/share/systemd/user/ substituteAll ${./xdg-desktop-portal-systemd.service} $out/share/systemd/user/xdg-desktop-portal-systemd.service mkdir -p $out/share/dbus-1/services/ substituteAll ${./xyz.vikanezrimaya.fdo.portal.Systemd.service} $out/share/dbus-1/services/xyz.vikanezrimaya.fdo.portal.Systemd.service mkdir -p $out/share/applications substituteAll ${./xdg-desktop-portal-systemd.desktop} $out/share/applications/xdg-desktop-portal-systemd.desktop ''; passthru = { clippy = crane.cargoClippy (args' // { cargoClippyExtraArgs = "--all-targets -- --deny warnings"; }); fmt = crane.cargoFmt { inherit src; }; }; })