pumo-system-info/flake.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

2025-05-23 21:09:36 +02:00
{
description = "System information in JSON format for eww";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rustVersion = (pkgs.rust-bin.fromRustupToolchainFile ./rustup-toolchain.toml);
rustPlatform = pkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
};
appName = "pumo-system-info";
appRustBuild = rustPlatform.buildRustPackage {
pname = appName;
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
doCheck = true;
};
in {
packages.rustPackage = appRustBuild;
defaultPackage = appRustBuild;
devShell = with pkgs; mkShell {
buildInputs = [
bacon
cargo
cargo-deny
cargo-msrv
cargo-tarpaulin
just
rustVersion
];
};
}
);
}