From f804a8ff98b4a2550d4e854fa7506e1fe56d33d6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 16 Oct 2017 17:46:06 +0200 Subject: [PATCH 01/13] encrypted devices: don't override default cryptoModules --- nixos/modules/tasks/encrypted-devices.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/tasks/encrypted-devices.nix b/nixos/modules/tasks/encrypted-devices.nix index 6bbf335e7db..0b4c41a0f2a 100644 --- a/nixos/modules/tasks/encrypted-devices.nix +++ b/nixos/modules/tasks/encrypted-devices.nix @@ -67,7 +67,6 @@ in luks = { devices = map (dev: { name = dev.encrypted.label; device = dev.encrypted.blkDev; } ) keylessEncDevs; - cryptoModules = [ "aes" "sha256" "sha1" "xts" ]; forceLuksSupportInInitrd = true; }; postMountCommands = From 77be4d91f7448636749049672dc78c0d08ea3d45 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 16 Oct 2017 17:46:46 +0200 Subject: [PATCH 02/13] encrypted devices: provide working example --- nixos/modules/tasks/encrypted-devices.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/encrypted-devices.nix b/nixos/modules/tasks/encrypted-devices.nix index 0b4c41a0f2a..da0c9408d89 100644 --- a/nixos/modules/tasks/encrypted-devices.nix +++ b/nixos/modules/tasks/encrypted-devices.nix @@ -36,7 +36,7 @@ let keyFile = mkOption { default = null; - example = "/root/.swapkey"; + example = "/mnt-root/root/.swapkey"; type = types.nullOr types.str; description = "File system location of keyfile. This unlocks the drive after the root has been mounted to /mnt-root."; }; From cd52a3d53cd9bd0d23975147c025f9f6b8a58c9f Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 16 Oct 2017 13:01:40 -0500 Subject: [PATCH 03/13] aiger: fix stupid incorrect download link Signed-off-by: Austin Seipp --- pkgs/applications/science/logic/aiger/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/logic/aiger/default.nix b/pkgs/applications/science/logic/aiger/default.nix index 2b959c72d37..1a60c5e148c 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"; }; From 774d05878a9c50400cb6556044dd3ae9d833e2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 16 Oct 2017 19:36:08 +0200 Subject: [PATCH 04/13] nixos/tests: unbreak prometheus test Commit 271d3f7a432f ("prometheus service: globalConfig.labels is obsolete") removed globalConfig.labels. Update the test config accordingly. --- nixos/tests/prometheus.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix index ade097597bb..374fb2d634b 100644 --- a/nixos/tests/prometheus.nix +++ b/nixos/tests/prometheus.nix @@ -5,9 +5,6 @@ import ./make-test.nix { one = { config, pkgs, ... }: { services.prometheus = { enable = true; - globalConfig = { - labels = { foo = "bar"; }; - }; scrapeConfigs = [{ job_name = "prometheus"; static_configs = [{ From 12d6fed2ba3d6ad40f493e320fe55995166783fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 16 Oct 2017 19:36:13 +0200 Subject: [PATCH 05/13] nixos/tests: enable prometheus test As far as I can tell, we've had this test since 2015, but it was never enabled. --- nixos/release.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/release.nix b/nixos/release.nix index fecd8ce00e3..63f739e8e89 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -308,6 +308,7 @@ in rec { tests.postgis = callTest tests/postgis.nix {}; #tests.pgjwt = callTest tests/pgjwt.nix {}; tests.printing = callTest tests/printing.nix {}; + tests.prometheus = callTest tests/prometheus.nix {}; tests.proxy = callTest tests/proxy.nix {}; tests.pumpio = callTest tests/pump.io.nix {}; # tests.quagga = callTest tests/quagga.nix {}; From 38ffe0e1f6bcce05c7f209666354f3487b512149 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 16 Oct 2017 02:58:04 +0300 Subject: [PATCH 06/13] steam-run-native: init Refactor Steam so that native steam-run can be built as a free package and expose it so that Hydra builds needed i686 packages. --- pkgs/games/steam/chrootenv.nix | 12 ++++++------ pkgs/games/steam/default.nix | 10 +++++++--- pkgs/games/steam/runtime-wrapped.nix | 22 ++++++++++++++++------ pkgs/games/steam/runtime.nix | 19 ++----------------- pkgs/top-level/all-packages.nix | 3 +++ 5 files changed, 34 insertions(+), 32 deletions(-) diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 0c59821bdd2..856e4f6c6c1 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 ae3fe561272..54805e91b2b 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 3d614bda31e..1ec9fc7d5d9 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; - installPhase = '' - buildDir "${toString steam-runtime.libs}" "${toString (map lib.getLib allPkgs)}" - buildDir "${toString steam-runtime.bins}" "${toString (map lib.getBin allPkgs)}" - ''; + passthru = { + inherit gnuArch libs bins; + arch = steamArch; + }; - meta.hydraPlatforms = []; + installPhase = '' + buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}" + buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}" + ''; } diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index fa1da479196..82fce93a66a 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 d6394c53b6e..5396e984b91 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17942,6 +17942,9 @@ with pkgs; }; steam-run = steam.run; + steam-run-native = (steam.override { + nativeOnly = true; + }).run; stepmania = callPackage ../games/stepmania { ffmpeg = ffmpeg_2; From 188a413ebc0d89f67cb239255ea97f5d147f3b35 Mon Sep 17 00:00:00 2001 From: Dan Haraj Date: Mon, 16 Oct 2017 15:56:07 -0400 Subject: [PATCH 07/13] sc2-headless: init at 3.17 This packages up the Starcraft II headless Linux client provided by Blizzard for machine learning research. --- .../machine-learning/sc2-headless/default.nix | 53 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++ 2 files changed, 59 insertions(+) create mode 100644 pkgs/applications/science/machine-learning/sc2-headless/default.nix 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 00000000000..cf6c3f89920 --- /dev/null +++ b/pkgs/applications/science/machine-learning/sc2-headless/default.nix @@ -0,0 +1,53 @@ +{ 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"; + }; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5396e984b91..6057489c565 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18327,6 +18327,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 { }; From 6e1f864fd079b819cfdc1fd5dc874bedc4b3ca38 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 16 Oct 2017 17:06:48 -0400 Subject: [PATCH 08/13] sc2-headless: License is unfree I wrongly assumed that was the default when reviewing the PR. --- .../science/machine-learning/sc2-headless/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/machine-learning/sc2-headless/default.nix b/pkgs/applications/science/machine-learning/sc2-headless/default.nix index cf6c3f89920..c06bfc04e07 100644 --- a/pkgs/applications/science/machine-learning/sc2-headless/default.nix +++ b/pkgs/applications/science/machine-learning/sc2-headless/default.nix @@ -48,6 +48,7 @@ stdenv.mkDerivation rec { license = { fullName = "BLIZZARD® STARCRAFT® II AI AND MACHINE LEARNING LICENSE"; url = "https://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html"; + free = false; }; }; } From 2a036ca1a5eafdaed11be14d14a91c3b24508379 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 16 Oct 2017 22:06:05 +0300 Subject: [PATCH 09/13] buildFHSEnv: fix NIX_* compiler flags This is needed now after #27672. --- pkgs/build-support/build-fhs-userenv/env.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix index 9c228b39114..da8a86b68f5 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 From 23ea2e931f708a16eca9a8de5bb81d41bd7a47fa Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 17 Sep 2017 07:04:49 +0300 Subject: [PATCH 10/13] boost165: init at 1.65.1 --- pkgs/development/libraries/boost/1.65.nix | 12 ++++++++++++ pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/boost/1.65.nix diff --git a/pkgs/development/libraries/boost/1.65.nix b/pkgs/development/libraries/boost/1.65.nix new file mode 100644 index 00000000000..9837e1c6919 --- /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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7eb088e7447..9a1a4679309 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7776,7 +7776,8 @@ 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; + boost165 = callPackage ../development/libraries/boost/1.65.nix { }; + boost16x = boost165; boost = boost162; boost_process = callPackage ../development/libraries/boost-process { }; From b1736511cedee31dbc76bf48da1de9904d4825b7 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 17 Sep 2017 07:08:28 +0300 Subject: [PATCH 11/13] boost: make 1.65 the default --- pkgs/applications/altcoins/default.nix | 3 +-- pkgs/applications/editors/rstudio/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 10 +++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix index 0264ce39776..1a21efc3232 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 bf8374fdaaa..80f020b6c50 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,7 @@ 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 ]; + buildInputs = [ cmake boost zlib openssl R qt5.full qt5.qtwebkit qt5.qtwebchannel libuuid unzip ant jdk makeWrapper pandoc ]; src = fetchurl { url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf16b071684..487b32526d8 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 { }; @@ -7826,7 +7822,7 @@ with pkgs; boost164 = callPackage ../development/libraries/boost/1.64.nix { }; boost165 = callPackage ../development/libraries/boost/1.65.nix { }; boost16x = boost165; - boost = boost162; + boost = boost16x; boost_process = callPackage ../development/libraries/boost-process { }; From e2a7f508fc2e3ef665ce6a66bd9bc753dfdf13f5 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 26 Sep 2017 21:23:10 +0300 Subject: [PATCH 12/13] rstudio: enable parallel building Also cleanup inputs. --- pkgs/applications/editors/rstudio/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 80f020b6c50..a5049e4236b 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -10,7 +10,9 @@ in stdenv.mkDerivation rec { name = "RStudio-${version}"; - buildInputs = [ cmake boost 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 { From b1e499788c72f33ddacf5e7cc88b921681633c0c Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 23 Sep 2017 09:54:46 +0300 Subject: [PATCH 13/13] boost: add numpy support Not built by default. Also add enablePython flag (enabled by default) and cleanup a bit. --- pkgs/development/libraries/boost/generic.nix | 15 +++++++++++---- pkgs/top-level/python-packages.nix | 6 ++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 22ef02023f8..3f9ae113f84 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 231d5fecf6b..f7d2ce160ca 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 {