about summary refs log tree commit diff
path: root/pkgs/development/tools/paging-calculator
diff options
context:
space:
mode:
authorPhilipp Schuster <phip1611@gmail.com>2023-02-17 21:35:24 +0100
committerPhilipp Schuster <phip1611@gmail.com>2023-02-18 20:18:47 +0100
commit4d6552b48e75016bcb9aea8e5a351df14fad6eb8 (patch)
tree2f271b81a147df8f67606255b319bcdfc2aa2592 /pkgs/development/tools/paging-calculator
parent9d344df50a6130917791e851ecb75ba5c6a5112d (diff)
paging-calculator: init at 0.1.2
Diffstat (limited to 'pkgs/development/tools/paging-calculator')
-rw-r--r--pkgs/development/tools/paging-calculator/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/tools/paging-calculator/default.nix b/pkgs/development/tools/paging-calculator/default.nix
new file mode 100644
index 0000000000000..f57d7b137b1a2
--- /dev/null
+++ b/pkgs/development/tools/paging-calculator/default.nix
@@ -0,0 +1,31 @@
+{ fetchCrate
+, lib
+, rustPlatform
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "paging-calculator";
+  version = "0.1.2";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-9DbpfJbarWXYGNzTqfHHSaKFqSJ59E/VhOhuMUWk8ho=";
+  };
+
+  cargoHash = "sha256-IfOhJwR5eRHeeAbEZ8zeUVojQXtrYHdzAeht/lvdlUQ=";
+
+  meta = {
+    description = "CLI utility that helps calculating page table indices from a virtual address";
+    longDescription = ''
+      paging-calculator is a CLI utility written in Rust that helps you find the indices that a virtual
+      address will have on different architectures or paging implementations.
+
+      It takes a (virtual) address in hexadecimal format and shows you which index will be used for
+      what page-table level. It can be installed with $ cargo install paging-calculator.
+    '';
+    homepage = "https://github.com/phip1611/paging-calculator";
+    changelog = "https://github.com/phip1611/paging-calculator/blob/v${version}/CHANGELOG.md";
+    license = with lib.licenses; [ mit ];
+    maintainers = with lib.maintainers; [ phip1611 ];
+  };
+}