Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/staging' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Apr 24, 2017
2 parents 9f11d17 + 9f0de95 commit cf3800b
Show file tree
Hide file tree
Showing 44 changed files with 785 additions and 470 deletions.
Expand Up @@ -74,11 +74,8 @@ in buildPythonApplication rec {
'';

postFixup = ''
mv $out/bin/qutebrowser $out/bin/.qutebrowser-noqtpath
makeQtWrapper $out/bin/.qutebrowser-noqtpath $out/bin/qutebrowser \
wrapQtProgram $out/bin/qutebrowser \
${lib.optionalString withWebEngineDefault ''--add-flags "--backend webengine"''}
sed -i 's/\.qutebrowser-wrapped/qutebrowser/g' $out/bin/..qutebrowser-wrapped-wrapped
'';

meta = {
Expand Down
3 changes: 3 additions & 0 deletions pkgs/build-support/setup-hooks/make-wrapper.sh
Expand Up @@ -132,6 +132,9 @@ wrapProgram() {
local prog="$1"
local hidden
hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
while [ -e "$hidden" ]; do
hidden="${hidden}_"
done
mv "$prog" "$hidden"
# Silence warning about unexpanded $0:
# shellcheck disable=SC2016
Expand Down
10 changes: 8 additions & 2 deletions pkgs/development/compilers/gcc/5/default.nix
Expand Up @@ -237,10 +237,16 @@ stdenv.mkDerivation ({

# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = if stdenv.isDarwin then ''
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
'' else null;
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';

postPatch =
if (stdenv.isGNU
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/compilers/gcc/builder.sh
Expand Up @@ -212,6 +212,7 @@ postInstall() {
# Move runtime libraries to $lib.
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
moveToOutput "share/gcc-*/python" "$lib"

for i in "$lib"/lib/*.{la,py}; do
Expand All @@ -221,6 +222,7 @@ postInstall() {
if [ -n "$enableMultilib" ]; then
moveToOutput "lib64/lib*.so*" "$lib"
moveToOutput "lib64/lib*.la" "$lib"
moveToOutput "lib64/lib*.dylib" "$lib"

for i in "$lib"/lib64/*.{la,py}; do
substituteInPlace "$i" --replace "$out" "$lib"
Expand Down Expand Up @@ -251,6 +253,16 @@ postInstall() {
done
fi

if type "install_name_tool"; then
for i in "$lib"/lib/*.*.dylib; do
install_name_tool -id "$i" "$i" || true
for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do
new_path=`echo "$old_path" | sed "s,$out,$lib,"`
install_name_tool -change "$old_path" "$new_path" "$i" || true
done
done
fi

# Get rid of some "fixed" header files
rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux}

Expand Down
17 changes: 8 additions & 9 deletions pkgs/development/interpreters/perl/default.nix
Expand Up @@ -36,7 +36,7 @@ let
./no-sys-dirs.patch
]
++ optional stdenv.isSunOS ./ld-shared.patch
++ optional stdenv.isDarwin [ ./cpp-precomp.patch ];
++ optional stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ];

postPatch = ''
pwd="$(type -P pwd)"
Expand Down Expand Up @@ -121,17 +121,16 @@ let

in rec {

perl = perl522;

perl520 = common {
version = "5.20.3";
sha256 = "0jlvpd5l5nk7lzfd4akdg1sw6vinbkj6izclyyr0lrbidfky691m";
perl = perl524;

perl522 = common {
version = "5.22.3";
sha256 = "10q087l1ffdy3gpryr8z540jcnsr0dhm37raicyfqqkyvys1yd8v";
};

perl522 = common {
version = "5.22.2";
sha256 = "1hl3v85ggm027v9h2ycas4z5i3401s2k2l3qpnw8q5mahmiikbc1";
perl524 = common {
version = "5.24.1";
sha256 = "1bqqb5ghfj4486nqr77kgsd8aff6a289jy7n2cdkznwvn34qbhg6";
};

}
13 changes: 13 additions & 0 deletions pkgs/development/interpreters/perl/sw_vers.patch
@@ -0,0 +1,13 @@
diff --git a/hints/darwin.sh b/hints/darwin.sh
index afadf53..80b7533 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -329,7 +329,7 @@ EOM
# sw_vers output what we want
# "ProductVersion: 10.10.5" "10.10"
# "ProductVersion: 10.11" "10.11"
- prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
+ prodvers="10.10"
case "$prodvers" in
10.*)
add_macosx_version_min ccflags $prodvers
29 changes: 23 additions & 6 deletions pkgs/development/interpreters/python/cpython/3.3/default.nix
Expand Up @@ -50,7 +50,17 @@ in stdenv.mkDerivation {

NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";

postPatch = optionalString (x11Support && (tix != null)) ''
# Determinism: The interpreter is patched to write null timestamps when compiling python files.
# This way python doesn't try to update them when we freeze timestamps in nix store.
DETERMINISTIC_BUILD=1;
# Determinism: We fix the hashes of str, bytes and datetime objects.
PYTHONHASHSEED=0;

postPatch = ''
# Determinism
substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"
# # We do not patch `Lib/importlib/_bootstrap_external.py` because it does not exist.
'' + optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';

Expand Down Expand Up @@ -80,31 +90,38 @@ in stdenv.mkDerivation {
fi
done
touch $out/lib/python${majorVersion}/test/__init__.py
ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
paxmark E $out/bin/python${majorVersion}
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
'';
postFixup = ''
# Get rid of retained dependencies on -dev packages, and remove
# some $TMPDIR references to improve binary reproducibility.
# Note that the .pyc file of _sysconfigdata.py should be regenerated!
for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
done
# FIXME: should regenerate this.
rm $out/lib/python${majorVersion}/__pycache__/_sysconfigdata.cpython*
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';

passthru = let
Expand Down
19 changes: 7 additions & 12 deletions pkgs/development/interpreters/python/cpython/3.4/default.nix
Expand Up @@ -132,24 +132,19 @@ in stdenv.mkDerivation {
ln -s "$out/bin/python3-config" "$out/bin/python-config"
ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';

postFixup = ''
# Get rid of retained dependencies on -dev packages, and remove
# some $TMPDIR references to improve binary reproducibility.
# Note that the .pyc file of _sysconfigdata.py should be regenerated!
for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
done
# FIXME: should regenerate this.
rm $out/lib/python${majorVersion}/__pycache__/_sysconfigdata.cpython*
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';

passthru = let
Expand Down
18 changes: 7 additions & 11 deletions pkgs/development/interpreters/python/cpython/3.5/default.nix
Expand Up @@ -134,23 +134,19 @@ in stdenv.mkDerivation {
ln -s "$out/bin/python3-config" "$out/bin/python-config"
ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';

postFixup = ''
# Get rid of retained dependencies on -dev packages, and remove
# some $TMPDIR references to improve binary reproducibility.
# Note that the .pyc file of _sysconfigdata.py should be regenerated!
for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
done
# FIXME: should regenerate this.
rm $out/lib/python${majorVersion}/__pycache__/_sysconfigdata.cpython*
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';

passthru = let
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/interpreters/python/cpython/3.6/default.nix
Expand Up @@ -126,6 +126,13 @@ in stdenv.mkDerivation {
ln -s "$out/bin/python3-config" "$out/bin/python-config"
ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
# Get rid of retained dependencies on -dev packages, and remove
# some $TMPDIR references to improve binary reproducibility.
# Note that the .pyc file of _sysconfigdata.py should be regenerated!
for i in $out/lib/python${majorVersion}/_sysconfigdata*.py $out/lib/python${majorVersion}/config-${majorVersion}m*/Makefile; do
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
done
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/dbus/default.nix
Expand Up @@ -6,8 +6,8 @@ assert x11Support -> libX11 != null
&& libSM != null;

let
version = "1.10.16";
sha256 = "121kqkjsd3vgf8vca8364xl44qa5086h7qy5zs5f1l78ldpbmc57";
version = "1.10.18";
sha256 = "0jjirhw6xwz2ffmbg5kr79108l8i1bdaw7szc67n3qpkygaxsjb0";

self = stdenv.mkDerivation {
name = "dbus-${version}";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/libraries/glib/default.nix
Expand Up @@ -42,16 +42,16 @@ let
ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
'';

ver_maj = "2.50";
ver_min = "3";
ver_maj = "2.52";
ver_min = "1";
in

stdenv.mkDerivation rec {
name = "glib-${ver_maj}.${ver_min}";

src = fetchurl {
url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
sha256 = "82ee94bf4c01459b6b00cb9db0545c2237921e3060c0b74cff13fbc020cfd999";
sha256 = "948c26b817f2d77e2a6cdd5082c60a51bf5dea854890286a1d5d4ccde5ce586f";
};

patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gtk+/3.x.nix
Expand Up @@ -13,15 +13,15 @@ with stdenv.lib;

let
ver_maj = "3.22";
ver_min = "11";
ver_min = "12";
version = "${ver_maj}.${ver_min}";
in
stdenv.mkDerivation rec {
name = "gtk+3-${version}";

src = fetchurl {
url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
sha256 = "db440670cb6f3c098b076df3735fbc4e69359bd605385e87c90ee48344a804ca";
sha256 = "84fae0cefb6a11ee2b4e86b8ac42fe46a3d30b4ad16661d5fc51e8ae03e2a98c";
};

outputs = [ "out" "dev" ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/harfbuzz/default.nix
Expand Up @@ -5,7 +5,7 @@
}:

let
version = "1.4.4";
version = "1.4.5";
inherit (stdenv.lib) optional optionals optionalString;
in

Expand All @@ -14,7 +14,7 @@ stdenv.mkDerivation {

src = fetchurl {
url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.bz2";
sha256 = "0mfj37qr8fw9mzsvk4296fq8vzq909mwlkl2xrjfrfvc8z5gilim";
sha256 = "d0e05438165884f21658154c709075feaf98c93ee5c694b951533ac425a9a711";
};

outputs = [ "out" "dev" ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libav/default.nix
Expand Up @@ -27,7 +27,7 @@ let inherit (stdenv.lib) optional optionals hasPrefix; in
let
result = {
libav_0_8 = libavFun "0.8.20" "0c7a2417c3a01eb74072691bb93ce802ae1be08f";
libav_11 = libavFun "11.8" "d0e93f6b229ae46c49d13ec183b13cfee70a51f0";
libav_11 = libavFun "11.9" "36ed1329099676ff3c970576e03c6a21f2da2e15";
libav_12 = libavFun "12" "4ecde7274621c82a6882b7614d907b28de25cc4e";
};

Expand All @@ -41,7 +41,7 @@ let

patches = []
++ optional (vpxSupport && hasPrefix "0.8." version) ./vpxenc-0.8.17-libvpx-1.5.patch
++ optional (vpxSupport && hasPrefix "11." version) ./vpxenc-11.6-libvpx-1.5.patch;
;

preConfigure = "patchShebangs doc/texi2pod.pl";

Expand Down
22 changes: 0 additions & 22 deletions pkgs/development/libraries/libav/vpxenc-11.6-libvpx-1.5.patch

This file was deleted.

6 changes: 3 additions & 3 deletions pkgs/development/libraries/libssh/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }:

stdenv.mkDerivation rec {
name = "libssh-0.7.4";
name = "libssh-0.7.5";

src = fetchurl {
url = "https://red.libssh.org/attachments/download/210/${name}.tar.xz";
sha256 = "03bcp9ksqp0s1pmwfmzhcknvkxay5k0mjzzxp3rjlifbng1vxq9r";
url = "https://red.libssh.org/attachments/download/218/${name}.tar.xz";
sha256 = "15bh6dm9c50ndddzh3gqcgw7axp3ghrspjpkb1z3dr90vkanvs2l";
};

postPatch = ''
Expand Down

3 comments on commit cf3800b

@vcunat
Copy link
Member

@vcunat vcunat commented on cf3800b Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect the network-manager failure will break many packages: http://hydra.nixos.org/build/51902532

I can't see how the failure started, as there was no change in the package in the meantime. Wild guess: changes in dependencies increased some limits so gcc is no longer able to do the analysis as before (to find the contents of the format string).

@dezgeg
Copy link
Contributor Author

@dezgeg dezgeg commented on cf3800b Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit that fixes it upstream claims it's due to glib upgrade. Temporarily disabled the -Wformat in 0537320.

@vcunat
Copy link
Member

@vcunat vcunat commented on cf3800b Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I didn't notice some things...

Please sign in to comment.