vector: make some more options override-able

Unfortunately, buildRustPackage isn't very flexible right now, and most
of these attrs can't be overridden. This is needed for some general
patch work, but isn't really long term sustainable. I plan on reverting
this after Vector 0.6 is out.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2019-11-23 03:35:19 -06:00
parent 2becf48fb5
commit b964f4b421
No known key found for this signature in database
GPG key ID: 25D2038DEB08021D

View file

@ -6,20 +6,31 @@
(if stdenv.isAarch64 (if stdenv.isAarch64
then [ "jemallocator" ] then [ "jemallocator" ]
else [ "leveldb" "jemallocator" ]) else [ "leveldb" "jemallocator" ])
# Unfortunately, buildRustPackage does not really support using overrideAttrs
# on the underlying fields, because it doesn't pass them to stdenv.mkDerivation
# as an attr. making it a parameter is the only way to do so. sigh
, version ? "0.5.0"
, srcRef ? {
rev = "refs/tags/v${version}";
sha256 = "0niyxlvphn3awrpfh1hbqy767cckgjzyjrkqjxj844czxhh1hhff";
}
, cargoSha256 ? "0bdgan891hrah54g6aaysqizkxrfsbidnxihai0i7h7knzq9gsk5"
, patches ? []
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "vector"; pname = "vector";
version = "0.5.0"; inherit version cargoSha256 patches;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "timberio"; owner = "timberio";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; inherit (srcRef) rev sha256;
sha256 = "0niyxlvphn3awrpfh1hbqy767cckgjzyjrkqjxj844czxhh1hhff";
}; };
cargoSha256 = "0bdgan891hrah54g6aaysqizkxrfsbidnxihai0i7h7knzq9gsk5";
buildInputs = [ openssl pkgconfig protobuf ] buildInputs = [ openssl pkgconfig protobuf ]
++ stdenv.lib.optional stdenv.isDarwin [ Security libiconv ]; ++ stdenv.lib.optional stdenv.isDarwin [ Security libiconv ];