protobuf: remove old versions

This leaves only protobuf3_1 which is the last version with libprotobuf2.

Also fix several packages to build with the latest protobuf.
This commit is contained in:
Nikolay Amiantov 2017-09-08 21:24:14 +03:00
parent 4bdcb220c9
commit 1f2a18d916
13 changed files with 31 additions and 98 deletions

View File

@ -54,19 +54,23 @@ let
++ stdenv.lib.optionals (withCD) [libcdio]
++ stdenv.lib.optionals (withCloud) [sparsehash];
postPatch = ''
sed -i src/CMakeLists.txt \
-e 's,-Werror,,g' \
-e 's,-Wno-unknown-warning-option,,g' \
-e 's,-Wno-unused-private-field,,g'
sed -i CMakeLists.txt \
-e 's,libprotobuf.a,protobuf,g'
'';
free = stdenv.mkDerivation {
name = "clementine-free-${version}";
inherit src patches nativeBuildInputs buildInputs;
inherit src patches nativeBuildInputs buildInputs postPatch;
cmakeFlags = [ "-DUSE_SYSTEM_PROJECTM=ON" ];
enableParallelBuilding = true;
postPatch = ''
sed -i src/CMakeLists.txt \
-e 's,-Werror,,g' \
-e 's,-Wno-unknown-warning-option,,g' \
-e 's,-Wno-unused-private-field,,g'
'';
meta = with stdenv.lib; {
homepage = http://www.clementine-player.org;
description = "A multiplatform music player";
@ -80,7 +84,7 @@ let
blob = stdenv.mkDerivation {
name = "clementine-blob-${version}";
# Use the same patches and sources as Clementine
inherit src nativeBuildInputs;
inherit src nativeBuildInputs postPatch;
patches = [
./clementine-spotify-blob.patch

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, autoreconfHook, bison, flex, pkgconfig
, libuuid, cppunit, protobuf, zlib, avahi, libmicrohttpd
, libuuid, cppunit, protobuf3_1, zlib, avahi, libmicrohttpd
, perl, python3, python3Packages
}:
@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook bison flex pkgconfig perl ];
buildInputs = [ libuuid cppunit protobuf zlib avahi libmicrohttpd python3 ];
propagatedBuildInputs = with python3Packages; [ protobuf numpy ];
buildInputs = [ libuuid cppunit protobuf3_1 zlib avahi libmicrohttpd python3 ];
propagatedBuildInputs = [ python3Packages.protobuf3_1 python3Packages.numpy ];
configureFlags = [ "--enable-python-libs" ];

View File

@ -73,7 +73,7 @@ in stdenv.mkDerivation rec {
substituteInPlace 3rdparty/stout/Makefile.am \
--replace "-lprotobuf" \
"${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"
"${pythonProtobuf.protobuf}/lib/libprotobuf.so"
substituteInPlace 3rdparty/stout/include/stout/os/posix/fork.hpp \
--subst-var-by sh ${bash}/bin/bash
@ -101,7 +101,7 @@ in stdenv.mkDerivation rec {
substituteInPlace src/python/native_common/ext_modules.py.in \
--replace "-lprotobuf" \
"${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"
"${pythonProtobuf.protobuf}/lib/libprotobuf.so"
substituteInPlace src/slave/containerizer/mesos/isolators/gpu/volume.cpp \
--subst-var-by cp ${coreutils}/bin/cp \
@ -126,7 +126,7 @@ in stdenv.mkDerivation rec {
substituteInPlace src/Makefile.am \
--subst-var-by mavenRepo ${mavenRepo} \
--replace "-lprotobuf" \
"${pythonProtobuf.protobuf.lib}/lib/libprotobuf.a"
"${pythonProtobuf.protobuf}/lib/libprotobuf.so"
'' + lib.optionalString stdenv.isLinux ''

View File

@ -1,10 +0,0 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "2.5.0";
# make sure you test also -A pythonPackages.protobuf
src = fetchurl {
url = "http://protobuf.googlecode.com/files/${version}.tar.bz2";
sha256 = "0xxn9gxhvsgzz2sgmihzf6pf75clr05mqj6218camwrwajpcbgqk";
};
})

View File

@ -1,12 +0,0 @@
{ callPackage, fetchFromGitHub, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "2.6.1";
# make sure you test also -A pythonPackages.protobuf
src = fetchFromGitHub {
owner = "google";
repo = "protobuf";
rev = "v${version}";
sha256 = "03df8zvx2sry3jz2x4pi3l32qyfqa7w8kj8jdbz30nzy0h7aa070";
};
})

View File

@ -1,6 +0,0 @@
{ callPackage, ... }:
callPackage ./generic-v3.nix {
version = "3.0.0-beta-2";
sha256 = "0cbr1glgma5vakabsjwcs41pcnn8yphhn037l0zd121zb9gdaqc1";
}

View File

@ -1,6 +0,0 @@
{ callPackage, ... }:
callPackage ./generic-v3.nix {
version = "3.0.2";
sha256 = "16wmr1fgdqpf84fkq90cxvccfsxx7h0q0wzqkbg8vdjmka412g09";
}

View File

@ -1,6 +0,0 @@
{ callPackage, lib, ... }:
lib.overrideDerivation (callPackage ./generic-v3.nix {
version = "3.2.0";
sha256 = "120g0bg7ichry74allgmqnh7k0z2sdnrrfklb58b7szzn4zcdz14";
}) (attrs: { NIX_CFLAGS_COMPILE = "-Wno-error"; })

View File

@ -1,6 +0,0 @@
{ callPackage, lib, ... }:
lib.overrideDerivation (callPackage ./generic-v3.nix {
version = "3.3.0";
sha256 = "1258yz9flyyaswh3izv227kwnhwcxn4nwavdz9iznqmh24qmi59w";
}) (attrs: { NIX_CFLAGS_COMPILE = "-Wno-error"; })

View File

@ -8,7 +8,7 @@
, linuxPackages ? null
, numpy
, six
, protobuf3_2
, protobuf
, swig
, werkzeug
, mock
@ -94,7 +94,7 @@ buildPythonPackage rec {
);
propagatedBuildInputs = with stdenv.lib;
[ numpy six protobuf3_2 swig werkzeug mock ]
[ numpy six protobuf swig werkzeug mock ]
++ optionals cudaSupport [ cudatoolkit cudnn stdenv.cc ];
# Note that we need to run *after* the fixup phase because the

View File

@ -63,7 +63,7 @@ in p.pkgs.buildPythonPackage rec {
];
buildInputs = with p.pkgs; [
beautifulsoup4 flask pytz pytest pytestrunner protobuf3_2 glibcLocales
beautifulsoup4 flask pytz pytest pytestrunner protobuf glibcLocales
];
meta = with stdenv.lib; {

View File

@ -6354,7 +6354,7 @@ with pkgs;
mesos = callPackage ../applications/networking/cluster/mesos {
sasl = cyrus_sasl;
inherit (pythonPackages) python boto setuptools wrapPython;
pythonProtobuf = pythonPackages.protobuf2_6;
pythonProtobuf = pythonPackages.protobuf;
perf = linuxPackages.perf;
};
@ -9987,17 +9987,11 @@ with pkgs;
postgis = callPackage ../development/libraries/postgis { };
protobuf = protobuf3_4;
protobuf3_0 = lowPrio (callPackage ../development/libraries/protobuf/3.0.nix { });
protobuf3_1 = callPackage ../development/libraries/protobuf/3.1.nix { };
protobuf3_2 = callPackage ../development/libraries/protobuf/3.2.nix { };
protobuf3_3 = callPackage ../development/libraries/protobuf/3.3.nix { };
protobuf3_4 = callPackage ../development/libraries/protobuf/3.4.nix { };
protobuf2_6 = callPackage ../development/libraries/protobuf/2.6.nix { };
protobuf2_5 = callPackage ../development/libraries/protobuf/2.5.nix { };
protobuf = callPackage ../development/libraries/protobuf/3.4.nix { };
protobufc = protobufc1_3;
protobufc1_3 = callPackage ../development/libraries/protobufc/1.3.nix { };
protobuf3_1 = callPackage ../development/libraries/protobuf/3.1.nix { };
protobufc = callPackage ../development/libraries/protobufc/1.3.nix { };
flatbuffers = callPackage ../development/libraries/flatbuffers { };

View File

@ -16341,35 +16341,16 @@ in {
});
protobuf = self.protobuf3_4;
protobuf3_4 = callPackage ../development/python-modules/protobuf.nix {
protobuf = callPackage ../development/python-modules/protobuf.nix {
disabled = isPyPy;
doCheck = !isPy3k;
protobuf = pkgs.protobuf3_4;
protobuf = pkgs.protobuf;
};
protobuf3_3 = callPackage ../development/python-modules/protobuf.nix {
protobuf3_1 = callPackage ../development/python-modules/protobuf.nix {
disabled = isPyPy;
doCheck = !isPy3k;
protobuf = pkgs.protobuf3_3;
};
protobuf3_2 = callPackage ../development/python-modules/protobuf.nix {
disabled = isPyPy;
doCheck = !isPy3k;
protobuf = pkgs.protobuf3_2;
};
protobuf3_0 = callPackage ../development/python-modules/protobuf.nix {
disabled = isPyPy;
doCheck = !isPy3k;
protobuf = pkgs.protobuf3_0;
};
protobuf2_6 = callPackage ../development/python-modules/protobuf.nix {
disabled = isPy3k || isPyPy;
doCheck = false;
protobuf = pkgs.protobuf2_6;
};
protobuf2_5 = callPackage ../development/python-modules/protobuf.nix {
disabled = isPy3k || isPyPy;
protobuf = pkgs.protobuf2_5;
protobuf = pkgs.protobuf3_1;
};
psd-tools = callPackage ../development/python-modules/psd-tools { };