protobuf: add versionCheckHook
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
zlib,
|
||||
version,
|
||||
hash,
|
||||
versionCheckHook,
|
||||
|
||||
# downstream dependencies
|
||||
python3,
|
||||
@@ -31,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "protocolbuffers";
|
||||
repo = "protobuf";
|
||||
rev = "refs/tags/v${version}";
|
||||
tag = "v${version}";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
@@ -94,6 +95,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# https://github.com/protocolbuffers/protobuf/issues/8460
|
||||
&& !stdenv.hostPlatform.is32bit;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgram = [ "${placeholder "out"}/bin/protoc" ];
|
||||
versionCheckProgramArg = [ "--version" ];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
pythonProtobuf = python3.pkgs.protobuf;
|
||||
|
||||
Reference in New Issue
Block a user