Merge release-22.05 into staging-next-22.05

This commit is contained in:
github-actions[bot]
2022-10-24 00:22:47 +00:00
committed by GitHub
11 changed files with 116 additions and 54 deletions

View File

@@ -532,6 +532,8 @@ in {
};
systemd.services = {
# upstream reference:
# https://github.com/syncthing/syncthing/blob/main/etc/linux-systemd/system/syncthing%40.service
syncthing = mkIf cfg.systemService {
description = "Syncthing service";
after = [ "network.target" ];
@@ -543,7 +545,7 @@ in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Restart = "on-failure";
SuccessExitStatus = "2 3 4";
SuccessExitStatus = "3 4";
RestartForceExitStatus="3 4";
User = cfg.user;
Group = cfg.group;

View File

@@ -0,0 +1,42 @@
#!@pythonInterpreter@
# slightly tweaked from the script created by @lionirdeadman
# https://github.com/flathub/com.discordapp.Discord/blob/master/disable-breaking-updates.py
"""
Disable breaking updates which will prompt users to download a deb or tar file
and lock them out of Discord making the program unusable.
This will dramatically improve the experience :
1) The maintainer doesn't need to be worried at all times of an update which will break Discord.
2) People will not be locked out of the program while the maintainer runs to update it.
"""
import json
import os
from pathlib import Path
XDG_CONFIG_HOME = os.environ.get("XDG_CONFIG_HOME") or os.path.join(
os.path.expanduser("~"), ".config"
)
settings_path = Path(f"{XDG_CONFIG_HOME}/@configDirName@/settings.json")
settings_path_temp = Path(f"{XDG_CONFIG_HOME}/@configDirName@/settings.json.tmp")
try:
with settings_path.open(encoding="utf-8") as settings_file:
settings = json.load(settings_file)
if settings.get("SKIP_HOST_UPDATE"):
print("[Nix] Disabling updates already done")
else:
skip_host_update = {"SKIP_HOST_UPDATE": True}
settings.update(skip_host_update)
with settings_path_temp.open("w", encoding="utf-8") as settings_file_temp:
json.dump(settings, settings_file_temp, indent=2)
settings_path_temp.rename(settings_path)
print("[Nix] Disabled updates")
except IOError:
print("[Nix] settings.json doesn't yet exist, can't disable it yet")

View File

@@ -4,9 +4,22 @@
, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid, libX11
, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, mesa, nspr, nss
, pango, systemd, libappindicator-gtk3, libdbusmenu, writeScript
, pango, systemd, libappindicator-gtk3, libdbusmenu, writeScript, python3, runCommand
, common-updater-scripts }:
let
disableBreakingUpdates = runCommand "disable-breaking-updates.py"
{
pythonInterpreter = "${python3.interpreter}";
configDirName = lib.toLower binaryName;
} ''
mkdir -p $out/bin
cp ${./disable-breaking-updates.py} $out/bin/disable-breaking-updates.py
substituteAllInPlace $out/bin/disable-breaking-updates.py
chmod +x $out/bin/disable-breaking-updates.py
'';
in
stdenv.mkDerivation rec {
inherit pname version src meta;
@@ -83,7 +96,8 @@ stdenv.mkDerivation rec {
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName}
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName} \
--run "${lib.getExe disableBreakingUpdates}"
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
# Without || true the install would fail on case-insensitive filesystems
@@ -105,15 +119,19 @@ stdenv.mkDerivation rec {
mimeTypes = [ "x-scheme-handler/discord" ];
};
passthru.updateScript = writeScript "discord-update-script" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep common-updater-scripts
set -eou pipefail;
url=$(curl -sI "https://discordapp.com/api/download/${
builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname
}?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+')
version=''${url##https://dl*.discordapp.net/apps/linux/}
version=''${version%%/*.tar.gz}
update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix
'';
passthru = {
# make it possible to run disableBreakingUpdates standalone
inherit disableBreakingUpdates;
updateScript = writeScript "discord-update-script" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep common-updater-scripts
set -eou pipefail;
url=$(curl -sI "https://discordapp.com/api/download/${
builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname
}?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+')
version=''${url##https://dl*.discordapp.net/apps/linux/}
version=''${version%%/*.tar.gz}
update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix
'';
};
}

View File

@@ -38,7 +38,7 @@ lib.mapAttrs mk (lib.importJSON ./srcs-generated.json)
qtwebengine =
let
branchName = "5.15.8";
branchName = "5.15.11";
rev = "v${branchName}-lts";
in
{
@@ -46,11 +46,11 @@ lib.mapAttrs mk (lib.importJSON ./srcs-generated.json)
src = fetchgit {
url = "https://github.com/qt/qtwebengine.git";
sha256 = "04xhg5qpnxm8hzgkanml45za64c9i5pbxhki2l2wcq4b4y7f3hyr";
sha256 = "sha256-yrKPof18G10VjrwCn/4E/ywlpATJQZjvmVeM+9hLY0U=";
inherit rev branchName;
fetchSubmodules = true;
leaveDotGit = true;
name = "qtwebengine-${lib.substring 0 7 rev}.tar.gz";
name = "qtwebengine-${lib.substring 0 8 rev}.tar.gz";
postFetch = ''
# remove submodule .git directory
rm -rf "$out/src/3rdparty/.git"

View File

@@ -21,42 +21,42 @@
},
"5.10": {
"patch": {
"extra": "-hardened2",
"name": "linux-hardened-5.10.147-hardened2.patch",
"sha256": "0j44mfyc66vq6hncc5w3mxxw8jcpa66w4w40d3wm7ka6yr6p34sh",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.147-hardened2/linux-hardened-5.10.147-hardened2.patch"
"extra": "-hardened1",
"name": "linux-hardened-5.10.148-hardened1.patch",
"sha256": "1r4s7qpwjhhbp1phkk2dd8rbm3x9l3i3g10jz865l1vp253pmb65",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.148-hardened1/linux-hardened-5.10.148-hardened1.patch"
},
"sha256": "16pdpjmvrdml7am7s2kydrif1l7f4aq0wh4ak0xh3dby16zkl9c5",
"version": "5.10.147"
"sha256": "0mp9qs8f50hxf72b6cgh8izkyjbhrrmij6slxja701i1w9mkylhj",
"version": "5.10.148"
},
"5.15": {
"patch": {
"extra": "-hardened3",
"name": "linux-hardened-5.15.73-hardened3.patch",
"sha256": "1p4cm1viyryf4npbfvg72a4kpqs22vqvfqj2hl6pq5wrpgg677g0",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.73-hardened3/linux-hardened-5.15.73-hardened3.patch"
"extra": "-hardened1",
"name": "linux-hardened-5.15.74-hardened1.patch",
"sha256": "0ygfz210zz0k5fza2530vwayjz3r32973lbhfsyyc0fq6vghqhn2",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.74-hardened1/linux-hardened-5.15.74-hardened1.patch"
},
"sha256": "0pbi640llcdbx57vwwzc5axa75w0y5rixa9r752h725f4naz08m8",
"version": "5.15.73"
"sha256": "0ra2ijpw7w07gm3kjwyszlwfq2rbnmq84z50qhv5r0svz2i3j59c",
"version": "5.15.74"
},
"5.19": {
"patch": {
"extra": "-hardened2",
"name": "linux-hardened-5.19.15-hardened2.patch",
"sha256": "12si2gy6maxbvf252ircp94ci0ihqlxv3l9sf4xwxrs66gn3z2fa",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.19.15-hardened2/linux-hardened-5.19.15-hardened2.patch"
"extra": "-hardened1",
"name": "linux-hardened-5.19.16-hardened1.patch",
"sha256": "1y9c26pyyvifkza7anl9gphnn3jpw7jwiqwjw6i748wwxynhx596",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.19.16-hardened1/linux-hardened-5.19.16-hardened1.patch"
},
"sha256": "06zband5q6m9imyvn4y4naafdakjcj00rg23227cagnv8wwf71j6",
"version": "5.19.15"
"sha256": "13g0c6ljxk3sd0ja39ndih5vrzp2ssj78qxaf8nswn8hgrkazsx1",
"version": "5.19.16"
},
"5.4": {
"patch": {
"extra": "-hardened2",
"name": "linux-hardened-5.4.217-hardened2.patch",
"sha256": "16hcwjll5dkfc8sb81w3dipqx9j1np91f5gad45b0xfcnqcn70ab",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.217-hardened2/linux-hardened-5.4.217-hardened2.patch"
"extra": "-hardened1",
"name": "linux-hardened-5.4.218-hardened1.patch",
"sha256": "1ylhkhkm4vamdap0kb6vnw9w0rjaacdfgly1yin75dxxymy0x026",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.218-hardened1/linux-hardened-5.4.218-hardened1.patch"
},
"sha256": "0qrfrk0g1dky5apg8gdxczj2ir0g0z41zmdmbwwcxkxjz76jdf1b",
"version": "5.4.217"
"sha256": "0f7lm5qq763zrnwwq9jmfpgvskhzi3gwy5rbq2q7gmiphl179p9x",
"version": "5.4.218"
}
}

View File

@@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.10.148";
version = "5.10.149";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0mp9qs8f50hxf72b6cgh8izkyjbhrrmij6slxja701i1w9mkylhj";
sha256 = "1lv5q0m24ccbiqywy03s9s3wyxzm0v7f691rag89qfsn6z2k8q8g";
};
} // (args.argsOverride or {}))

View File

@@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.4.218";
version = "5.4.219";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0f7lm5qq763zrnwwq9jmfpgvskhzi3gwy5rbq2q7gmiphl179p9x";
sha256 = "0qd2a0cx6bq11qq2513xmm5jxzfrq6axvsc0pjbvdpv9fa9av4sj";
};
} // (args.argsOverride or {}))

View File

@@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "6.0.2";
version = "6.0.3";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
sha256 = "17awx4c5fz7f656ig5bydccci052jsai0lczrn2bdk5cihw2cg51";
sha256 = "1krx3kp7ivgp91fkcvgvqsb698b3l0dk6zd6yf54sy8530j25mdh";
};
} // (args.argsOverride or { }))

View File

@@ -1,6 +1,6 @@
{ callPackage, ... }@args:
callPackage ./generic.nix args {
version = "1.23.0";
sha256 = "sha256-ggrKo1uScr6ennL23vpKXykhgkcJ+KpHcseKsx7ZTNE=";
version = "1.23.2";
sha256 = "sha256-qAzCctPXKq7nCqi1F7SGKmNcAlZ5BDTb/E1hipmbC0Y=";
}

View File

@@ -6,8 +6,8 @@
callPackage ./generic.nix args {
src = fetchhg {
url = "https://hg.nginx.org/nginx-quic";
rev = "8d0753760546"; # branch=quic
sha256 = "sha256-HcYkjbm3qfTU34ahseHCZhHYWNm1phfVph6oJBARMI8=";
rev = "3be953161026"; # branch=quic
sha256 = "sha256-maWQ0RPI2pe6L8QL7TQ1YJts5ZJHhiTYG9sdwINGMDA=";
};
preConfigure = ''
@@ -19,5 +19,5 @@ callPackage ./generic.nix args {
"--with-stream_quic_module"
];
version = "1.23.0-quic";
version = "1.23.2-quic";
}

View File

@@ -1,6 +1,6 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix args {
version = "1.22.0";
sha256 = "0lzb4sn8hv491zad9kbpvka3m5ayjf1pxqbwllri980idyd5cgdk";
version = "1.22.1";
sha256 = "sha256-nrszOp6CuVKs0+K0rrHU/2QG9ySRurbNn+afDepzfzE=";
}