···1+{ fetchCrate
2+, lib
3+, rustPlatform
4+}:
5+6+rustPlatform.buildRustPackage rec {
7+ pname = "paging-calculator";
8+ version = "0.1.2";
9+10+ src = fetchCrate {
11+ inherit pname version;
12+ hash = "sha256-9DbpfJbarWXYGNzTqfHHSaKFqSJ59E/VhOhuMUWk8ho=";
13+ };
14+15+ cargoHash = "sha256-IfOhJwR5eRHeeAbEZ8zeUVojQXtrYHdzAeht/lvdlUQ=";
16+17+ meta = {
18+ description = "CLI utility that helps calculating page table indices from a virtual address";
19+ longDescription = ''
20+ paging-calculator is a CLI utility written in Rust that helps you find the indices that a virtual
21+ address will have on different architectures or paging implementations.
22+23+ It takes a (virtual) address in hexadecimal format and shows you which index will be used for
24+ what page-table level. It can be installed with $ cargo install paging-calculator.
25+ '';
26+ homepage = "https://github.com/phip1611/paging-calculator";
27+ changelog = "https://github.com/phip1611/paging-calculator/blob/v${version}/CHANGELOG.md";
28+ license = with lib.licenses; [ mit ];
29+ maintainers = with lib.maintainers; [ phip1611 ];
30+ };
31+}