depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-raze/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

48 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, curl
, libgit2
, openssl
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-raze";
version = "0.16.0";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
hash = "sha256-ip0WuBn1b7uN/pAhOl5tfmToK73ZSHK7rucdtufsbCQ=";
};
sourceRoot = "${src.name}/impl";
cargoHash = "sha256-hNZgQwhm4UPqmANplZGxG0DYHa31tu06nmqYaCA7Vdg=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libgit2
openssl
curl
]
++ lib.optional stdenv.isDarwin Security;
preCheck = lib.optionalString stdenv.isDarwin ''
# Darwin issue: Os { code: 24, kind: Uncategorized, message: "Too many open files" }
# https://github.com/google/cargo-raze/issues/544
ulimit -n 1024
'';
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Generate Bazel BUILD files from Cargo dependencies";
homepage = "https://github.com/google/cargo-raze";
license = licenses.asl20;
maintainers = with maintainers; [ elasticdog ];
};
}