Merge master into staging-next

This commit is contained in:
github-actions[bot] 2020-12-15 12:20:55 +00:00 committed by GitHub
commit ba5fadc34b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 192 additions and 20 deletions

View file

@ -233,9 +233,10 @@ in {
path = [ pkgs.wpa_supplicant ];
script = ''
if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ]
then echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead."
if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ]; then
echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead."
fi
iface_args="-s -u -D${cfg.driver} -c ${configFile}"
${if ifaces == [] then ''
for i in $(cd /sys/class/net && echo *); do
@ -248,6 +249,10 @@ in {
fi
fi
done
if [ -z "$args" ]; then
echo >&2 "<3>No wireless interfaces detected (yet)."
exit 1
fi
'' else ''
args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}"
''}
@ -261,7 +266,7 @@ in {
# Restart wpa_supplicant when a wlan device appears or disappears.
services.udev.extraRules = ''
ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="/run/current-system/systemd/bin/systemctl try-restart wpa_supplicant.service"
ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="/run/current-system/systemd/bin/systemctl restart wpa_supplicant.service"
'';
};

View file

@ -91,6 +91,7 @@ in
docker-edge = handleTestOn ["x86_64-linux"] ./docker-edge.nix {};
docker-registry = handleTest ./docker-registry.nix {};
docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {};
docker-tools-cross = handleTestOn ["x86_64-linux" "aarch64-linux"] ./docker-tools-cross.nix {};
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
dokuwiki = handleTest ./dokuwiki.nix {};

View file

@ -0,0 +1,76 @@
# Not everyone has a suitable remote builder set up, so the cross-compilation
# tests that _include_ running the result are separate. That way, most people
# can run the majority of the test suite without the extra setup.
import ./make-test-python.nix ({ pkgs, ... }:
let
remoteSystem =
if pkgs.system == "aarch64-linux"
then "x86_64-linux"
else "aarch64-linux";
remoteCrossPkgs = import ../.. /*nixpkgs*/ {
# NOTE: This is the machine that runs the build - local from the
# 'perspective' of the build script.
localSystem = remoteSystem;
# NOTE: Since this file can't control where the test will be _run_ we don't
# cross-compile _to_ a different system but _from_ a different system
crossSystem = pkgs.system;
};
hello1 = remoteCrossPkgs.dockerTools.buildImage {
name = "hello1";
tag = "latest";
contents = remoteCrossPkgs.hello;
};
hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage {
name = "hello2";
tag = "latest";
contents = remoteCrossPkgs.hello;
};
in {
name = "docker-tools";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ roberth ];
};
nodes = {
docker = { ... }: {
virtualisation = {
diskSize = 2048;
docker.enable = true;
};
};
};
testScript = ''
docker.wait_for_unit("sockets.target")
with subtest("Ensure cross compiled buildImage image can run."):
docker.succeed(
"docker load --input='${hello1}'"
)
assert "Hello, world!" in docker.succeed(
"docker run --rm ${hello1.imageName} hello",
)
docker.succeed(
"docker rmi ${hello1.imageName}",
)
with subtest("Ensure cross compiled buildLayeredImage image can run."):
docker.succeed(
"docker load --input='${hello2}'"
)
assert "Hello, world!" in docker.succeed(
"docker run --rm ${hello2.imageName} hello",
)
docker.succeed(
"docker rmi ${hello2.imageName}",
)
'';
})

View file

@ -245,7 +245,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
"docker inspect ${pkgs.dockerTools.examples.cross.imageName} "
+ "| ${pkgs.jq}/bin/jq -r .[].Architecture"
).strip()
== "${if pkgs.system == "aarch64-linux" then "amd64" else "arm64v8"}"
== "${if pkgs.system == "aarch64-linux" then "amd64" else "arm64"}"
)
'';
})

View file

@ -35,6 +35,9 @@ import ./make-test-python.nix ({ pkgs, ...} :
machine.wait_until_succeeds("pgrep plasmashell")
machine.wait_for_window("^Desktop ")
with subtest("Check that KDED is running"):
machine.succeed("pgrep kded5")
with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")

View file

@ -0,0 +1,86 @@
{ rustPlatform
, lib
, fetchFromGitHub
, pkg-config
, fontconfig
, python3
, openssl
, perl
, dbus
, libX11
, xcbutil
, libxcb
, xcbutilkeysyms
, xcbutilwm # contains xcb-ewmh among others
, libxkbcommon
, libglvnd # libEGL.so.1
, egl-wayland
, wayland
, libGLU
, libGL
, freetype
, zlib
}:
let
runtimeDeps = [
libX11
xcbutil
libxcb
xcbutilkeysyms
xcbutilwm
libxkbcommon
dbus
libglvnd
zlib
egl-wayland
wayland
libGLU
libGL
fontconfig
freetype
];
pname = "wezterm";
in
rustPlatform.buildRustPackage {
inherit pname;
version = "unstable-2020-11-22";
src = fetchFromGitHub {
owner = "wez";
repo = pname;
rev = "3bd8d8c84591f4d015ff9a47ddb478e55c231fda";
sha256 = "13xf3685kir4p159hsxrqkj9p2lwgfp0n13h9zadslrd44l8b8j8";
fetchSubmodules = true;
};
cargoSha256 = "1ghjpyd3f5dqi6bblr6d2lihdschpyj5djfd1600hvb41x75lmhx";
nativeBuildInputs = [
pkg-config
python3
openssl.dev
perl
];
buildInputs = runtimeDeps;
installPhase = ''
for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do
patchelf --set-rpath "${lib.makeLibraryPath runtimeDeps}" $releaseDir/$artifact
install -D $releaseDir/$artifact -t $out/bin
done
'';
# prevent further changes to the RPATH
dontPatchELF = true;
meta = with lib; {
description = "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust";
homepage = "https://wezfurlong.org/wezterm";
license = licenses.mit;
maintainers = with maintainers; [ steveej ];
platforms = platforms.unix;
};
}

View file

@ -58,15 +58,12 @@ let
done;
'';
# Map nixpkgs architecture to Docker notation
# Reference: https://github.com/docker-library/official-images#architectures-other-than-amd64
getArch = nixSystem: {
aarch64-linux = "arm64v8";
armv7l-linux = "arm32v7";
x86_64-linux = "amd64";
powerpc64le-linux = "ppc64le";
i686-linux = "i386";
}.${nixSystem} or "Can't map Nix system ${nixSystem} to Docker architecture notation. Please check that your input and your requested build are correct or update the mapping in Nixpkgs.";
# The OCI Image specification recommends that configurations use values listed
# in the Go Language document for GOARCH.
# Reference: https://github.com/opencontainers/image-spec/blob/master/config.md#properties
# For the mapping from Nixpkgs system parameters to GOARCH, we can reuse the
# mapping from the go package.
defaultArch = go.GOARCH;
in
rec {
@ -84,7 +81,7 @@ rec {
, imageDigest
, sha256
, os ? "linux"
, arch ? getArch system
, arch ? defaultArch
# This is used to set name to the pulled image
, finalImageName ? imageName
@ -500,7 +497,7 @@ rec {
baseJson = let
pure = writeText "${baseName}-config.json" (builtins.toJSON {
inherit created config;
architecture = getArch system;
architecture = defaultArch;
os = "linux";
});
impure = runCommand "${baseName}-config.json"
@ -754,7 +751,7 @@ rec {
streamScript = writePython3 "stream" {} ./stream_layered_image.py;
baseJson = writeText "${name}-base.json" (builtins.toJSON {
inherit config;
architecture = getArch system;
architecture = defaultArch;
os = "linux";
});

View file

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DUTF8PROC_ENABLE_TESTING=ON"
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
];
# the pkg-config file is not created in the cmake installation
@ -23,6 +25,8 @@ stdenv.mkDerivation rec {
preConfigure = "make libutf8proc.pc prefix=$out";
postInstall = "install -Dm644 ../libutf8proc.pc -t $out/lib/pkgconfig/";
doCheck = true;
meta = with stdenv.lib; {
description = "A clean C library for processing UTF-8 Unicode data";
homepage = "https://juliastrings.github.io/utf8proc/";

View file

@ -4,7 +4,6 @@
, fetchFromGitHub
, substituteAll
, gdb
, colorama
, flask
, psutil
, pytest-timeout
@ -18,13 +17,13 @@
buildPythonPackage rec {
pname = "debugpy";
version = "1.2.0";
version = "1.2.1";
src = fetchFromGitHub {
owner = "Microsoft";
repo = pname;
rev = "v${version}";
sha256 = "1r5w5ngipj5fgjylrmlw3jrh5y2n67n68l91sj9329549x4ww8dh";
sha256 = "1dgjbbhy228w2zbfq5pf0hkai7742zw8mmybnzjdc9l6pw7360rq";
};
patches = [
@ -65,7 +64,6 @@ buildPythonPackage rec {
)'';
checkInputs = [
colorama
flask
psutil
pytest-timeout

View file

@ -801,6 +801,8 @@ in
wayst = callPackage ../applications/terminal-emulators/wayst { };
wezterm = callPackage ../applications/terminal-emulators/wezterm { };
x3270 = callPackage ../applications/terminal-emulators/x3270 { };
xterm = callPackage ../applications/terminal-emulators/xterm { };