3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/uniffi-bindgen/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1,021 B
Nix
Raw Normal View History

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, ktlint
, yapf
, rubocop
, rustfmt
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "uniffi-bindgen";
2022-07-20 09:18:25 +01:00
version = "0.19.3";
src = fetchFromGitHub {
owner = "mozilla";
repo = "uniffi-rs";
rev = "v${version}";
2022-07-20 09:18:25 +01:00
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 ] }
'';
2022-07-20 14:28:47 +01:00
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 ];
};
}