Merge pull request #29814 from abbradar/new-boost

Update Boost to 1.65 and make it default
This commit is contained in:
Nikolay Amiantov 2017-10-17 03:40:58 +03:00 committed by GitHub
commit 35ad024fa4
16 changed files with 137 additions and 56 deletions

View File

@ -36,7 +36,7 @@ let
keyFile = mkOption { keyFile = mkOption {
default = null; default = null;
example = "/root/.swapkey"; example = "/mnt-root/root/.swapkey";
type = types.nullOr types.str; type = types.nullOr types.str;
description = "File system location of keyfile. This unlocks the drive after the root has been mounted to <literal>/mnt-root</literal>."; description = "File system location of keyfile. This unlocks the drive after the root has been mounted to <literal>/mnt-root</literal>.";
}; };
@ -67,7 +67,6 @@ in
luks = { luks = {
devices = devices =
map (dev: { name = dev.encrypted.label; device = dev.encrypted.blkDev; } ) keylessEncDevs; map (dev: { name = dev.encrypted.label; device = dev.encrypted.blkDev; } ) keylessEncDevs;
cryptoModules = [ "aes" "sha256" "sha1" "xts" ];
forceLuksSupportInInitrd = true; forceLuksSupportInInitrd = true;
}; };
postMountCommands = postMountCommands =

View File

@ -308,6 +308,7 @@ in rec {
tests.postgis = callTest tests/postgis.nix {}; tests.postgis = callTest tests/postgis.nix {};
#tests.pgjwt = callTest tests/pgjwt.nix {}; #tests.pgjwt = callTest tests/pgjwt.nix {};
tests.printing = callTest tests/printing.nix {}; tests.printing = callTest tests/printing.nix {};
tests.prometheus = callTest tests/prometheus.nix {};
tests.proxy = callTest tests/proxy.nix {}; tests.proxy = callTest tests/proxy.nix {};
tests.pumpio = callTest tests/pump.io.nix {}; tests.pumpio = callTest tests/pump.io.nix {};
# tests.quagga = callTest tests/quagga.nix {}; # tests.quagga = callTest tests/quagga.nix {};

View File

@ -5,9 +5,6 @@ import ./make-test.nix {
one = { config, pkgs, ... }: { one = { config, pkgs, ... }: {
services.prometheus = { services.prometheus = {
enable = true; enable = true;
globalConfig = {
labels = { foo = "bar"; };
};
scrapeConfigs = [{ scrapeConfigs = [{
job_name = "prometheus"; job_name = "prometheus";
static_configs = [{ static_configs = [{

View File

@ -1,4 +1,4 @@
{ callPackage, boost155, boost162, boost163, openssl_1_1_0, haskellPackages, darwin, libsForQt5 }: { callPackage, boost155, boost162, openssl_1_1_0, haskellPackages, darwin, libsForQt5 }:
rec { rec {
@ -59,6 +59,5 @@ rec {
zcash = callPackage ./zcash { zcash = callPackage ./zcash {
withGui = false; withGui = false;
openssl = openssl_1_1_0; openssl = openssl_1_1_0;
boost = boost163;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, makeDesktopItem, cmake, boost163, zlib, openssl, { stdenv, fetchurl, fetchpatch, makeDesktopItem, cmake, boost, zlib, openssl,
R, qt5, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, pandoc R, qt5, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, pandoc
}: }:
@ -10,7 +10,9 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "RStudio-${version}"; name = "RStudio-${version}";
buildInputs = [ cmake boost163 zlib openssl R qt5.full qt5.qtwebkit qt5.qtwebchannel libuuid unzip ant jdk makeWrapper pandoc ]; nativeBuildInputs = [ cmake unzip ant jdk makeWrapper pandoc ];
buildInputs = [ boost zlib openssl R qt5.full qt5.qtwebkit qt5.qtwebchannel libuuid ];
src = fetchurl { src = fetchurl {
url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz";
@ -96,6 +98,8 @@ stdenv.mkDerivation rec {
cp ${pandoc}/bin/pandoc dependencies/common/pandoc/ cp ${pandoc}/bin/pandoc dependencies/common/pandoc/
''; '';
enableParallelBuilding = true;
cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=$NIX_QT5_TMP/bin/qmake" ]; cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=$NIX_QT5_TMP/bin/qmake" ];
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "1.9.9"; version = "1.9.9";
src = fetchurl { src = fetchurl {
url = "http://fmv.jku/aiger/${name}.tar.gz"; url = "http://fmv.jku.at/aiger/${name}.tar.gz";
sha256 = "1ish0dw0nf9gyghxsdhpy1jjiy5wp54c993swp85xp7m6vdx6l0y"; sha256 = "1ish0dw0nf9gyghxsdhpy1jjiy5wp54c993swp85xp7m6vdx6l0y";
}; };

View File

@ -0,0 +1,54 @@
{ stdenv
, lib
, fetchurl
, unzip
, licenseAccepted ? false
}:
if !licenseAccepted then throw ''
You must accept the Blizzard® Starcraft® II AI and Machine Learning License at
https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html
by setting nixpkgs config option 'sc2-headless.accept_license = true;'
''
else assert licenseAccepted;
stdenv.mkDerivation rec {
version = "3.17";
name = "sc2-headless-${version}";
src = fetchurl {
url = "https://blzdistsc2-a.akamaihd.net/Linux/SC2.${version}.zip";
sha256 = "1biyxpf7n95hali1pw30h91rhzrj6sbwrx6s52d00mlnwdhmf2v0";
};
unpackCmd = ''
unzip -P 'iagreetotheeula' $curSrc
'';
nativeBuildInputs = [ unzip ];
installPhase = ''
mkdir -p $out
cp -r . "$out"
rm -r $out/Libs
'';
preFixup = ''
find $out -type f -print0 | while IFS=''' read -d ''' -r file; do
isELF "$file" || continue
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath [stdenv.cc.cc stdenv.cc.libc]} \
"$file"
done
'';
meta = {
platforms = stdenv.lib.platforms.linux;
description = "Starcraft II headless linux client for machine learning research";
license = {
fullName = "BLIZZARD® STARCRAFT® II AI AND MACHINE LEARNING LICENSE";
url = "https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html";
free = false;
};
};
}

View File

@ -54,6 +54,7 @@ let
export PATH='/run/wrappers/bin:/usr/bin:/usr/sbin' export PATH='/run/wrappers/bin:/usr/bin:/usr/sbin'
# Force compilers and other tools to look in default search paths # Force compilers and other tools to look in default search paths
export NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST=1
export NIX_CFLAGS_COMPILE='-idirafter /usr/include' export NIX_CFLAGS_COMPILE='-idirafter /usr/include'
export NIX_LDFLAGS_BEFORE='-L/usr/lib -L/usr/lib32' export NIX_LDFLAGS_BEFORE='-L/usr/lib -L/usr/lib32'
export PKG_CONFIG_PATH=/usr/lib/pkgconfig export PKG_CONFIG_PATH=/usr/lib/pkgconfig

View File

@ -0,0 +1,12 @@
{ stdenv, callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.65.1";
src = fetchurl {
url = "mirror://sourceforge/boost/boost_1_65_1.tar.bz2";
# SHA256 from http://www.boost.org/users/history/version_1_65_1.html
sha256 = "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81";
};
})

View File

@ -9,6 +9,8 @@
, enableStatic ? !enableShared , enableStatic ? !enableShared
, enablePIC ? false , enablePIC ? false
, enableExceptions ? false , enableExceptions ? false
, enablePython ? hostPlatform == buildPlatform
, enableNumpy ? false, numpy ? null
, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
, patches ? null , patches ? null
, mpi ? null , mpi ? null
@ -21,6 +23,9 @@
# We must build at least one type of libraries # We must build at least one type of libraries
assert !enableShared -> enableStatic; assert !enableShared -> enableStatic;
assert enablePython -> hostPlatform == buildPlatform;
assert enableNumpy -> enablePython;
with stdenv.lib; with stdenv.lib;
let let
@ -62,7 +67,8 @@ let
] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ [ ] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ [
"link=${link}" "link=${link}"
"${cflags}" "${cflags}"
] ++ optional (variant == "release") "debug-symbols=off"; ] ++ optional (variant == "release") "debug-symbols=off"
++ optional (!enablePython) "--without-python";
nativeB2Flags = [ nativeB2Flags = [
"-sEXPAT_INCLUDE=${expat.dev}/include" "-sEXPAT_INCLUDE=${expat.dev}/include"
@ -76,7 +82,6 @@ let
"-sEXPAT_LIBPATH=${expat.crossDrv}/lib" "-sEXPAT_LIBPATH=${expat.crossDrv}/lib"
"--user-config=user-config.jam" "--user-config=user-config.jam"
"toolset=gcc-cross" "toolset=gcc-cross"
"--without-python"
] ++ optionals (hostPlatform.libc == "msvcrt") [ ] ++ optionals (hostPlatform.libc == "msvcrt") [
"target-os=windows" "target-os=windows"
"threadapi=win32" "threadapi=win32"
@ -148,8 +153,10 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ expat zlib bzip2 libiconv ] buildInputs = [ expat zlib bzip2 libiconv ]
++ stdenv.lib.optionals (hostPlatform == buildPlatform) [ python icu ] ++ optional (hostPlatform == buildPlatform) icu
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; ++ optional stdenv.isDarwin fixDarwinDylibNames
++ optional enablePython python
++ optional enableNumpy numpy;
configureScript = "./bootstrap.sh"; configureScript = "./bootstrap.sh";
configureFlags = commonConfigureFlags configureFlags = commonConfigureFlags

View File

@ -1,5 +1,5 @@
{ stdenv, lib, writeScript, buildFHSUserEnv, steam { stdenv, lib, writeScript, buildFHSUserEnv, steam
, steam-runtime, steam-runtime-i686 ? null , steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null
, withJava ? false , withJava ? false
, withPrimus ? false , withPrimus ? false
, extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
@ -69,9 +69,9 @@ in buildFHSUserEnv rec {
extraBuildCommands = '' extraBuildCommands = ''
mkdir -p steamrt mkdir -p steamrt
ln -s ../lib/steam-runtime steamrt/${steam-runtime.arch} ln -s ../lib/steam-runtime steamrt/${steam-runtime-wrapped.arch}
${lib.optionalString (steam-runtime-i686 != null) '' ${lib.optionalString (steam-runtime-wrapped-i686 != null) ''
ln -s ../lib32/steam-runtime steamrt/${steam-runtime-i686.arch} ln -s ../lib32/steam-runtime steamrt/${steam-runtime-wrapped-i686.arch}
''} ''}
''; '';
@ -96,8 +96,8 @@ in buildFHSUserEnv rec {
inherit multiPkgs extraBuildCommands; inherit multiPkgs extraBuildCommands;
runScript = runScript =
let ldPath = map (x: "/steamrt/${steam-runtime.arch}/" + x) steam-runtime.libs let ldPath = map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs
++ lib.optionals (steam-runtime-i686 != null) (map (x: "/steamrt/${steam-runtime-i686.arch}/" + x) steam-runtime-i686.libs); ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);
in writeScript "steam-run" '' in writeScript "steam-run" ''
#!${stdenv.shell} #!${stdenv.shell}
run="$1" run="$1"

View File

@ -4,14 +4,18 @@ let
callPackage = newScope self; callPackage = newScope self;
self = rec { self = rec {
steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64"
else if pkgs.stdenv.system == "i686-linux" then "i386"
else abort "Unsupported platform";
steam-runtime = callPackage ./runtime.nix { }; steam-runtime = callPackage ./runtime.nix { };
steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { }; steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
steam = callPackage ./steam.nix { }; steam = callPackage ./steam.nix { };
steam-fonts = callPackage ./fonts.nix { }; steam-fonts = callPackage ./fonts.nix { };
steam-chrootenv = callPackage ./chrootenv.nix { steam-chrootenv = callPackage ./chrootenv.nix {
steam-runtime-i686 = steam-runtime-wrapped-i686 =
if pkgs.system == "x86_64-linux" if steamArch == "amd64"
then pkgs.pkgsi686Linux.steamPackages.steam-runtime then pkgs.pkgsi686Linux.steamPackages.steam-runtime-wrapped
else null; else null;
}; };
}; };

View File

@ -1,4 +1,4 @@
{ stdenv, lib, perl, pkgs, steam-runtime { stdenv, steamArch, lib, perl, pkgs, steam-runtime
, nativeOnly ? false , nativeOnly ? false
, runtimeOnly ? false , runtimeOnly ? false
}: }:
@ -96,6 +96,13 @@ let
allPkgs = ourRuntime ++ steamRuntime; allPkgs = ourRuntime ++ steamRuntime;
gnuArch = if steamArch == "amd64" then "x86_64-linux-gnu"
else if steamArch == "i386" then "i386-linux-gnu"
else abort "Unsupported architecture";
libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ];
bins = [ "bin" "usr/bin" ];
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "steam-runtime-wrapped"; name = "steam-runtime-wrapped";
@ -103,10 +110,13 @@ in stdenv.mkDerivation rec {
builder = ./build-wrapped.sh; builder = ./build-wrapped.sh;
installPhase = '' passthru = {
buildDir "${toString steam-runtime.libs}" "${toString (map lib.getLib allPkgs)}" inherit gnuArch libs bins;
buildDir "${toString steam-runtime.bins}" "${toString (map lib.getBin allPkgs)}" arch = steamArch;
''; };
meta.hydraPlatforms = []; installPhase = ''
buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}"
buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}"
'';
} }

View File

@ -1,10 +1,6 @@
{ stdenv, fetchurl, writeText, python2, dpkg, binutils }: { stdenv, steamArch, fetchurl, writeText, python2, dpkg, binutils }:
let arch = if stdenv.system == "x86_64-linux" then "amd64" let input = builtins.getAttr steamArch (import ./runtime-generated.nix { inherit fetchurl; });
else if stdenv.system == "i686-linux" then "i386"
else abort "Unsupported platform";
input = builtins.getAttr arch (import ./runtime-generated.nix { inherit fetchurl; });
inputFile = writeText "steam-runtime.json" (builtins.toJSON input); inputFile = writeText "steam-runtime.json" (builtins.toJSON input);
@ -18,17 +14,6 @@ in stdenv.mkDerivation {
python2 ${./build-runtime.py} -i ${inputFile} -r $out python2 ${./build-runtime.py} -i ${inputFile} -r $out
''; '';
passthru = rec {
inherit arch;
gnuArch = if arch == "amd64" then "x86_64-linux-gnu"
else if arch == "i386" then "i386-linux-gnu"
else abort "Unsupported architecture";
libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ];
bins = [ "bin" "usr/bin" ];
};
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "The official runtime used by Steam"; description = "The official runtime used by Steam";
homepage = https://github.com/ValveSoftware/steam-runtime; homepage = https://github.com/ValveSoftware/steam-runtime;

View File

@ -645,9 +645,7 @@ with pkgs;
}; };
aria = aria2; aria = aria2;
aspcud = callPackage ../tools/misc/aspcud { aspcud = callPackage ../tools/misc/aspcud { };
boost = boost163;
};
at = callPackage ../tools/system/at { }; at = callPackage ../tools/system/at { };
@ -1402,9 +1400,7 @@ with pkgs;
citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver { }; citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver { };
citra = libsForQt5.callPackage ../misc/emulators/citra { citra = libsForQt5.callPackage ../misc/emulators/citra { };
boost = boost163;
};
cmst = libsForQt5.callPackage ../tools/networking/cmst { }; cmst = libsForQt5.callPackage ../tools/networking/cmst { };
@ -7824,8 +7820,9 @@ with pkgs;
boost162 = callPackage ../development/libraries/boost/1.62.nix { }; boost162 = callPackage ../development/libraries/boost/1.62.nix { };
boost163 = callPackage ../development/libraries/boost/1.63.nix { }; boost163 = callPackage ../development/libraries/boost/1.63.nix { };
boost164 = callPackage ../development/libraries/boost/1.64.nix { }; boost164 = callPackage ../development/libraries/boost/1.64.nix { };
boost16x = boost164; boost165 = callPackage ../development/libraries/boost/1.65.nix { };
boost = boost162; boost16x = boost165;
boost = boost16x;
boost_process = callPackage ../development/libraries/boost-process { }; boost_process = callPackage ../development/libraries/boost-process { };
@ -17941,6 +17938,9 @@ with pkgs;
}; };
steam-run = steam.run; steam-run = steam.run;
steam-run-native = (steam.override {
nativeOnly = true;
}).run;
stepmania = callPackage ../games/stepmania { stepmania = callPackage ../games/stepmania {
ffmpeg = ffmpeg_2; ffmpeg = ffmpeg_2;
@ -18323,6 +18323,12 @@ with pkgs;
bwa = callPackage ../applications/science/biology/bwa/default.nix { }; bwa = callPackage ../applications/science/biology/bwa/default.nix { };
### SCIENCE/MACHINE LEARNING
sc2-headless = callPackage ../applications/science/machine-learning/sc2-headless {
licenseAccepted = (config.sc2-headless.accept_license or false);
};
### SCIENCE/MATH ### SCIENCE/MATH
arpack = callPackage ../development/libraries/science/math/arpack { }; arpack = callPackage ../development/libraries/science/math/arpack { };

View File

@ -1476,7 +1476,10 @@ in {
# Build boost for this specific Python version # Build boost for this specific Python version
# TODO: use separate output for libboost_python.so # TODO: use separate output for libboost_python.so
boost = pkgs.boost.override {inherit python;}; boost = pkgs.boost.override {
inherit (self) python numpy;
enablePython = true;
};
buttersink = buildPythonPackage rec { buttersink = buildPythonPackage rec {
name = "buttersink-0.6.8"; name = "buttersink-0.6.8";
@ -1531,7 +1534,6 @@ in {
python = self.python; python = self.python;
boost = self.boost; boost = self.boost;
numpy = self.numpy; numpy = self.numpy;
pythonSupport = true;
}; };
capstone = buildPythonPackage rec { capstone = buildPythonPackage rec {