about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2023-12-26 09:40:38 +0100
committerGitHub <noreply@github.com>2023-12-26 09:40:38 +0100
commitf1e46364dfe4e32954922e1bea9bdc4b6374183b (patch)
tree4e5930f2461a07b1a340463e54d2f9fa10bc85b6
parent780c3c86d434d030143770ddb4b9fc624b8d9afc (diff)
parent2562649f2b5dd4e4f20f02a63e4e401dccd8bfbe (diff)
Merge pull request #273252 from integrated-reasoning/cargo-typify
cargo-typify: init at 0.0.14
-rw-r--r--maintainers/maintainer-list.nix9
-rw-r--r--pkgs/by-name/ca/cargo-typify/package.nix31
2 files changed, 40 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 59770def79fcf..49ddf4fd7da95 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -4180,6 +4180,15 @@
     githubId = 118536343;
     name = "David Hamelin";
   };
+  david-r-cox = {
+    email = "david@integrated-reasoning.com";
+    github = "david-r-cox";
+    githubId = 4259949;
+    name = "David Cox";
+    keys = [{
+      fingerprint = "0056 A3F6 9918 1E0D 8FF0  BCDE 65BB 07FA A4D9 4634";
+    }];
+  };
   davidrusu = {
     email = "davidrusu.me@gmail.com";
     github = "davidrusu";
diff --git a/pkgs/by-name/ca/cargo-typify/package.nix b/pkgs/by-name/ca/cargo-typify/package.nix
new file mode 100644
index 0000000000000..6d62df94c517d
--- /dev/null
+++ b/pkgs/by-name/ca/cargo-typify/package.nix
@@ -0,0 +1,31 @@
+{ lib, rustfmt, rustPlatform, fetchFromGitHub }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "cargo-typify";
+  version = "0.0.14";
+
+  src = fetchFromGitHub {
+    owner = "oxidecomputer";
+    repo = "typify";
+    rev = "v${version}";
+    hash = "sha256-Clwm5hRjPPPRB6xpO8YOGpqnyNFtsSMkPbWBY3etPCI=";
+  };
+
+  cargoHash = "sha256-balx5xOtrWwMOFeGQkYQ2f+lcGMCJvdPqE8rH9adkfU=";
+
+  cargoBuildFlags = [ "-p" "cargo-typify" ];
+
+  nativeCheckInputs = [ rustfmt ];
+
+  preCheck = ''
+    # cargo-typify depends on rustfmt-wrapper, which requires RUSTFMT:
+    export RUSTFMT="${lib.getExe rustfmt}"
+  '';
+
+  meta = with lib; {
+    description = "JSON Schema to Rust type converter";
+    homepage = "https://github.com/oxidecomputer/typify";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ david-r-cox ];
+  };
+}