{ 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 ''; passthru = { clippy = crane.cargoClippy (args' // { cargoClippyExtraArgs = "--all-targets -- --deny warnings"; }); fmt = crane.cargoFmt { inherit src; }; }; })