Merge pull request #273252 from integrated-reasoning/cargo-typify

cargo-typify: init at 0.0.14
This commit is contained in:
Matthias Beyer 2023-12-26 09:40:38 +01:00 committed by GitHub
commit f1e46364df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View File

@ -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";

View File

@ -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 ];
};
}