Merge pull request #91446 from prusnak/protobuf-latest

use latest protobuf (3.12), remove overrides where possible
This commit is contained in:
Frederik Rietdijk 2020-07-26 18:55:07 +02:00 committed by GitHub
commit d9da3e357b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 42 deletions

View File

@ -2,7 +2,7 @@
, cmake, pkgconfig , cmake, pkgconfig
, boost, miniupnpc, openssl, unbound , boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi , zeromq, pcsclite, readline, libsodium, hidapi
, pythonProtobuf, randomx, rapidjson, libusb-compat-0_1 , protobuf, randomx, rapidjson, libusb-compat-0_1
, CoreData, IOKit, PCSC , CoreData, IOKit, PCSC
}: }:
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
boost miniupnpc openssl unbound boost miniupnpc openssl unbound
zeromq pcsclite readline zeromq pcsclite readline
libsodium hidapi randomx rapidjson libsodium hidapi randomx rapidjson
pythonProtobuf libusb-compat-0_1 protobuf libusb-compat-0_1
] ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ]; ] ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ];
cmakeFlags = [ cmakeFlags = [

View File

@ -1,31 +1,43 @@
{ stdenv, fetchFromGitHub, autoreconfHook, bison, flex, pkgconfig { stdenv
, libuuid, cppunit, protobuf3_1, zlib, avahi, libmicrohttpd , fetchFromGitHub
, perl, python36 # Replace by python3 after the next update , autoreconfHook
, bison
, flex
, pkgconfig
, libuuid
, cppunit
, protobuf
, zlib
, avahi
, libmicrohttpd
, perl
, python3
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ola"; pname = "ola";
version = "0.10.7"; version = "unstable-2020-07-17";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OpenLightingProject"; owner = "OpenLightingProject";
repo = "ola"; repo = "ola";
rev = version; rev = "e2cd699c7792570500578fd092fb6bfb3d511023"; # HEAD of "0.10" branch
sha256 = "18krwrw7w1qzwih8gnmv7r4sah5ppvq7ax65r7l5yjxn3ihwp2kf"; sha256 = "17a3z3zhx00rjk58icd3zlqfw3753f3y8bwy2sza0frdim09lqr4";
}; };
nativeBuildInputs = [ autoreconfHook bison flex pkgconfig perl ]; nativeBuildInputs = [ autoreconfHook bison flex pkgconfig perl ];
buildInputs = [ libuuid cppunit protobuf3_1 zlib avahi libmicrohttpd python36 ]; buildInputs = [ libuuid cppunit protobuf zlib avahi libmicrohttpd python3 ];
propagatedBuildInputs = [ propagatedBuildInputs = [
(python36.pkgs.protobuf.override { protobuf = protobuf3_1; }) python3.pkgs.protobuf
python36.pkgs.numpy python3.pkgs.numpy
]; ];
configureFlags = [ "--enable-python-libs" ]; configureFlags = [ "--enable-python-libs" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A framework for controlling entertainment lighting equipment."; description = "A framework for controlling entertainment lighting equipment.";
maintainers = [ maintainers.globin ]; homepage = "https://www.openlighting.org/ola/";
maintainers = with maintainers; [ globin ];
license = with licenses; [ lgpl21 gpl2Plus ]; license = with licenses; [ lgpl21 gpl2Plus ];
platforms = platforms.all; platforms = platforms.all;
}; };

View File

@ -1,20 +1,16 @@
{ stdenv, fetchFromGitHub, cmake, abseil-cpp, gflags, which { stdenv, fetchFromGitHub, cmake, abseil-cpp, gflags, which
, lsb-release, glog, protobuf3_11, cbc, zlib , lsb-release, glog, protobuf, cbc, zlib
, ensureNewerSourcesForZipFilesHook, python, swig }: , ensureNewerSourcesForZipFilesHook, python, swig }:
let stdenv.mkDerivation rec {
protobuf = protobuf3_11;
pythonProtobuf = python.pkgs.protobuf.override { inherit protobuf; };
in stdenv.mkDerivation rec {
pname = "or-tools"; pname = "or-tools";
version = "7.6"; version = "7.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "or-tools"; repo = "or-tools";
rev = "v${version}"; rev = "v${version}";
sha256 = "0605q3y7vh7x7m9azrbkx44blq12zrab6v28b9wmpcn1lmykbw1b"; sha256 = "06ig9a1afmzgzcg817y0rdq49ahll0q9y7bhhg9d89x6zy959ypv";
}; };
# The original build system uses cmake which does things like pull # The original build system uses cmake which does things like pull
@ -33,7 +29,7 @@ in stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"prefix=${placeholder "out"}" "prefix=${placeholder "out"}"
"PROTOBUF_PYTHON_DESC=${pythonProtobuf}/${python.sitePackages}/google/protobuf/descriptor_pb2.py" "PROTOBUF_PYTHON_DESC=${python.pkgs.protobuf}/${python.sitePackages}/google/protobuf/descriptor_pb2.py"
]; ];
buildFlags = [ "cc" "pypi_archive" ]; buildFlags = [ "cc" "pypi_archive" ];
@ -54,7 +50,7 @@ in stdenv.mkDerivation rec {
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
abseil-cpp gflags glog protobuf cbc abseil-cpp gflags glog protobuf cbc
pythonProtobuf python.pkgs.six python.pkgs.protobuf python.pkgs.six
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -10,7 +10,7 @@
, networkx , networkx
, numpy , numpy
, pandas , pandas
, pythonProtobuf # pythonPackages.protobuf , protobuf
, requests , requests
, scipy , scipy
, sortedcontainers , sortedcontainers
@ -28,15 +28,15 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "cirq"; pname = "cirq";
version = "0.8.0"; version = "0.8.2";
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "quantumlib"; owner = "quantumlib";
repo = "cirq"; repo = "cirq";
rev = "v${version}"; rev = "v${version}";
sha256 = "01nnv7r595sp60wvp7750lfdjwdsi4q0r4lmaj6li09zsdw0r4b3"; sha256 = "0xs46s19idh8smf80zhgraxwh3lphcdbljdrhxwhi5xcc41dfsmf";
}; };
patches = [ patches = [
@ -48,14 +48,6 @@ buildPythonPackage rec {
}) })
]; ];
# Cirq locks protobuf==3.8.0, but tested working with default pythonPackages.protobuf (3.7). This avoids overrides/pythonPackages.protobuf conflicts
postPatch = ''
substituteInPlace requirements.txt \
--replace "networkx~=2.4" "networkx" \
--replace "protobuf==3.8.0" "protobuf" \
--replace "freezegun~=0.3.15" "freezegun"
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
freezegun freezegun
google_api_core google_api_core
@ -63,7 +55,7 @@ buildPythonPackage rec {
matplotlib matplotlib
networkx networkx
pandas pandas
pythonProtobuf protobuf
requests requests
scipy scipy
sortedcontainers sortedcontainers

View File

@ -14402,7 +14402,7 @@ in
python = python37; python = python37;
}; };
protobuf = protobuf3_8; protobuf = protobuf3_12;
protobuf3_12 = callPackage ../development/libraries/protobuf/3.12.nix { }; protobuf3_12 = callPackage ../development/libraries/protobuf/3.12.nix { };
protobuf3_11 = callPackage ../development/libraries/protobuf/3.11.nix { }; protobuf3_11 = callPackage ../development/libraries/protobuf/3.11.nix { };
@ -23772,12 +23772,10 @@ in
monero = callPackage ../applications/blockchains/monero { monero = callPackage ../applications/blockchains/monero {
inherit (darwin.apple_sdk.frameworks) CoreData IOKit PCSC; inherit (darwin.apple_sdk.frameworks) CoreData IOKit PCSC;
boost = boost17x; boost = boost17x;
pythonProtobuf = python3Packages.protobuf.override { protobuf = protobuf3_10; };
}; };
monero-gui = libsForQt5.callPackage ../applications/blockchains/monero-gui { monero-gui = libsForQt5.callPackage ../applications/blockchains/monero-gui {
boost = boost17x; boost = boost17x;
protobuf = protobuf3_10;
}; };
masari = callPackage ../applications/blockchains/masari.nix { boost = boost165; }; masari = callPackage ../applications/blockchains/masari.nix { boost = boost165; };

View File

@ -2080,9 +2080,7 @@ in {
cmarkgfm = callPackage ../development/python-modules/cmarkgfm { }; cmarkgfm = callPackage ../development/python-modules/cmarkgfm { };
cirq = callPackage ../development/python-modules/cirq { cirq = callPackage ../development/python-modules/cirq { };
pythonProtobuf = self.protobuf;
};
citeproc-py = callPackage ../development/python-modules/citeproc-py { }; citeproc-py = callPackage ../development/python-modules/citeproc-py { };
@ -5322,7 +5320,7 @@ in {
protobuf = callPackage ../development/python-modules/protobuf { protobuf = callPackage ../development/python-modules/protobuf {
disabled = isPyPy; disabled = isPyPy;
doCheck = !isPy3k; doCheck = !isPy3k;
protobuf = pkgs.protobuf3_8; protobuf = pkgs.protobuf3_12;
}; };
psd-tools = callPackage ../development/python-modules/psd-tools { }; psd-tools = callPackage ../development/python-modules/psd-tools { };