1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

libuv: 1.7.5 -> 1.9.0

This commit is contained in:
Tobias Pflug 2016-04-25 16:04:22 +02:00
parent 25c35529f4
commit 7dcf75bdd4
3 changed files with 21 additions and 79 deletions

View file

@ -2,9 +2,23 @@
, ApplicationServices, CoreServices }: , ApplicationServices, CoreServices }:
let stdenv.mkDerivation rec {
stable = "stable"; version = "1.9.0";
unstable = "unstable"; name = "libuv-${version}";
src = fetchFromGitHub {
owner = "libuv";
repo = "libuv";
rev = "v${version}";
sha256 = "0sq8c8n7xixn2xxp35crprvh35ry18i5mcxgwh12lydwv9ks0d4k";
};
buildInputs = [ automake autoconf libtool pkgconfig ]
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
preConfigure = ''
LIBTOOLIZE=libtoolize ./autogen.sh
'';
meta = with lib; { meta = with lib; {
description = "A multi-platform support library with a focus on asynchronous I/O"; description = "A multi-platform support library with a focus on asynchronous I/O";
@ -13,73 +27,4 @@ let
platforms = with platforms; linux ++ darwin; platforms = with platforms; linux ++ darwin;
}; };
mkName = stability: version: }
if stability == stable
then "libuv-${version}"
else "libuv-${stability}-${version}";
mkSrc = version: sha256: fetchFromGitHub {
owner = "libuv";
repo = "libuv";
rev = "v${version}";
inherit sha256;
};
# 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
rm -r build/src
rm build/libuv.a
cp -r include build
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;
};
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";
}

View file

@ -8037,12 +8037,9 @@ in
then darwin.libunwind then darwin.libunwind
else callPackage ../development/libraries/libunwind { }; else callPackage ../development/libraries/libunwind { };
libuvVersions = recurseIntoAttrs (callPackage ../development/libraries/libuv { libuv = callPackage ../development/libraries/libuv {
automake = automake113x; # fails with 14
inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices; inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices;
}); };
libuv = self.libuvVersions.v1_7_5;
libv4l = lowPrio (self.v4l_utils.override { libv4l = lowPrio (self.v4l_utils.override {
alsaLib = null; alsaLib = null;

View file

@ -22288,7 +22288,7 @@ in modules // {
patches = [ ../development/python-modules/pyuv-external-libuv.patch ]; patches = [ ../development/python-modules/pyuv-external-libuv.patch ];
buildInputs = with self; [ pkgs.libuvVersions.v0_11_29 ]; buildInputs = with self; [ pkgs.libuv ];
meta = { meta = {
description = "Python interface for libuv"; description = "Python interface for libuv";