Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-06-19 00:08:40 +00:00 committed by GitHub
commit 222489e4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 321 additions and 82 deletions

View file

@ -764,7 +764,7 @@
keys = [{
longkeyid = "rsa4096/0xAAA50652F0479205";
fingerprint = "BF8B F725 DA30 E53E 7F11 4ED8 AAA5 0652 F047 9205";
}];
}];
};
ar1a = {
email = "aria@ar1as.space";
@ -5331,7 +5331,7 @@
github = "kho-dialga";
githubId = 55767703;
name = "Iván Brito";
};
};
khumba = {
email = "bog@khumba.net";
github = "khumba";
@ -6026,8 +6026,8 @@
githubId = 7243783;
name = "Bernardo Meurer";
keys = [{
longkeyid = "rsa4096/0xF4C0D53B8D14C246";
fingerprint = "F193 7596 57D5 6DA4 CCD4 786B F4C0 D53B 8D14 C246";
longkeyid = "rsa4096/0xF4C0D53B8D14C246";
fingerprint = "F193 7596 57D5 6DA4 CCD4 786B F4C0 D53B 8D14 C246";
}];
};
lowfatcomputing = {
@ -8247,12 +8247,10 @@
github = "poscat0x04";
githubId = 53291983;
name = "Poscat Tarski";
keys = [
{
longkeyid = "rsa4096/2D2595A00D08ACE0";
fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0";
}
];
keys = [{
longkeyid = "rsa4096/2D2595A00D08ACE0";
fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0";
}];
};
pradeepchhetri = {
email = "pradeep.chhetri89@gmail.com";
@ -9344,6 +9342,16 @@
fingerprint = "A317 37B3 693C 921B 480C C629 4A2A AAA3 82F8 294C";
}];
};
seylerius = {
name = "Sable Seyler";
email = "sable@seyleri.us";
github = "seylerius";
githubId = 1145981;
keys = [{
longkeyid = "rsa4096/0xDC26B921A9E9DBDE";
fingerprint = "7246 B6E1 ABB9 9A48 4395 FD11 DC26 B921 A9E9 DBDE";
}];
};
sfrijters = {
email = "sfrijters@gmail.com";
github = "sfrijters";
@ -9869,10 +9877,10 @@
name = "Felix Bühler";
};
stupremee = {
email = "jutus.k@protonmail.com";
github = "Stupremee";
githubId = 39732259;
name = "Justus K";
email = "jutus.k@protonmail.com";
github = "Stupremee";
githubId = 39732259;
name = "Justus K";
};
SubhrajyotiSen = {
email = "subhrajyoti12@gmail.com";

View file

@ -268,6 +268,52 @@ in {
"CAP_NET_BIND_SERVICE"
"CAP_NET_RAW"
]));
componentsUsingBluetooth = [
# Components that require the AF_BLUETOOTH address family
"bluetooth_tracker"
"bluetooth_le_tracker"
];
componentsUsingSerialDevices = [
# Components that require access to serial devices (/dev/tty*)
# List generated from home-assistant documentation:
# git clone https://github.com/home-assistant/home-assistant.io/
# cd source/_integrations
# rg "/dev/tty" -l | cut -d'/' -f3 | cut -d'.' -f1 | sort
# And then extended by references found in the source code, these
# mostly the ones using config flows already.
"acer_projector"
"alarmdecoder"
"arduino"
"blackbird"
"dsmr"
"edl21"
"elkm1"
"elv"
"enocean"
"firmata"
"flexit"
"gpsd"
"insteon"
"kwb"
"lacrosse"
"mhz19"
"modbus"
"modem_callerid"
"mysensors"
"nad"
"numato"
"rflink"
"rfxtrx"
"scsgate"
"serial"
"serial_pm"
"sms"
"upb"
"velbus"
"w800rf32"
"xbee"
"zha"
];
in {
ExecStart = "${package}/bin/hass --runner --config '${cfg.configDir}'";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
@ -281,11 +327,11 @@ in {
# Hardening
AmbientCapabilities = capabilities;
CapabilityBoundingSet = capabilities;
DeviceAllow = [
DeviceAllow = (optionals (any useComponent componentsUsingSerialDevices) [
"char-ttyACM rw"
"char-ttyAMA rw"
"char-ttyUSB rw"
];
]);
DevicePolicy = "closed";
LockPersonality = true;
MemoryDenyWriteExecute = true;
@ -314,13 +360,15 @@ in {
"AF_INET6"
"AF_NETLINK"
"AF_UNIX"
] ++ optionals (useComponent "bluetooth_tracker" || useComponent "bluetooth_le_tracker") [
] ++ optionals (any useComponent componentsUsingBluetooth) [
"AF_BLUETOOTH"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SupplementaryGroups = [ "dialout" ];
SupplementaryGroups = optionals (any useComponent componentsUsingSerialDevices) [
"dialout"
];
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"

View file

@ -45,6 +45,7 @@ in {
payload_on = "let_there_be_light";
payload_off = "off";
}];
# tests component-based capability assignment (CAP_NET_BIND_SERVICE)
emulated_hue = {
host_ip = "127.0.0.1";
listen_port = 80;
@ -100,6 +101,7 @@ in {
assert "let_there_be_light" in output_log
with subtest("Check systemd unit hardening"):
hass.log(hass.succeed("systemctl show home-assistant.service"))
hass.log(hass.succeed("systemd-analyze security home-assistant.service"))
'';
})

View file

@ -8,13 +8,13 @@
buildGoModule rec {
pname = "bosh-cli";
version = "6.4.3";
version = "6.4.4";
src = fetchFromGitHub {
owner = "cloudfoundry";
repo = pname;
rev = "v${version}";
sha256 = "1glxwk0fv52rjim7ihcxkjx19fsn9k7gzg9zmwxgx8wpsjrdcq3f";
sha256 = "sha256-N7GrxePNewxhHnkQP/XBdUIEL5FsFD4avouZaIO+BKc=";
};
vendorSha256 = null;

View file

@ -16,12 +16,12 @@ with lib;
buildGoPackage rec {
pname = "gitea";
version = "1.14.2";
version = "1.14.3";
# not fetching directly from the git repo, because that lacks several vendor files for the web UI
src = fetchurl {
url = "https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz";
sha256 = "sha256-0EvKk0/ro1YAqvc5yCt8vn2LkRoIbXrFTwcQtomoWsM=";
sha256 = "sha256-ieQxqZO84sYBcCzWYn40tRGLgSs2PpLlcNkI4vFq+wE=";
};
unpackPhase = ''

View file

@ -1,27 +1,53 @@
{ lib, stdenv, fetchurl, fetchFromGitHub
, llvmPackages, ncurses, lua
}:
{ lib, stdenv, fetchFromGitHub, llvmPackages, ncurses, cmake, libxml2
, symlinkJoin, breakpointHook, cudaPackages, enableCUDA ? false }:
let
luajitArchive = "LuaJIT-2.0.5.tar.gz";
luajitSrc = fetchurl {
url = "http://luajit.org/download/${luajitArchive}";
sha256 = "0yg9q4q6v028bgh85317ykc9whgxgysp76qzaqgq55y6jy11yjw7";
luajitRev = "9143e86498436892cb4316550be4d45b68a61224";
luajitBase = "LuaJIT-${luajitRev}";
luajitArchive = "${luajitBase}.tar.gz";
luajitSrc = fetchFromGitHub {
owner = "LuaJIT";
repo = "LuaJIT";
rev = luajitRev;
sha256 = "1zw1yr0375d6jr5x20zvkvk76hkaqamjynbswpl604w6r6id070b";
};
in
stdenv.mkDerivation rec {
llvmMerged = symlinkJoin {
name = "llvmClangMerged";
paths = with llvmPackages; [
llvm.out
llvm.dev
llvm.lib
clang-unwrapped.out
clang-unwrapped.dev
clang-unwrapped.lib
];
};
cuda = cudaPackages.cudatoolkit_11;
clangVersion = llvmPackages.clang-unwrapped.version;
in stdenv.mkDerivation rec {
pname = "terra";
version = "1.0.0pre1175_${builtins.substring 0 7 src.rev}";
version = "1.0.0-beta3_${builtins.substring 0 7 src.rev}";
src = fetchFromGitHub {
owner = "zdevito";
repo = "terra";
rev = "ef6a75ffee15a30f3c74f4e6943851cfbc0fec3d";
sha256 = "0aky17vbv3d9zng34hp17p9zb00dbzwhvzsdjzrrqvk9lmyvix0s";
owner = "terralang";
repo = "terra";
rev = "99ff93f8c60c89bbe2dc7c63eab9bfe2f4c4833e";
sha256 = "0ww54xjvv6p8jwsh6hml3v527zgnv2gj58gpb818bbg4k1jwa5fl";
};
nativeBuildInputs = [ lua ];
buildInputs = with llvmPackages; [ llvm clang-unwrapped ncurses ];
nativeBuildInputs = [ cmake ];
buildInputs = [ llvmMerged ncurses libxml2 ] ++ lib.optional enableCUDA cuda;
cmakeFlags = [
"-DHAS_TERRA_VERSION=0"
"-DTERRA_VERSION=${version}"
"-DTERRA_LUA=luajit"
"-DCLANG_RESOURCE_DIR=${llvmMerged}/lib/clang/${clangVersion}"
] ++ lib.optional enableCUDA "-DTERRA_ENABLE_CUDA=ON";
doCheck = true;
enableParallelBuilding = true;
@ -29,40 +55,36 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "static" ];
patches = [ ./nix-cflags.patch ];
postPatch = ''
substituteInPlace Makefile \
--replace '-lcurses' '-lncurses'
sed -i '/file(DOWNLOAD "''${LUAJIT_URL}" "''${LUAJIT_TAR}")/d' \
cmake/Modules/GetLuaJIT.cmake
substituteInPlace src/terralib.lua \
--subst-var-by NIX_LIBC_INCLUDE ${lib.getDev stdenv.cc.libc}/include
'';
preBuild = ''
cat >Makefile.inc<<EOF
CLANG = ${lib.getBin llvmPackages.clang-unwrapped}/bin/clang
LLVM_CONFIG = ${lib.getBin llvmPackages.llvm}/bin/llvm-config
EOF
preConfigure = ''
mkdir -p build
cp ${luajitSrc} build/${luajitArchive}
ln -s ${luajitSrc} build/${luajitBase}
tar --mode="a+rwX" -chzf build/${luajitArchive} -C build ${luajitBase}
rm build/${luajitBase}
'';
checkPhase = "(cd tests && ../terra run)";
installPhase = ''
install -Dm755 -t $bin/bin release/bin/terra
install -Dm755 -t $out/lib release/lib/terra${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm644 -t $static/lib release/lib/libterra.a
install -Dm755 -t $bin/bin bin/terra
install -Dm755 -t $out/lib lib/terra${stdenv.hostPlatform.extensions.sharedLibrary}
install -Dm644 -t $static/lib lib/libterra_s.a
mkdir -pv $dev/include
cp -rv release/include/terra $dev/include
cp -rv include/terra $dev/include
'';
meta = with lib; {
description = "A low-level counterpart to Lua";
homepage = "http://terralang.org/";
platforms = platforms.x86_64;
maintainers = with maintainers; [ jb55 thoughtpolice ];
license = licenses.mit;
homepage = "http://terralang.org/";
platforms = platforms.x86_64;
maintainers = with maintainers; [ jb55 seylerius thoughtpolice ];
license = licenses.mit;
};
}

View file

@ -1,12 +1,11 @@
diff --git a/src/terralib.lua b/src/terralib.lua
index 351238d..e638c90 100644
index 532ed18..2c265dc 100644
--- a/src/terralib.lua
+++ b/src/terralib.lua
@@ -3395,6 +3395,17 @@ function terra.includecstring(code,cargs,target)
@@ -3426,6 +3426,16 @@ function terra.includecstring(code,cargs,target)
args:insert("-internal-isystem")
args:insert(path)
end
+
+ -- NOTE(aseipp): include relevant Nix header files
+ args:insert("-isystem")
+ args:insert("@NIX_LIBC_INCLUDE@")
@ -17,6 +16,6 @@ index 351238d..e638c90 100644
+ args:insert(w)
+ end
+ end
if cargs then
args:insertall(cargs)
-- Obey the SDKROOT variable on macOS to match Clang behavior.
local sdkroot = os.getenv("SDKROOT")
if sdkroot then

View file

@ -0,0 +1,39 @@
{ lib
, stdenv
, fetchurl
, guile
, texinfo
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "guile-json";
version = "4.4.1";
src = fetchurl {
url = "mirror://savannah/guile-json/${pname}-${version}.tar.gz";
sha256 = "sha256-UqZt3pqXQzeHpzEiMvOMKSh1gK/K2KaJ70jMllNxBPc=";
};
postConfigure = ''
sed -i '/moddir\s*=/s%=.*%=''${out}/share/guile/site%' Makefile;
sed -i '/objdir\s*=/s%=.*%=''${out}/share/guile/ccache%' Makefile;
sed -i '/moddir\s*=/s%=.*%=''${out}/share/guile/site/json%' json/Makefile;
sed -i '/objdir\s*=/s%=.*%=''${out}/share/guile/ccache/json%' json/Makefile;
'';
nativeBuildInputs = [
pkg-config texinfo
];
buildInputs = [
guile
];
meta = with lib; {
description = "JSON Bindings for GNU Guile";
homepage = "https://savannah.nongnu.org/projects/guile-json";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ethancedwards8 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,21 @@
{ stdenv, lib, fetchurl, cmake }:
stdenv.mkDerivation rec {
pname = "libvori";
version = "210412";
src = fetchurl {
url = "https://brehm-research.de/files/${pname}-${version}.tar.gz";
sha256 = "1b4hpwibf3k7gl6n984l3wdi0zyl2fmpz84m9g2di4yhm6p8c61k";
};
nativeBuildInputs = [ cmake ];
meta = with lib; {
description = "Library for Voronoi intergration of electron densities";
homepage = "https://brehm-research.de/libvori.php";
license = with licenses; [ lgpl3Only ];
platforms = platforms.unix;
maintainers = [ maintainers.sheepforce ];
};
}

View file

@ -31,7 +31,7 @@ with lib;
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "21.1.2";
version = "21.1.3";
branch = versions.major version;
self = stdenv.mkDerivation {
@ -45,7 +45,7 @@ self = stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
];
sha256 = "0pw2wba4q66rhdx0hpimvxmrl7k2vv315gmmk17kl7snc0vvdd13";
sha256 = "0s8yi7y63xsyqw19ihil18fykkjxr6ibcir2fvymz1vh4ql23qnb";
};
prePatch = "patchShebangs .";
@ -64,10 +64,11 @@ self = stdenv.mkDerivation {
url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch";
sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q";
})
# For RISC-V support:
(fetchpatch {
name = "add-riscv-default-selections.patch";
url = "https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11346.patch";
sha256 = "1nwqslr1g6m83i0r40710havkyf03yxkgaiwgxz2zlw2xkbrnzw0";
url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/9908da1b7a5eaf0156d458e0e24b694c070ba345.patch";
sha256 = "036gv95m5gzzs6qpgkydf5fwgdlm7kpbdfalg8vmayghd260rw1w";
})
] ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [
# Fix aarch64-darwin build, remove when upstreaam supports it out of the box.

View file

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, aiohttp
}:
buildPythonPackage rec {
pname = "emulated-roku";
version = "0.2.1";
src = fetchFromGitHub {
owner = "mindigmarton";
repo = "emulated_roku";
rev = version;
sha256 = "02cbg5wrph19p6x44jlw6cn3jli0kwbgfh6klb3c4k5jfrkhgghw";
};
propagatedBuildInputs = [
aiohttp
];
# no tests implemented
doCheck = false;
pythonImportsCheck = [ "emulated_roku" ];
meta = with lib; {
description = "Library to emulate a roku server to serve as a proxy for remotes such as Harmony";
homepage = "https://github.com/mindigmarton/emulated_roku";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, beautifulsoup4
, enum-compat
, pyserial
, nose
}:
buildPythonPackage rec {
pname = "enocean";
version = "0.60.1";
src = fetchFromGitHub {
owner = "kipe";
repo = "enocean";
rev = version;
sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab";
};
propagatedBuildInputs = [
beautifulsoup4
enum-compat
pyserial
];
checkInputs = [
nose
];
checkPhase = ''
runHook preCheck
nosetests
runHook postCheck
'';
pythonImportsCheck = [
"enocean.communicators"
"enocean.protocol.packet"
"enocean.utils"
];
meta = with lib; {
description = "EnOcean serial protocol implementation";
homepage = "https://github.com/kipe/enocean";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -1,5 +1,6 @@
{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, isPy27
# Python deps
@ -28,6 +29,14 @@ buildPythonPackage rec {
sha256 = "4b2acd6802a04b59e306d0a6ccf37701d24376f4dc044bbbafba3afdf9d3389a";
};
patches = [
(fetchpatch {
name = "Support-SQLAlchemy-1.4x.patch";
url = "https://github.com/pecan/pecan/commit/a520bd544c0b02a02dbf692b8d6e2f7a503ee6d4.patch";
sha256 = "sha256-QCHRjwnpy8ndCvcuyE5Y65BybKYthJXDySUtmpJD8gY=";
})
];
propagatedBuildInputs = [
logutils
Mako
@ -51,8 +60,9 @@ buildPythonPackage rec {
];
meta = with lib; {
description = "Pecan";
homepage = "http://www.pecanpy.org/";
description = "WSGI object-dispatching web framework, designed to be lean and fast";
homepage = "https://www.pecanpy.org/";
changelog = "https://pecan.readthedocs.io/en/latest/changes.html";
maintainers = with maintainers; [ applePrincess ];
};
}

View file

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "pytest-subprocess";
version = "1.1.0";
version = "1.1.1";
disabled = pythonOlder "3.6";
@ -18,7 +18,7 @@ buildPythonPackage rec {
owner = "aklajnert";
repo = "pytest-subprocess";
rev = version;
sha256 = "sha256-r6WNDdvZAHMG1kPtLJlCwvhbVG1gC1NEvRfta+Chxnk=";
sha256 = "sha256-o8wDZhNHGPV1BQ5Zi2kFNlWq5w0cqebaJUhUUwTK6So=";
};
buildInputs = [
@ -31,10 +31,6 @@ buildPythonPackage rec {
pygments
];
disabledTests = [
"test_multiple_wait" # https://github.com/aklajnert/pytest-subprocess/issues/36
];
meta = with lib; {
description = "A plugin to fake subprocess for pytest";
homepage = "https://github.com/aklajnert/pytest-subprocess";

View file

@ -223,9 +223,9 @@
"emonitor" = ps: with ps; [ aioemonitor ];
"emulated_hue" = ps: with ps; [ aiohttp-cors ];
"emulated_kasa" = ps: with ps; [ sense-energy ];
"emulated_roku" = ps: with ps; [ ]; # missing inputs: emulated_roku
"emulated_roku" = ps: with ps; [ emulated-roku ];
"enigma2" = ps: with ps; [ openwebifpy ];
"enocean" = ps: with ps; [ ]; # missing inputs: enocean
"enocean" = ps: with ps; [ enocean ];
"enphase_envoy" = ps: with ps; [ envoy-reader ];
"entur_public_transport" = ps: with ps; [ ]; # missing inputs: enturclient
"environment_canada" = ps: with ps; [ ]; # missing inputs: env_canada

View file

@ -372,6 +372,8 @@ in with py.pkgs; buildPythonApplication rec {
"emonitor"
"emulated_hue"
"emulated_kasa"
"emulated_roku"
"enocean"
"enphase_envoy"
"epson"
"esphome"

View file

@ -55,10 +55,10 @@ let inherit (lib) optionals; in
stdenv.mkDerivation rec {
pname = "connman";
version = "1.39";
version = "1.40";
src = fetchurl {
url = "mirror://kernel/linux/network/connman/${pname}-${version}.tar.xz";
sha256 = "sha256-n2KnFpt0kcZwof8uM1sNlmMI+y9i4oXHgRBeuQ8YGvM=";
sha256 = "sha256-GleufOI0qjoXRKrDvlwhIdmNzpmUQO+KucxO39XtyxI=";
};
buildInputs = [
@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
libmnl
gnutls
readline
];
] ++ optionals (enableOpenconnect) [ openconnect ];
nativeBuildInputs = [
pkg-config

View file

@ -12052,8 +12052,7 @@ in
tbb = callPackage ../development/libraries/tbb { };
terra = callPackage ../development/compilers/terra {
llvmPackages = llvmPackages_6;
lua = lua5_1;
llvmPackages = llvmPackages_10;
};
teyjus = callPackage ../development/compilers/teyjus (
@ -12699,6 +12698,8 @@ in
inherit (gnome2) gnome_vfs libglade libgnome libgnomecanvas libgnomeui;
};
guile-json = callPackage ../development/guile-modules/guile-json { };
guile-lib = callPackage ../development/guile-modules/guile-lib { };
guile-ncurses = callPackage ../development/guile-modules/guile-ncurses { };
@ -17007,6 +17008,8 @@ in
libvorbis = callPackage ../development/libraries/libvorbis { };
libvori = callPackage ../development/libraries/libvori { };
libwebcam = callPackage ../os-specific/linux/libwebcam { };
libwebp = callPackage ../development/libraries/libwebp { };

View file

@ -2265,10 +2265,14 @@ in {
emoji = callPackage ../development/python-modules/emoji { };
emulated-roku = callPackage ../development/python-modules/emulated-roku { };
enaml = callPackage ../development/python-modules/enaml { };
enamlx = callPackage ../development/python-modules/enamlx { };
enocean = callPackage ../development/python-modules/enocean { };
enrich = callPackage ../development/python-modules/enrich { };
entrance = callPackage ../development/python-modules/entrance {