diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..55e32bf --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + 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}; + }; + }); +} |