diff options
author | Nikolay Amiantov <ab@fmap.me> | 2017-10-17 03:40:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-17 03:40:58 +0300 |
commit | 35ad024fa413dd13c8d43376e1959db51925d3e8 (patch) | |
tree | becd6097b4a047c9d15644a4c4095fa35d5d87d8 /pkgs | |
parent | 3d1dee36927f436eb558e6155a70f4e9cda87d1d (diff) | |
parent | b1e499788c72f33ddacf5e7cc88b921681633c0c (diff) | |
download | nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar.gz nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar.bz2 nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar.lz nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar.xz nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.tar.zst nixlib-35ad024fa413dd13c8d43376e1959db51925d3e8.zip |
Merge pull request #29814 from abbradar/new-boost
Update Boost to 1.65 and make it default
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/altcoins/default.nix | 3 | ||||
-rw-r--r-- | pkgs/applications/editors/rstudio/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/science/logic/aiger/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/science/machine-learning/sc2-headless/default.nix | 54 | ||||
-rw-r--r-- | pkgs/build-support/build-fhs-userenv/env.nix | 1 | ||||
-rw-r--r-- | pkgs/development/libraries/boost/1.65.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 15 | ||||
-rw-r--r-- | pkgs/games/steam/chrootenv.nix | 12 | ||||
-rw-r--r-- | pkgs/games/steam/default.nix | 10 | ||||
-rw-r--r-- | pkgs/games/steam/runtime-wrapped.nix | 20 | ||||
-rw-r--r-- | pkgs/games/steam/runtime.nix | 19 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 22 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 6 |
13 files changed, 134 insertions, 50 deletions
diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix index 0264ce397762..1a21efc32322 100644 --- a/pkgs/applications/altcoins/default.nix +++ b/pkgs/applications/altcoins/default.nix @@ -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 { @@ -59,6 +59,5 @@ rec { zcash = callPackage ./zcash { withGui = false; openssl = openssl_1_1_0; - boost = boost163; }; } diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index bf8374fdaaa1..a5049e4236b3 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -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 }: @@ -10,7 +10,9 @@ in stdenv.mkDerivation rec { 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 { 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/ ''; + enableParallelBuilding = true; + cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=$NIX_QT5_TMP/bin/qmake" ]; desktopItem = makeDesktopItem { diff --git a/pkgs/applications/science/logic/aiger/default.nix b/pkgs/applications/science/logic/aiger/default.nix index 2b959c72d379..1a60c5e148cc 100644 --- a/pkgs/applications/science/logic/aiger/default.nix +++ b/pkgs/applications/science/logic/aiger/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "1.9.9"; src = fetchurl { - url = "http://fmv.jku/aiger/${name}.tar.gz"; + url = "http://fmv.jku.at/aiger/${name}.tar.gz"; sha256 = "1ish0dw0nf9gyghxsdhpy1jjiy5wp54c993swp85xp7m6vdx6l0y"; }; diff --git a/pkgs/applications/science/machine-learning/sc2-headless/default.nix b/pkgs/applications/science/machine-learning/sc2-headless/default.nix new file mode 100644 index 000000000000..c06bfc04e07c --- /dev/null +++ b/pkgs/applications/science/machine-learning/sc2-headless/default.nix @@ -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; + }; + }; +} diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix index 9c228b391147..da8a86b68f5d 100644 --- a/pkgs/build-support/build-fhs-userenv/env.nix +++ b/pkgs/build-support/build-fhs-userenv/env.nix @@ -54,6 +54,7 @@ let export PATH='/run/wrappers/bin:/usr/bin:/usr/sbin' # 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_LDFLAGS_BEFORE='-L/usr/lib -L/usr/lib32' export PKG_CONFIG_PATH=/usr/lib/pkgconfig diff --git a/pkgs/development/libraries/boost/1.65.nix b/pkgs/development/libraries/boost/1.65.nix new file mode 100644 index 000000000000..9837e1c69193 --- /dev/null +++ b/pkgs/development/libraries/boost/1.65.nix @@ -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"; + }; + +}) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 22ef02023f88..3f9ae113f849 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -9,6 +9,8 @@ , enableStatic ? !enableShared , enablePIC ? false , enableExceptions ? false +, enablePython ? hostPlatform == buildPlatform +, enableNumpy ? false, numpy ? null , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , patches ? null , mpi ? null @@ -21,6 +23,9 @@ # We must build at least one type of libraries assert !enableShared -> enableStatic; +assert enablePython -> hostPlatform == buildPlatform; +assert enableNumpy -> enablePython; + with stdenv.lib; let @@ -62,7 +67,8 @@ let ] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ [ "link=${link}" "${cflags}" - ] ++ optional (variant == "release") "debug-symbols=off"; + ] ++ optional (variant == "release") "debug-symbols=off" + ++ optional (!enablePython) "--without-python"; nativeB2Flags = [ "-sEXPAT_INCLUDE=${expat.dev}/include" @@ -76,7 +82,6 @@ let "-sEXPAT_LIBPATH=${expat.crossDrv}/lib" "--user-config=user-config.jam" "toolset=gcc-cross" - "--without-python" ] ++ optionals (hostPlatform.libc == "msvcrt") [ "target-os=windows" "threadapi=win32" @@ -148,8 +153,10 @@ stdenv.mkDerivation { enableParallelBuilding = true; buildInputs = [ expat zlib bzip2 libiconv ] - ++ stdenv.lib.optionals (hostPlatform == buildPlatform) [ python icu ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + ++ optional (hostPlatform == buildPlatform) icu + ++ optional stdenv.isDarwin fixDarwinDylibNames + ++ optional enablePython python + ++ optional enableNumpy numpy; configureScript = "./bootstrap.sh"; configureFlags = commonConfigureFlags diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 0c59821bdd26..856e4f6c6c15 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -1,5 +1,5 @@ { stdenv, lib, writeScript, buildFHSUserEnv, steam -, steam-runtime, steam-runtime-i686 ? null +, steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null , withJava ? false , withPrimus ? false , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs @@ -69,9 +69,9 @@ in buildFHSUserEnv rec { extraBuildCommands = '' mkdir -p steamrt - ln -s ../lib/steam-runtime steamrt/${steam-runtime.arch} - ${lib.optionalString (steam-runtime-i686 != null) '' - ln -s ../lib32/steam-runtime steamrt/${steam-runtime-i686.arch} + ln -s ../lib/steam-runtime steamrt/${steam-runtime-wrapped.arch} + ${lib.optionalString (steam-runtime-wrapped-i686 != null) '' + ln -s ../lib32/steam-runtime steamrt/${steam-runtime-wrapped-i686.arch} ''} ''; @@ -96,8 +96,8 @@ in buildFHSUserEnv rec { inherit multiPkgs extraBuildCommands; runScript = - let ldPath = map (x: "/steamrt/${steam-runtime.arch}/" + x) steam-runtime.libs - ++ lib.optionals (steam-runtime-i686 != null) (map (x: "/steamrt/${steam-runtime-i686.arch}/" + x) steam-runtime-i686.libs); + let ldPath = map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.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" '' #!${stdenv.shell} run="$1" diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix index ae3fe561272f..54805e91b2bd 100644 --- a/pkgs/games/steam/default.nix +++ b/pkgs/games/steam/default.nix @@ -4,14 +4,18 @@ let callPackage = newScope self; 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-wrapped = callPackage ./runtime-wrapped.nix { }; steam = callPackage ./steam.nix { }; steam-fonts = callPackage ./fonts.nix { }; steam-chrootenv = callPackage ./chrootenv.nix { - steam-runtime-i686 = - if pkgs.system == "x86_64-linux" - then pkgs.pkgsi686Linux.steamPackages.steam-runtime + steam-runtime-wrapped-i686 = + if steamArch == "amd64" + then pkgs.pkgsi686Linux.steamPackages.steam-runtime-wrapped else null; }; }; diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix index 3d614bda31e4..1ec9fc7d5d97 100644 --- a/pkgs/games/steam/runtime-wrapped.nix +++ b/pkgs/games/steam/runtime-wrapped.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, perl, pkgs, steam-runtime +{ stdenv, steamArch, lib, perl, pkgs, steam-runtime , nativeOnly ? false , runtimeOnly ? false }: @@ -96,6 +96,13 @@ let 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 { name = "steam-runtime-wrapped"; @@ -103,10 +110,13 @@ in stdenv.mkDerivation rec { builder = ./build-wrapped.sh; + passthru = { + inherit gnuArch libs bins; + arch = steamArch; + }; + installPhase = '' - buildDir "${toString steam-runtime.libs}" "${toString (map lib.getLib allPkgs)}" - buildDir "${toString steam-runtime.bins}" "${toString (map lib.getBin allPkgs)}" + buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}" + buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}" ''; - - meta.hydraPlatforms = []; } diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index fa1da4791963..82fce93a66ae 100644 --- a/pkgs/games/steam/runtime.nix +++ b/pkgs/games/steam/runtime.nix @@ -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" - else if stdenv.system == "i686-linux" then "i386" - else abort "Unsupported platform"; - - input = builtins.getAttr arch (import ./runtime-generated.nix { inherit fetchurl; }); +let input = builtins.getAttr steamArch (import ./runtime-generated.nix { inherit fetchurl; }); inputFile = writeText "steam-runtime.json" (builtins.toJSON input); @@ -18,17 +14,6 @@ in stdenv.mkDerivation { 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; { description = "The official runtime used by Steam"; homepage = https://github.com/ValveSoftware/steam-runtime; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6bb47e2ce56a..b8f8abca1d07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -645,9 +645,7 @@ with pkgs; }; aria = aria2; - aspcud = callPackage ../tools/misc/aspcud { - boost = boost163; - }; + aspcud = callPackage ../tools/misc/aspcud { }; at = callPackage ../tools/system/at { }; @@ -1402,9 +1400,7 @@ with pkgs; citrix_receiver = callPackage ../applications/networking/remote/citrix-receiver { }; - citra = libsForQt5.callPackage ../misc/emulators/citra { - boost = boost163; - }; + citra = libsForQt5.callPackage ../misc/emulators/citra { }; cmst = libsForQt5.callPackage ../tools/networking/cmst { }; @@ -7824,8 +7820,9 @@ with pkgs; boost162 = callPackage ../development/libraries/boost/1.62.nix { }; boost163 = callPackage ../development/libraries/boost/1.63.nix { }; boost164 = callPackage ../development/libraries/boost/1.64.nix { }; - boost16x = boost164; - boost = boost162; + boost165 = callPackage ../development/libraries/boost/1.65.nix { }; + boost16x = boost165; + boost = boost16x; boost_process = callPackage ../development/libraries/boost-process { }; @@ -17941,6 +17938,9 @@ with pkgs; }; steam-run = steam.run; + steam-run-native = (steam.override { + nativeOnly = true; + }).run; stepmania = callPackage ../games/stepmania { ffmpeg = ffmpeg_2; @@ -18323,6 +18323,12 @@ with pkgs; 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 arpack = callPackage ../development/libraries/science/math/arpack { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 231d5fecf6ba..f7d2ce160ca9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1476,7 +1476,10 @@ in { # Build boost for this specific Python version # 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 { name = "buttersink-0.6.8"; @@ -1531,7 +1534,6 @@ in { python = self.python; boost = self.boost; numpy = self.numpy; - pythonSupport = true; }; capstone = buildPythonPackage rec { |