Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libuv: 1.7.5 -> 1.9.0 #14973

Merged
merged 2 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 16 additions & 71 deletions pkgs/development/libraries/libuv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,29 @@

, ApplicationServices, CoreServices }:

let
stable = "stable";
unstable = "unstable";
stdenv.mkDerivation rec {
version = "1.9.0";
name = "libuv-${version}";

meta = with lib; {
description = "A multi-platform support library with a focus on asynchronous I/O";
homepage = https://github.com/libuv/libuv;
maintainers = with maintainers; [ cstrahan ];
platforms = with platforms; linux ++ darwin;
};

mkName = stability: version:
if stability == stable
then "libuv-${version}"
else "libuv-${stability}-${version}";

mkSrc = version: sha256: fetchFromGitHub {
src = fetchFromGitHub {
owner = "libuv";
repo = "libuv";
rev = "v${version}";
inherit sha256;
sha256 = "0sq8c8n7xixn2xxp35crprvh35ry18i5mcxgwh12lydwv9ks0d4k";
};

# for versions < 0.11.6
mkWithoutAutotools = stability: version: sha256: stdenv.mkDerivation {
name = mkName stability version;
src = mkSrc version sha256;
buildPhase = lib.optionalString stdenv.isDarwin ''
mkdir extrapath
ln -s /usr/sbin/dtrace extrapath/dtrace
export PATH=$PATH:`pwd`/extrapath
'' + ''
mkdir build
make builddir_name=build
buildInputs = [ automake autoconf libtool pkgconfig ]
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];

rm -r build/src
rm build/libuv.a
cp -r include build
preConfigure = ''
LIBTOOLIZE=libtoolize ./autogen.sh
'';

mkdir build/lib
mv build/libuv.* build/lib

pushd build/lib
lib=$(basename libuv.*)
ext="''${lib##*.}"
mv $lib libuv.10.$ext
ln -s libuv.10.$ext libuv.$ext
popd
'';
installPhase = ''
cp -r build $out
'';
inherit meta;
};

# for versions > 0.11.6
mkWithAutotools = stability: version: sha256: stdenv.mkDerivation {
name = mkName stability version;
src = mkSrc version sha256;
buildInputs = [ automake autoconf libtool pkgconfig ]
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
preConfigure = ''
LIBTOOLIZE=libtoolize ./autogen.sh
'';
inherit meta;
meta = with lib; {
description = "A multi-platform support library with a focus on asynchronous I/O";
homepage = https://github.com/libuv/libuv;
maintainers = with maintainers; [ cstrahan ];
platforms = with platforms; linux ++ darwin;
};

toVersion = with lib; name:
replaceChars ["_"] ["."] (removePrefix "v" name);

in

with lib;

mapAttrs (v: h: mkWithAutotools unstable (toVersion v) h) {
v0_11_29 = "1z07phfwryfy2155p3lxcm2a33h20sfl96lds5dghn157x6csz7m";
}
//
mapAttrs (v: h: mkWithAutotools stable (toVersion v) h) {
v1_7_5 = "18x6cy2xn31am97vn6jli7kmb2fbp4c8kmv7jm97vggh0x55flsc";
}
}
22 changes: 10 additions & 12 deletions pkgs/development/python-modules/pyuv-external-libuv.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
diff --git a/setup.py b/setup.py
index ec0caac..2c1fdb6 100644
index 5071c3b..4b4a176 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,6 @@ try:
@@ -7,7 +7,6 @@ try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
-from setup_libuv import libuv_build_ext, libuv_sdist
__version__ = "0.11.5"
@@ -32,12 +31,11 @@ setup(name = "pyuv",


def get_version():
@@ -35,11 +34,10 @@ setup(name = "pyuv",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4"
],
- cmdclass = {'build_ext': libuv_build_ext,
- 'sdist' : libuv_sdist},
ext_modules = [Extension('pyuv',
packages = ['pyuv'],
ext_modules = [Extension('pyuv._cpyuv',
sources = ['src/pyuv.c'],
+ libraries = ['uv'],
define_macros=[('MODULE_VERSION', __version__),
- ('LIBUV_REVISION', libuv_build_ext.libuv_revision)]
+ ('LIBUV_REVISION', 'unknown')]
+ libraries = ['uv']
)]
)

7 changes: 2 additions & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8037,12 +8037,9 @@ in
then darwin.libunwind
else callPackage ../development/libraries/libunwind { };

libuvVersions = recurseIntoAttrs (callPackage ../development/libraries/libuv {
automake = automake113x; # fails with 14
libuv = callPackage ../development/libraries/libuv {
inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices;
});

libuv = self.libuvVersions.v1_7_5;
};

libv4l = lowPrio (self.v4l_utils.override {
alsaLib = null;
Expand Down
6 changes: 3 additions & 3 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22278,17 +22278,17 @@ in modules // {
};

pyuv = buildPythonPackage rec {
name = "pyuv-0.11.5";
name = "pyuv-1.2.0";
disabled = isPyPy; # see https://github.com/saghul/pyuv/issues/49

src = pkgs.fetchurl {
url = "https://github.com/saghul/pyuv/archive/${name}.tar.gz";
sha256 = "c251952cb4e54c92ab0e871decd13cf73d11ca5dba9f92962de51d12e3a310a9";
sha256 = "19yl1l5l6dq1xr8xcv6dhx1avm350nr4v2358iggcx4ma631rycx";
};

patches = [ ../development/python-modules/pyuv-external-libuv.patch ];

buildInputs = with self; [ pkgs.libuvVersions.v0_11_29 ];
buildInputs = with self; [ pkgs.libuv ];

meta = {
description = "Python interface for libuv";
Expand Down