depot/third_party/nixpkgs/pkgs/development/tools/uniffi-bindgen/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

46 lines
1,021 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, ktlint
, yapf
, rubocop
, rustfmt
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "uniffi-bindgen";
version = "0.19.3";
src = fetchFromGitHub {
owner = "mozilla";
repo = "uniffi-rs";
rev = "v${version}";
hash = "sha256-A6Zd1jfhoR4yW2lT5qYE3vJTpiJc94pK/XQmfE2QLFc=";
};
cargoLock.lockFile = ./Cargo.lock;
cargoBuildFlags = [ "-p uniffi_bindgen" ];
cargoTestFlags = [ "-p uniffi_bindgen" ];
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
postFixup = ''
wrapProgram "$out/bin/uniffi-bindgen" \
--suffix PATH : ${lib.strings.makeBinPath [ rustfmt ktlint yapf rubocop ] }
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Toolkit for building cross-platform software components in Rust";
homepage = "https://mozilla.github.io/uniffi-rs/";
license = licenses.mpl20;
maintainers = with maintainers; [ vtuan10 ];
};
}