blob: 4a17f0ebecb37791c907e1895a917628effa70b9 (
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
30
31
32
33
34
35
36
|
{
inputs = {
flake-utils.url = "github:numtide/flake-utils/main";
crane.url = "github:ipetkov/crane";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, flake-utils, crane }: let
supportedSystems = ["aarch64-linux" "x86_64-linux"];
forAllSystems = f: flake-utils.lib.eachSystem supportedSystems f;
in forAllSystems (system: let
pkgs = import nixpkgs {
localSystem = { inherit system; };
};
crane' = crane.mkLib pkgs;
package = pkgs.callPackage ./default.nix {
crane = crane';
};
in {
packages = {
xdg-desktop-portal-systemd = package;
default = self.packages.${system}.xdg-desktop-portal-systemd;
};
checks = {
clippy = package.clippy;
fmt = package.fmt;
};
devShells.default = crane'.devShell {
checks = self.checks.${system};
packages = with pkgs; [
rust-analyzer
];
};
});
}
|