blob: a5650c9c37cd9b3e41c7f21b01730eb84b44d338 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{ 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; };
};
})
|