From 1a0c0c9599da83e49a39b6459a9609cbf59b0b70 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 20 Oct 2022 22:05:06 +0300 Subject: [PATCH 01/15] nginxStable: 1.22.0 -> 1.22.1 (cherry picked from commit 2392241c0b54fba32d02ecac8cdfa8bcca7d2376) --- pkgs/servers/http/nginx/stable.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/stable.nix b/pkgs/servers/http/nginx/stable.nix index 5d4db3a403b6..eb3c90aa7c6c 100644 --- a/pkgs/servers/http/nginx/stable.nix +++ b/pkgs/servers/http/nginx/stable.nix @@ -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="; } From 11139690f0eec1b8330752f574ab4ef28f9cfdbf Mon Sep 17 00:00:00 2001 From: Izorkin Date: Fri, 29 Jul 2022 12:51:33 +0300 Subject: [PATCH 02/15] nginxMainline: 1.23.0 -> 1.23.1 (cherry picked from commit ba7d7192f544b9833629d9af742b9ac7402b0f78) --- pkgs/servers/http/nginx/mainline.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix index 227b4212e0ab..ba84963a763c 100644 --- a/pkgs/servers/http/nginx/mainline.nix +++ b/pkgs/servers/http/nginx/mainline.nix @@ -1,6 +1,6 @@ { callPackage, ... }@args: callPackage ./generic.nix args { - version = "1.23.0"; - sha256 = "sha256-ggrKo1uScr6ennL23vpKXykhgkcJ+KpHcseKsx7ZTNE="; + version = "1.23.1"; + sha256 = "sha256-Xu4b0cI+O5R3pFUy8fNq5heLQ9VxqWB+aVPO8m1d8eI="; } From 197651064b5b397f6abfbc68478b5032e938462b Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 20 Oct 2022 22:07:08 +0300 Subject: [PATCH 03/15] nginxMainline: 1.23.1 -> 1.23.2 (cherry picked from commit a9cbc65ad0ad7c3059730cffde59cc4322267b07) --- pkgs/servers/http/nginx/mainline.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix index ba84963a763c..9b1ddf5da275 100644 --- a/pkgs/servers/http/nginx/mainline.nix +++ b/pkgs/servers/http/nginx/mainline.nix @@ -1,6 +1,6 @@ { callPackage, ... }@args: callPackage ./generic.nix args { - version = "1.23.1"; - sha256 = "sha256-Xu4b0cI+O5R3pFUy8fNq5heLQ9VxqWB+aVPO8m1d8eI="; + version = "1.23.2"; + sha256 = "sha256-qAzCctPXKq7nCqi1F7SGKmNcAlZ5BDTb/E1hipmbC0Y="; } From 06a9c87f714fc0936aff00793b05766fbb78259a Mon Sep 17 00:00:00 2001 From: Izorkin Date: Fri, 29 Jul 2022 12:48:36 +0300 Subject: [PATCH 04/15] nginxQuic: 8d0753760546 -> 3550b00d9dc8 (cherry picked from commit a09d4826e122178bc22d32df4a39871e7878097b) --- pkgs/servers/http/nginx/quic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/nginx/quic.nix b/pkgs/servers/http/nginx/quic.nix index ec7982adf704..3d151a9f3500 100644 --- a/pkgs/servers/http/nginx/quic.nix +++ b/pkgs/servers/http/nginx/quic.nix @@ -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 = "3550b00d9dc8"; # branch=quic + sha256 = "sha256-JtE5FO4FHlDuqXd4UTXXPIFAdyyhQbOSMTT0NXh2iH4="; }; preConfigure = '' @@ -19,5 +19,5 @@ callPackage ./generic.nix args { "--with-stream_quic_module" ]; - version = "1.23.0-quic"; + version = "1.23.1-quic"; } From 6e9b2d606227aa135e9f395c8db66d8cffecb3e0 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 20 Oct 2022 22:10:09 +0300 Subject: [PATCH 05/15] nginxQuic: 3550b00d9dc8 -> 3be953161026 (cherry picked from commit 9d676cb01d8254197d85f4771f924065d14149e5) --- pkgs/servers/http/nginx/quic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/nginx/quic.nix b/pkgs/servers/http/nginx/quic.nix index 3d151a9f3500..de5eea45c46d 100644 --- a/pkgs/servers/http/nginx/quic.nix +++ b/pkgs/servers/http/nginx/quic.nix @@ -6,8 +6,8 @@ callPackage ./generic.nix args { src = fetchhg { url = "https://hg.nginx.org/nginx-quic"; - rev = "3550b00d9dc8"; # branch=quic - sha256 = "sha256-JtE5FO4FHlDuqXd4UTXXPIFAdyyhQbOSMTT0NXh2iH4="; + rev = "3be953161026"; # branch=quic + sha256 = "sha256-maWQ0RPI2pe6L8QL7TQ1YJts5ZJHhiTYG9sdwINGMDA="; }; preConfigure = '' @@ -19,5 +19,5 @@ callPackage ./generic.nix args { "--with-stream_quic_module" ]; - version = "1.23.1-quic"; + version = "1.23.2-quic"; } From 9470e57de6ccfd84d083260d61356cb614f844ff Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:43:50 +0200 Subject: [PATCH 06/15] linux: 5.10.148 -> 5.10.149 (cherry picked from commit 98428f66c8499bd3e71c51df4c658feffe21dba3) --- pkgs/os-specific/linux/kernel/linux-5.10.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.10.nix b/pkgs/os-specific/linux/kernel/linux-5.10.nix index be2e09bc6a3d..68515e2e84c3 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.10.nix @@ -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 {})) From ced2c3a00602a0a15e7e5b6828a99c13141f8eee Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:43:55 +0200 Subject: [PATCH 07/15] linux: 5.4.218 -> 5.4.219 (cherry picked from commit 558536850faa5911d9ac78490070451ec3da0374) --- pkgs/os-specific/linux/kernel/linux-5.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index a39e28bfc91f..57d4d41add94 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -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 {})) From 3b6e8f26579c50363444f54705bb95ab507097db Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:43:58 +0200 Subject: [PATCH 08/15] linux: 6.0.2 -> 6.0.3 (cherry picked from commit 1f7e118c3f94a9c4b41308ad531b50654d34cc76) --- pkgs/os-specific/linux/kernel/linux-6.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-6.0.nix b/pkgs/os-specific/linux/kernel/linux-6.0.nix index 27f8166ecefc..574f04c386c4 100644 --- a/pkgs/os-specific/linux/kernel/linux-6.0.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.0.nix @@ -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 { })) From 484e11472872ab7141c9bffb4a479220e8a91a9a Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:44:49 +0200 Subject: [PATCH 09/15] linux/hardened/patches/5.10: 5.10.147-hardened2 -> 5.10.148-hardened1 (cherry picked from commit 0292ed799da2be242981aaedde7acb277ee40b4d) --- pkgs/os-specific/linux/kernel/hardened/patches.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 34d6a3874801..44dbeb86580a 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -21,13 +21,13 @@ }, "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": { From 63082b2c41fad91fe719392fcf6abe6c530a4bd1 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:44:55 +0200 Subject: [PATCH 10/15] linux/hardened/patches/5.15: 5.15.73-hardened3 -> 5.15.74-hardened1 (cherry picked from commit e164607345bea2343bdcac2565dc3faa4fbe1356) --- pkgs/os-specific/linux/kernel/hardened/patches.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 44dbeb86580a..66d0e90bb5ae 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -31,13 +31,13 @@ }, "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": { From 3ebfb687835645e29c2daccb08642a74626a8886 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:45:03 +0200 Subject: [PATCH 11/15] linux/hardened/patches/5.19: 5.19.15-hardened2 -> 5.19.16-hardened1 (cherry picked from commit b0f1947ea86c09f477435642b6e78557f2910224) --- pkgs/os-specific/linux/kernel/hardened/patches.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 66d0e90bb5ae..9b901dae8d54 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -41,13 +41,13 @@ }, "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": { From 3e2d910a5bcbd388b47f9c18bb8fb09e2df0f131 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 22 Oct 2022 11:45:09 +0200 Subject: [PATCH 12/15] linux/hardened/patches/5.4: 5.4.217-hardened2 -> 5.4.218-hardened1 (cherry picked from commit 59efe413b2b1af40f20a696356cdd380f9dd9414) --- pkgs/os-specific/linux/kernel/hardened/patches.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 9b901dae8d54..95ef57ece2d9 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -51,12 +51,12 @@ }, "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" } } From 3987a4ea48d446fa939de77139237740091dd28b Mon Sep 17 00:00:00 2001 From: Kazutoshi Noguchi Date: Thu, 20 Oct 2022 17:42:29 +0900 Subject: [PATCH 13/15] qt5.qtwebengine: 5.15.8 -> 5.15.11 (cherry picked from commit bf677a72e88fd4023e6809105aa05acab43f9fd5) --- pkgs/development/libraries/qt-5/5.15/srcs.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.15/srcs.nix b/pkgs/development/libraries/qt-5/5.15/srcs.nix index 7cba1ae63f96..982cf442f0db 100644 --- a/pkgs/development/libraries/qt-5/5.15/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.15/srcs.nix @@ -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" From 8855b8336dadc2b517f07fa43cf12a315ef07220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sun, 11 Sep 2022 13:24:51 +0200 Subject: [PATCH 14/15] nixos/syncthing: remove exit code 2 from exit status success Fix #181713 (cherry picked from commit 89dcb1d31dd7e572d0c4cf208315123342856136) --- nixos/modules/services/networking/syncthing.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index 9411c8753301..862b48ee03b5 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -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; From 2d762b92010bdf74128692d07307ffe393ef4e3e Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 22 Oct 2022 19:50:09 +0300 Subject: [PATCH 15/15] discord: add a script to disable breaking updates (cherry picked from commit c223efc36b39e4b88a5ac4f79dcb95881ed58d18) --- .../discord/disable-breaking-updates.py | 42 ++++++++++++++++++ .../instant-messengers/discord/linux.nix | 44 +++++++++++++------ 2 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 pkgs/applications/networking/instant-messengers/discord/disable-breaking-updates.py diff --git a/pkgs/applications/networking/instant-messengers/discord/disable-breaking-updates.py b/pkgs/applications/networking/instant-messengers/discord/disable-breaking-updates.py new file mode 100644 index 000000000000..a7217d0ad6e0 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/discord/disable-breaking-updates.py @@ -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") diff --git a/pkgs/applications/networking/instant-messengers/discord/linux.nix b/pkgs/applications/networking/instant-messengers/discord/linux.nix index b960caa64d80..d819db34de66 100644 --- a/pkgs/applications/networking/instant-messengers/discord/linux.nix +++ b/pkgs/applications/networking/instant-messengers/discord/linux.nix @@ -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 + ''; + }; }