2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config, curl, libgit2, openssl, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-raze";
|
2021-04-17 00:35:05 +00:00
|
|
|
version = "0.12.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-17 00:35:05 +00:00
|
|
|
sha256 = "161m4y6i4sgqi9mg3f3348f5cr0m45vhix4a4bcw54wnmhiklnnl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
sourceRoot = "source/impl";
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
cargoSha256 = "1vlywdq0bx6b1k3w1grisca0hvv2s4s88yxq7bil8nhm5ghjgxdr";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ curl libgit2 openssl ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
# thread 'main' panicked at 'Cannot ping mock server.: "cannot send request to mock server: cannot send request to mock server: failed to resolve host name"'
|
|
|
|
# __darwinAllowLocalNetworking does not fix the panic
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generate Bazel BUILD files from Cargo dependencies";
|
|
|
|
homepage = "https://github.com/google/cargo-raze";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ elasticdog ];
|
|
|
|
};
|
|
|
|
}
|