mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
33 lines
866 B
Nix
33 lines
866 B
Nix
{ 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";
|
|
mainProgram = "cargo-typify";
|
|
homepage = "https://github.com/oxidecomputer/typify";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ david-r-cox ];
|
|
};
|
|
}
|