Compare commits
2 Commits
06fa652f96
...
bb4c4b6375
Author | SHA1 | Date | |
---|---|---|---|
bb4c4b6375 | |||
235863cd9e |
26
README.org
26
README.org
@ -19,7 +19,7 @@ be used with my [[https://elkowar.github.io/eww/][eww]] configuration.
|
||||
- Nix package manager with flakes (optional, for building and managing
|
||||
dependencies)
|
||||
|
||||
* Installation
|
||||
* Build and Run =pumo-system-info=
|
||||
1. Clone the repository
|
||||
|
||||
#+begin_src sh
|
||||
@ -41,6 +41,30 @@ cargo build --release
|
||||
./target/release/pumo-system-info
|
||||
#+end_src
|
||||
|
||||
* Installation
|
||||
** With Cargo
|
||||
You can install =pumo-system-info= using the following command:
|
||||
#+begin_src sh
|
||||
cargo install --path .
|
||||
#+end_src
|
||||
|
||||
** Flake Input
|
||||
You can add this repository in your flake inputs like so:
|
||||
#+begin_src nix
|
||||
inputs.pumo-system-info.url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
|
||||
#+end_src
|
||||
|
||||
You can also make it follow your =nixpkgs= version with this:
|
||||
#+begin_src nix
|
||||
pumo-system-info = {
|
||||
url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
#+end_src
|
||||
|
||||
You can now install =inputs.pumo-system-info.packages.${system}.default=
|
||||
as a package. =${system}= can be either =x86_64-linux= or =aarch64-linux=.
|
||||
|
||||
* Performance
|
||||
Since this is a utility for bringing information to eww, this project
|
||||
needs to run fast. Fortunately, it does! Here are some benchmarks I
|
||||
|
46
flake.lock
generated
46
flake.lock
generated
@ -1,12 +1,30 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1747744144,
|
||||
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
|
||||
"lastModified": 1748693115,
|
||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
|
||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -18,6 +36,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
@ -29,11 +48,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748054080,
|
||||
"narHash": "sha256-rwFiLLNCwkj9bqePtH1sMqzs1xmohE0Ojq249piMzF4=",
|
||||
"lastModified": 1748918260,
|
||||
"narHash": "sha256-KhXNXQ5IDLvwwYfJ0pXDjwIuisZ2qM6F7fcXjIGZy/4=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "2221d8d53c128beb69346fa3ab36da3f19bb1691",
|
||||
"rev": "c9736155bc1eb7c7cf3a925920850e61c07ab22a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -41,6 +60,21 @@
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
30
flake.nix
30
flake.nix
@ -2,37 +2,35 @@
|
||||
description = "System information in JSON format for eww";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
flake-utils,
|
||||
...
|
||||
}: 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 (
|
||||
}:
|
||||
flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (
|
||||
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; [
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
packages.default = pkgsFor.${system}.callPackage ./. {};
|
||||
devShells.default = with pkgs;
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
bacon
|
||||
cargo
|
||||
rustVersion
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user