39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{
|
|
description = "System information in JSON format for eww";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs = {
|
|
nixpkgs,
|
|
rust-overlay,
|
|
...
|
|
}: let
|
|
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
pkgsFor = nixpkgs.legacyPackages;
|
|
in {
|
|
packages = forAllSystems (system: {
|
|
default = pkgsFor.${system}.callPackage ./. {};
|
|
});
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
devShells = forAllSystems (
|
|
system: let
|
|
overlays = [(import rust-overlay)];
|
|
pkgs = import nixpkgs {inherit system overlays;};
|
|
rustVersion = pkgs.rust-bin.fromRustupToolchainFile ./rustup-toolchain.toml;
|
|
in
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
bacon
|
|
cargo
|
|
rustVersion
|
|
];
|
|
}
|
|
);
|
|
};
|
|
}
|