···11+{ fetchCrate
22+, lib
33+, rustPlatform
44+}:
55+66+rustPlatform.buildRustPackage rec {
77+ pname = "paging-calculator";
88+ version = "0.1.2";
99+1010+ src = fetchCrate {
1111+ inherit pname version;
1212+ hash = "sha256-9DbpfJbarWXYGNzTqfHHSaKFqSJ59E/VhOhuMUWk8ho=";
1313+ };
1414+1515+ cargoHash = "sha256-IfOhJwR5eRHeeAbEZ8zeUVojQXtrYHdzAeht/lvdlUQ=";
1616+1717+ meta = {
1818+ description = "CLI utility that helps calculating page table indices from a virtual address";
1919+ longDescription = ''
2020+ paging-calculator is a CLI utility written in Rust that helps you find the indices that a virtual
2121+ address will have on different architectures or paging implementations.
2222+2323+ It takes a (virtual) address in hexadecimal format and shows you which index will be used for
2424+ what page-table level. It can be installed with $ cargo install paging-calculator.
2525+ '';
2626+ homepage = "https://github.com/phip1611/paging-calculator";
2727+ changelog = "https://github.com/phip1611/paging-calculator/blob/v${version}/CHANGELOG.md";
2828+ license = with lib.licenses; [ mit ];
2929+ maintainers = with lib.maintainers; [ phip1611 ];
3030+ };
3131+}