-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6290195
commit 2562649
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |