51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
|
{
|
||
|
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
|
||
|
];
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|