Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions nixos/modules/tasks/encrypted-devices.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 <literal>/mnt-root</literal>.";
};
Expand Down Expand Up @@ -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 =
Expand Down
1 change: 1 addition & 0 deletions nixos/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
3 changes: 0 additions & 3 deletions nixos/tests/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [{
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/altcoins/default.nix
Original file line number Diff line number Diff line change
@@ -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 }:
Copy link
Member

Choose a reason for hiding this comment

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

This build needs both boost155 and boost162?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a subpackage tree, some altcoins seem to need older Boosts.


rec {

Expand Down Expand Up @@ -59,6 +59,5 @@ rec {
zcash = callPackage ./zcash {
withGui = false;
openssl = openssl_1_1_0;
boost = boost163;
};
}
8 changes: 6 additions & 2 deletions pkgs/applications/editors/rstudio/default.nix
Original file line number Diff line number Diff line change
@@ -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
}:

Expand All @@ -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";
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/science/logic/aiger/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
};
};
}
1 change: 1 addition & 0 deletions pkgs/build-support/build-fhs-userenv/env.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/libraries/boost/1.65.nix
Original file line number Diff line number Diff line change
@@ -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";
};

})
15 changes: 11 additions & 4 deletions pkgs/development/libraries/boost/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions pkgs/games/steam/chrootenv.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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}
''}
'';

Expand All @@ -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"
Expand Down
10 changes: 7 additions & 3 deletions pkgs/games/steam/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
20 changes: 15 additions & 5 deletions pkgs/games/steam/runtime-wrapped.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, perl, pkgs, steam-runtime
{ stdenv, steamArch, lib, perl, pkgs, steam-runtime
, nativeOnly ? false
, runtimeOnly ? false
}:
Expand Down Expand Up @@ -96,17 +96,27 @@ 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";

nativeBuildInputs = [ perl ];

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 = [];
}
19 changes: 2 additions & 17 deletions pkgs/games/steam/runtime.nix
Original file line number Diff line number Diff line change
@@ -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);

Expand All @@ -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;
Expand Down
22 changes: 14 additions & 8 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand Down Expand Up @@ -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 { };

Expand Down Expand Up @@ -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 { };

Expand Down Expand Up @@ -17942,6 +17939,9 @@ with pkgs;
};

steam-run = steam.run;
steam-run-native = (steam.override {
nativeOnly = true;
}).run;

stepmania = callPackage ../games/stepmania {
ffmpeg = ffmpeg_2;
Expand Down Expand Up @@ -18324,6 +18324,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 { };
Expand Down
Loading