From c56a5c61a63fafe07ef552f7896a52441b06497c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Sep 2021 10:55:59 +0200 Subject: [PATCH 01/35] ethtool: 5.13 -> 5.14 --- pkgs/tools/misc/ethtool/default.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/ethtool/default.nix b/pkgs/tools/misc/ethtool/default.nix index 9457507458d8..e4ca354e4a3f 100644 --- a/pkgs/tools/misc/ethtool/default.nix +++ b/pkgs/tools/misc/ethtool/default.nix @@ -1,22 +1,32 @@ -{ lib, stdenv, fetchurl, pkg-config, libmnl }: +{ lib +, stdenv +, fetchurl +, libmnl +, pkg-config +}: stdenv.mkDerivation rec { pname = "ethtool"; - version = "5.13"; + version = "5.14"; src = fetchurl { url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1wwcwiav0fbl75axmx8wms4xfdp1ji5c7j49k4yl8bngqra74fp6"; + sha256 = "sha256-uxPbkZFcrNekkrZbZd8Hpn5Ll03b6vdiBbGUWiPSdoY="; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libmnl ]; + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libmnl + ]; meta = with lib; { description = "Utility for controlling network drivers and hardware"; homepage = "https://www.kernel.org/pub/software/network/ethtool/"; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.linux; - maintainers = [ maintainers.bjornfor ]; + maintainers = with maintainers; [ bjornfor ]; }; } From e51348d672c74b0d848976182600a41f14752fac Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 14 Jul 2021 00:37:09 -0400 Subject: [PATCH 02/35] plasmaMobileGear: 21.05 -> 21.06 - https://www.plasma-mobile.org/2021/06/10/plasma-mobile-update-june/ - https://www.plasma-mobile.org/info/plasma-mobile-gear-21-06/ New: - kasts - keysmith - kweather - tokodon --- pkgs/applications/plasma-mobile/fetch.sh | 2 +- pkgs/applications/plasma-mobile/srcs.nix | 144 ++++++++++++++--------- 2 files changed, 89 insertions(+), 57 deletions(-) diff --git a/pkgs/applications/plasma-mobile/fetch.sh b/pkgs/applications/plasma-mobile/fetch.sh index 29a8e6b4c792..754fc3d1ce34 100644 --- a/pkgs/applications/plasma-mobile/fetch.sh +++ b/pkgs/applications/plasma-mobile/fetch.sh @@ -1 +1 @@ -WGET_ARGS=( http://download.kde.org/stable/plasma-mobile/21.05 -A '*.tar.xz' ) +WGET_ARGS=( http://download.kde.org/stable/plasma-mobile/21.06 -A '*.tar.xz' ) diff --git a/pkgs/applications/plasma-mobile/srcs.nix b/pkgs/applications/plasma-mobile/srcs.nix index 4df185aa0aec..509770a4d91e 100644 --- a/pkgs/applications/plasma-mobile/srcs.nix +++ b/pkgs/applications/plasma-mobile/srcs.nix @@ -4,115 +4,147 @@ { alligator = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/alligator-21.05.tar.xz"; - sha256 = "04zgxfx2zmn1p2ap08i5sfsnrly3smip4ylr07ghkhkiyjzbv9w6"; - name = "alligator-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/alligator-21.06.tar.xz"; + sha256 = "18f1hsfl5glmrs778z8xkcszcs7fj148giz9bs5adg1sczjdja2j"; + name = "alligator-21.06.tar.xz"; }; }; angelfish = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/angelfish-21.05.tar.xz"; - sha256 = "11jd5dwy0xa7kh5z5rc29xy3wfn20hm31908zjax4x83qqjrm075"; - name = "angelfish-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/angelfish-21.06.tar.xz"; + sha256 = "0yvp307gbj3c8wk7cyk2hdh1r1gy1x7j2mbr8pkl6sfyy0djcy48"; + name = "angelfish-21.06.tar.xz"; }; }; calindori = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/calindori-21.05.tar.xz"; - sha256 = "110f9ri9r1nb6q1ybhkfxljl4q5gqxikh9z0xkzjjbxjjqfscqcj"; - name = "calindori-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/calindori-21.06.tar.xz"; + sha256 = "0ivfy9n7gcbxpyk6d6zlaj6xnzcvgrn01svild61cza5vcp1dp28"; + name = "calindori-21.06.tar.xz"; }; }; kalk = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/kalk-21.05.tar.xz"; - sha256 = "04n65hx0j9rx6b3jq69zgypi8qjd4ig3rfw7d44c3q7dgh4k451l"; - name = "kalk-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/kalk-21.06.tar.xz"; + sha256 = "06i9z3x8c5yiylzk272cbmp88q1bk6plspp6zckwzbmi19pkvmki"; + name = "kalk-21.06.tar.xz"; + }; + }; + kasts = { + version = "21.06"; + src = fetchurl { + url = "${mirror}/stable/plasma-mobile/21.06/kasts-21.06.tar.xz"; + sha256 = "0kayg137haqfjb2j7bc61vnqq2gp0f24n41lqygwnndh2wyl22x0"; + name = "kasts-21.06.tar.xz"; }; }; kclock = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/kclock-21.05.tar.xz"; - sha256 = "0pa5hvax0y80l8yrqczh9mcknfm3z0vdq3xc35cxdiz1vc6fwqmd"; - name = "kclock-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/kclock-21.06.tar.xz"; + sha256 = "1h91l2ip15kfd2p85r96npib34gms7zacnn8dqb4j2m6znxjh9ib"; + name = "kclock-21.06.tar.xz"; + }; + }; + keysmith = { + version = "21.06"; + src = fetchurl { + url = "${mirror}/stable/plasma-mobile/21.06/keysmith-21.06.tar.xz"; + sha256 = "01v05m327av4hwn50slay8w1flsgh2as06z582r08y4rrn2q6crg"; + name = "keysmith-21.06.tar.xz"; }; }; koko = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/koko-21.05.tar.xz"; - sha256 = "00hnzkl8dvf15psrcfh96b8wfb3pbggd2f7xnadzcb87sbaml035"; - name = "koko-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/koko-21.06.tar.xz"; + sha256 = "117v8m68i4yq0j1lr2xm1c08474xlscxdnxv979gjcz0ghw402q2"; + name = "koko-21.06.tar.xz"; }; }; kongress = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/kongress-21.05.tar.xz"; - sha256 = "0qxgpi04ra9crc6drgbdm9arjbvcx52pprjr1dj8acch07f6i2gs"; - name = "kongress-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/kongress-21.06.tar.xz"; + sha256 = "03nm9jnhv5nqq8l9qp6xxk96vl44dias9y9y59agcs9lz16vxxvz"; + name = "kongress-21.06.tar.xz"; }; }; krecorder = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/krecorder-21.05.tar.xz"; - sha256 = "0ydaidxx2616bixihyaagvyym1r5s9rjkgg04vq9k4608d4vnn5c"; - name = "krecorder-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/krecorder-21.06.tar.xz"; + sha256 = "1l2wq9hwd1dimc8n35hd7cckh8mcjabjv936qzk32c7pychxnz5f"; + name = "krecorder-21.06.tar.xz"; }; }; ktrip = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/ktrip-21.05.tar.xz"; - sha256 = "0hxgnncyc2ir6i9p6s9fy1r4mhxgm643pxvp8lj3j5y0c5wk2kp9"; - name = "ktrip-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/ktrip-21.06.tar.xz"; + sha256 = "172y49g7h60dksd96fim67c1lmqfpha83rvh5r0hljla8x4jjrip"; + name = "ktrip-21.06.tar.xz"; + }; + }; + kweather = { + version = "21.06"; + src = fetchurl { + url = "${mirror}/stable/plasma-mobile/21.06/kweather-21.06.tar.xz"; + sha256 = "0ja0bagsk5rbdmgpakc236vlx1dfk5bnr60cdb1da7pswvxz9gfn"; + name = "kweather-21.06.tar.xz"; }; }; plasma-dialer = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/plasma-dialer-21.05.tar.xz"; - sha256 = "0kwkjn7ry6snc86qi1j7kcq5qa6rbyk5i7v6gqf7a7wywkk9n045"; - name = "plasma-dialer-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/plasma-dialer-21.06.tar.xz"; + sha256 = "1b6zdswy5wfbzcmpy5hmblbv95hb5bwdh6bi7f1r196aw74j4hxl"; + name = "plasma-dialer-21.06.tar.xz"; }; }; plasma-phonebook = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/plasma-phonebook-21.05.tar.xz"; - sha256 = "0aqqi3gvcsh4zg41zf8y0c626lwrabjchhr8pxj4n9la7y0wdvca"; - name = "plasma-phonebook-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/plasma-phonebook-21.06.tar.xz"; + sha256 = "0a5vkvysjmp3lbwn9s1pfjijk9mc0yvyp3xshg0w8bz5ky06rs8f"; + name = "plasma-phonebook-21.06.tar.xz"; }; }; plasma-settings = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/plasma-settings-21.05.tar.xz"; - sha256 = "16bhx0i8gvi9ina4jxzx02xyzypyjic9646lahxvzvzmd9hn9ipi"; - name = "plasma-settings-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/plasma-settings-21.06.tar.xz"; + sha256 = "1lvjjdrgk5cxxzsb2knlbh27n7ji1plpcxr2lycfv0fjq51rjsjg"; + name = "plasma-settings-21.06.tar.xz"; }; }; qmlkonsole = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/qmlkonsole-21.05.tar.xz"; - sha256 = "1ga48n09zlgvf5vvk2m26ak3ih5gjf361xxnyfprimmd7yj23han"; - name = "qmlkonsole-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/qmlkonsole-21.06.tar.xz"; + sha256 = "15rwn0rhx4c7mn68494ylg8ng1pb4afhwwndiarr8fzmi29fgx8l"; + name = "qmlkonsole-21.06.tar.xz"; }; }; spacebar = { - version = "21.05"; + version = "21.06"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.05/spacebar-21.05.tar.xz"; - sha256 = "16lvi5yzmvk6gb5m7csk44y2jbkk7psn1lkljmj1938p2475b94c"; - name = "spacebar-21.05.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.06/spacebar-21.06.tar.xz"; + sha256 = "14wk35yk7crp9449x23yy8sxg8cnxb7gp6fhnws8zc89w3l2faqn"; + name = "spacebar-21.06.tar.xz"; + }; + }; + tokodon = { + version = "21.06"; + src = fetchurl { + url = "${mirror}/stable/plasma-mobile/21.06/tokodon-21.06.tar.xz"; + sha256 = "1xzjq3sqdccarq9a3w54hajqnhlg3lplg17f81sy9yld1as4rria"; + name = "tokodon-21.06.tar.xz"; }; }; } From 099ac66d71b524ac17d9d131aba2b6914f033d80 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 14 Jul 2021 00:42:28 -0400 Subject: [PATCH 03/35] pulseaudio-qt: 1.2.0 -> 1.3.0 --- pkgs/development/libraries/pulseaudio-qt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pulseaudio-qt/default.nix b/pkgs/development/libraries/pulseaudio-qt/default.nix index 03d656f91fae..c1ba89f05842 100644 --- a/pkgs/development/libraries/pulseaudio-qt/default.nix +++ b/pkgs/development/libraries/pulseaudio-qt/default.nix @@ -9,11 +9,11 @@ mkDerivation rec { pname = "pulseaudio-qt"; - version = "1.2.0"; + version = "1.3.0"; src = fetchurl { url = "mirror://kde/stable/${pname}/${pname}-${lib.versions.majorMinor version}.tar.xz"; - sha256 = "1i0ql68kxv9jxs24rsd3s7jhjid3f2fq56fj4wbp16zb4wd14099"; + sha256 = "1i4yb0v1mmhih8c2i61hybg6q60qys3pc5wbjb7a0vwl1mihgsxw"; }; buildInputs = [ From abd65c818d6127c1a82ae78067956518f8a5f4a3 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 14 Jul 2021 00:59:33 -0400 Subject: [PATCH 04/35] kasts: init at 21.06 --- pkgs/applications/plasma-mobile/default.nix | 1 + pkgs/applications/plasma-mobile/kasts.nix | 57 +++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/applications/plasma-mobile/kasts.nix diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index 18f550955c57..6283989f846a 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -64,6 +64,7 @@ let alligator = callPackage ./alligator.nix {}; calindori = callPackage ./calindori.nix {}; kalk = callPackage ./kalk.nix {}; + kasts = callPackage ./kasts.nix {}; kclock = callPackage ./kclock.nix {}; koko = callPackage ./koko.nix {}; krecorder = callPackage ./krecorder.nix {}; diff --git a/pkgs/applications/plasma-mobile/kasts.nix b/pkgs/applications/plasma-mobile/kasts.nix new file mode 100644 index 000000000000..370cba7e2ea8 --- /dev/null +++ b/pkgs/applications/plasma-mobile/kasts.nix @@ -0,0 +1,57 @@ +{ lib +, mkDerivation + +, cmake +, extra-cmake-modules +, wrapGAppsHook + +, gst_all_1 +, kconfig +, kcoreaddons +, ki18n +, kirigami2 +, qtmultimedia +, qtquickcontrols2 +, syndication +}: + +let + inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad; +in +mkDerivation rec { + pname = "kasts"; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + wrapGAppsHook + ]; + + buildInputs = [ + gst-plugins-bad + gst-plugins-base + gst-plugins-good + gstreamer + + kconfig + kcoreaddons + ki18n + kirigami2 + qtquickcontrols2 + qtmultimedia + syndication + ]; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + dontWrapGApps = true; + + meta = with lib; { + description = "Mobile podcast application"; + homepage = "https://apps.kde.org/kasts/"; + # https://invent.kde.org/plasma-mobile/kasts/-/tree/master/LICENSES + license = with licenses; [ bsd2 cc-by-sa-40 cc0 gpl2Only gpl2Plus gpl3Only gpl3Plus lgpl3Plus ]; + maintainers = with maintainers; [ samueldr ]; + }; +} From cdc00b198c7ad9ac96929f7baa6b9fc46e453d92 Mon Sep 17 00:00:00 2001 From: Vladyslav M Date: Sat, 9 Oct 2021 08:23:01 +0300 Subject: [PATCH 05/35] unison: 2.51.3 -> 2.51.4 --- .../networking/sync/unison/default.nix | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index b106deb074e3..429042f3ee4b 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -7,7 +7,6 @@ , makeWrapper , ncurses , gnugrep -, fetchpatch , copyDesktopItems , makeDesktopItem , enableX11 ? true @@ -15,29 +14,19 @@ stdenv.mkDerivation rec { pname = "unison"; - version = "2.51.3"; + version = "2.51.4"; src = fetchFromGitHub { owner = "bcpierce00"; repo = "unison"; rev = "v${version}"; - sha256 = "sha256-42hmdMwOYSWGiDCmhuqtpCWtvtyD2l+kA/bhHD/Qh5Y="; + sha256 = "sha256-jcfq4X+r98bQqbQ3gRqJyryLdt1Y/2CLawqqIiUaQOo="; }; nativeBuildInputs = [ makeWrapper ] ++ lib.optional enableX11 copyDesktopItems; buildInputs = [ ocamlPackages.ocaml ncurses ]; - patches = [ - # Patch to fix build with ocaml 4.12. Remove in 2.51.4 - # https://github.com/bcpierce00/unison/pull/481 - (fetchpatch { - name = "fix-compile-with-ocaml-4.12.patch"; - url = "https://github.com/bcpierce00/unison/commit/14b885316e0a4b41cb80fe3daef7950f88be5c8f.patch?full_index=1"; - sha256 = "0j1rma1cwdsfql19zvzhfj2ys5c4lbhjcp6jrnck04xnckxxiy3d"; - }) - ]; - preBuild = lib.optionalString enableX11 '' sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" src/Makefile.OCaml '' + '' From ae5b37c833e7c4b93022c00ffd089c303d1be2b9 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 14 Jul 2021 01:12:01 -0400 Subject: [PATCH 06/35] keysmith: 0.2 -> 21.06 --- pkgs/applications/plasma-mobile/default.nix | 1 + pkgs/applications/plasma-mobile/keysmith.nix | 39 +++++++++++++++++++ pkgs/tools/security/keysmith/default.nix | 40 -------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 5 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 pkgs/applications/plasma-mobile/keysmith.nix delete mode 100644 pkgs/tools/security/keysmith/default.nix diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index 6283989f846a..d02bf4b9f396 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -66,6 +66,7 @@ let kalk = callPackage ./kalk.nix {}; kasts = callPackage ./kasts.nix {}; kclock = callPackage ./kclock.nix {}; + keysmith = callPackage ./keysmith.nix {}; koko = callPackage ./koko.nix {}; krecorder = callPackage ./krecorder.nix {}; ktrip = callPackage ./ktrip.nix {}; diff --git a/pkgs/applications/plasma-mobile/keysmith.nix b/pkgs/applications/plasma-mobile/keysmith.nix new file mode 100644 index 000000000000..eaca7f68e24b --- /dev/null +++ b/pkgs/applications/plasma-mobile/keysmith.nix @@ -0,0 +1,39 @@ +{ lib +, mkDerivation + +, cmake +, extra-cmake-modules + +, kdbusaddons +, ki18n +, kirigami2 +, kwindowsystem +, libsodium +, qtquickcontrols2 +}: + +mkDerivation rec { + pname = "keysmith"; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + ]; + + buildInputs = [ + kdbusaddons + ki18n + kirigami2 + kwindowsystem + libsodium + qtquickcontrols2 + ]; + + meta = with lib; { + description = "OTP client for Plasma Mobile and Desktop"; + license = licenses.gpl3; + homepage = "https://github.com/KDE/keysmith"; + maintainers = with maintainers; [ samueldr shamilton ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/security/keysmith/default.nix b/pkgs/tools/security/keysmith/default.nix deleted file mode 100644 index 142e9c1e4a04..000000000000 --- a/pkgs/tools/security/keysmith/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib -, mkDerivation -, makeWrapper -, fetchFromGitHub -, cmake -, extra-cmake-modules -, qtbase -, qtquickcontrols2 -, qtdeclarative -, qtgraphicaleffects -, kirigami2 -, oathToolkit -, ki18n -, libsodium -}: -mkDerivation rec { - - pname = "keysmith"; - version = "0.2"; - - src = fetchFromGitHub { - owner = "KDE"; - repo = "keysmith"; - rev = "v${version}"; - sha256 = "1gvzw23mly8cp7ag3xpbngpid9gqrfj8cyv9dar6i9j660bh03km"; - }; - - nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ]; - - buildInputs = [ libsodium ki18n oathToolkit kirigami2 qtquickcontrols2 qtbase ]; - propagatedBuildInput = [ oathToolkit ]; - - meta = with lib; { - description = "OTP client for Plasma Mobile and Desktop"; - license = licenses.gpl3; - homepage = "https://github.com/KDE/keysmith"; - maintainers = with maintainers; [ shamilton ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index de1f397d89bd..b7938faada57 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -392,6 +392,7 @@ mapAliases ({ keepassx2-http = keepassx-reboot; # added 2016-10-17 kexectools = kexec-tools; # added 2021-09-03 keybase-go = keybase; # added 2016-08-24 + keysmith = libsForQt5.plasmaMobileGear.keysmith; # added 2021-07-14 kinetic-cpp-client = throw "kinetic-cpp-client has been removed from nixpkgs, as it's abandoned."; # 2020-04-28 kicad-with-packages3d = kicad; # added 2019-11-25 kindlegen = throw "kindlegen has been removed from nixpkgs, as it's abandoned and no longer available for download."; # 2021-03-09 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f5f4114b467..2ed831d797be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6925,8 +6925,6 @@ with pkgs; kea = callPackage ../tools/networking/kea { }; - keysmith = libsForQt5.callPackage ../tools/security/keysmith { }; - ispell = callPackage ../tools/text/ispell {}; iodash = callPackage ../development/libraries/iodash { }; From 847b2cec0dd40f07dde8ad9fb12a1cca90aceca8 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 15:34:08 -0400 Subject: [PATCH 07/35] kweathercore: init at v0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why 0.4 when 0.5 is tagged? Because current kweather depends on 0.4 and won't build with 0.5... ¯\_(ツ)_/¯ --- .../libraries/kweathercore/default.nix | 35 +++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/kweathercore/default.nix diff --git a/pkgs/development/libraries/kweathercore/default.nix b/pkgs/development/libraries/kweathercore/default.nix new file mode 100644 index 000000000000..8ab5d358e5c9 --- /dev/null +++ b/pkgs/development/libraries/kweathercore/default.nix @@ -0,0 +1,35 @@ +{ mkDerivation +, lib +, fetchFromGitLab +, extra-cmake-modules +, ki18n +, qtlocation +}: + +mkDerivation rec { + pname = "kweathercore"; + version = "0.4"; + + src = fetchFromGitLab { + domain = "invent.kde.org"; + owner = "libraries"; + repo = pname; + rev = "v${version}"; + sha256 = "0mwmkr1xg0mcgbjgzp04chf55xyrgf0gndg3hs4c21bfjpy1gp3k"; + }; + + buildInputs = [ + ki18n + qtlocation + ]; + + nativeBuildInputs = [ extra-cmake-modules ]; + + meta = with lib; { + license = [ licenses.cc0 ]; + maintainers = [ maintainers.samueldr ]; + description = '' + Library to facilitate retrieval of weather information including forecasts and alerts + ''; + }; +} diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index a5adec5d78f6..6a9450125b8e 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -108,6 +108,8 @@ in (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGea kquickimageedit = callPackage ../development/libraries/kquickimageedit { }; + kweathercore = libsForQt5.callPackage ../development/libraries/kweathercore { }; + ldutils = callPackage ../development/libraries/ldutils { }; libcommuni = callPackage ../development/libraries/libcommuni { }; From f50a6b50a59a8ef66483b6cf41b0a0a8a5502c0f Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 22 Mar 2021 16:20:08 -0400 Subject: [PATCH 08/35] kweather: init at 21.06 --- pkgs/applications/plasma-mobile/default.nix | 1 + pkgs/applications/plasma-mobile/kweather.nix | 42 ++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/applications/plasma-mobile/kweather.nix diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index d02bf4b9f396..04532ea18e14 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -70,6 +70,7 @@ let koko = callPackage ./koko.nix {}; krecorder = callPackage ./krecorder.nix {}; ktrip = callPackage ./ktrip.nix {}; + kweather = callPackage ./kweather.nix {}; plasma-dialer = callPackage ./plasma-dialer.nix {}; plasma-phonebook = callPackage ./plasma-phonebook.nix {}; spacebar = callPackage ./spacebar.nix {}; diff --git a/pkgs/applications/plasma-mobile/kweather.nix b/pkgs/applications/plasma-mobile/kweather.nix new file mode 100644 index 000000000000..8d12c76646b5 --- /dev/null +++ b/pkgs/applications/plasma-mobile/kweather.nix @@ -0,0 +1,42 @@ +{ lib +, mkDerivation + +, cmake +, extra-cmake-modules + +, kconfig +, ki18n +, kirigami2 +, knotifications +, kquickcharts +, kweathercore +, plasma-framework +, qtquickcontrols2 +}: + +mkDerivation rec { + pname = "kweather"; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + ]; + + buildInputs = [ + kconfig + ki18n + kirigami2 + knotifications + kquickcharts + kweathercore + plasma-framework + qtquickcontrols2 + ]; + + meta = with lib; { + description = "Weather application for Plasma Mobile"; + homepage = "https://invent.kde.org/plasma-mobile/kweather"; + license = with licenses; [ gpl2Plus cc-by-40 ]; + maintainers = with maintainers; [ samueldr ]; + }; +} From e4767481a3fbd51f4169bc1675f1dfa3166012a4 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 16:45:22 -0400 Subject: [PATCH 09/35] plasmaMobileGear: 21.06 -> 21.07 - https://www.plasma-mobile.org/2021/07/20/plasma-mobile-gear-21-07/ (Nothing new) --- pkgs/applications/plasma-mobile/fetch.sh | 2 +- pkgs/applications/plasma-mobile/srcs.nix | 146 +++++++++++------------ 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/pkgs/applications/plasma-mobile/fetch.sh b/pkgs/applications/plasma-mobile/fetch.sh index 754fc3d1ce34..7531dafc63f3 100644 --- a/pkgs/applications/plasma-mobile/fetch.sh +++ b/pkgs/applications/plasma-mobile/fetch.sh @@ -1 +1 @@ -WGET_ARGS=( http://download.kde.org/stable/plasma-mobile/21.06 -A '*.tar.xz' ) +WGET_ARGS=( https://download.kde.org/stable/plasma-mobile/21.07/ -A '*.tar.xz' ) diff --git a/pkgs/applications/plasma-mobile/srcs.nix b/pkgs/applications/plasma-mobile/srcs.nix index 509770a4d91e..f8bb5cbdefa2 100644 --- a/pkgs/applications/plasma-mobile/srcs.nix +++ b/pkgs/applications/plasma-mobile/srcs.nix @@ -1,150 +1,150 @@ # DO NOT EDIT! This file is generated automatically. -# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/plasma-mobile/ +# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/plasma-mobile { fetchurl, mirror }: { alligator = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/alligator-21.06.tar.xz"; - sha256 = "18f1hsfl5glmrs778z8xkcszcs7fj148giz9bs5adg1sczjdja2j"; - name = "alligator-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/alligator-21.07.tar.xz"; + sha256 = "1zcx21wabsvk42lhcqqw911f26zilbh70vhlp2vpl5f8adhjl9ak"; + name = "alligator-21.07.tar.xz"; }; }; angelfish = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/angelfish-21.06.tar.xz"; - sha256 = "0yvp307gbj3c8wk7cyk2hdh1r1gy1x7j2mbr8pkl6sfyy0djcy48"; - name = "angelfish-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/angelfish-21.07.tar.xz"; + sha256 = "0znxzs261924an756bqhnm7y9placxd3ar8fi48vcp3x34kczm3v"; + name = "angelfish-21.07.tar.xz"; }; }; calindori = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/calindori-21.06.tar.xz"; - sha256 = "0ivfy9n7gcbxpyk6d6zlaj6xnzcvgrn01svild61cza5vcp1dp28"; - name = "calindori-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/calindori-21.07.tar.xz"; + sha256 = "00c4iklzfd4ap1nm6nh3dl5fzcsmf35i4dhyhz242byriz0k5gw2"; + name = "calindori-21.07.tar.xz"; }; }; kalk = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/kalk-21.06.tar.xz"; - sha256 = "06i9z3x8c5yiylzk272cbmp88q1bk6plspp6zckwzbmi19pkvmki"; - name = "kalk-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/kalk-21.07.tar.xz"; + sha256 = "142cy2jz2dnlsmghwnsgb2a4kmxbcr0mw9lxrn98rxfd4bb33pki"; + name = "kalk-21.07.tar.xz"; }; }; kasts = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/kasts-21.06.tar.xz"; - sha256 = "0kayg137haqfjb2j7bc61vnqq2gp0f24n41lqygwnndh2wyl22x0"; - name = "kasts-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/kasts-21.07.tar.xz"; + sha256 = "1ivdvhr9z3awa0pr531y4zyp2h63g1whr0kralak2k5n0wpzy44r"; + name = "kasts-21.07.tar.xz"; }; }; kclock = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/kclock-21.06.tar.xz"; - sha256 = "1h91l2ip15kfd2p85r96npib34gms7zacnn8dqb4j2m6znxjh9ib"; - name = "kclock-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/kclock-21.07.tar.xz"; + sha256 = "0b1264qpwrw6rbszwbaafbah0awgik4pjq7i3q36w14b5wmjyg64"; + name = "kclock-21.07.tar.xz"; }; }; keysmith = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/keysmith-21.06.tar.xz"; - sha256 = "01v05m327av4hwn50slay8w1flsgh2as06z582r08y4rrn2q6crg"; - name = "keysmith-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/keysmith-21.07.tar.xz"; + sha256 = "1vbcxabibxvzh97x028g6vzlgrbi1niiqj89p0icvjz7bsjzfiy7"; + name = "keysmith-21.07.tar.xz"; }; }; koko = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/koko-21.06.tar.xz"; - sha256 = "117v8m68i4yq0j1lr2xm1c08474xlscxdnxv979gjcz0ghw402q2"; - name = "koko-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/koko-21.07.tar.xz"; + sha256 = "0sg4h1imb5zxkbn16ybsbiydqimah2cm9asrbjwgnr47ydx176hn"; + name = "koko-21.07.tar.xz"; }; }; kongress = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/kongress-21.06.tar.xz"; - sha256 = "03nm9jnhv5nqq8l9qp6xxk96vl44dias9y9y59agcs9lz16vxxvz"; - name = "kongress-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/kongress-21.07.tar.xz"; + sha256 = "0j3jj5xkb1l5bxqz2hi8y66xpi145phrkdgxysq444fwdxp7pr2l"; + name = "kongress-21.07.tar.xz"; }; }; krecorder = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/krecorder-21.06.tar.xz"; - sha256 = "1l2wq9hwd1dimc8n35hd7cckh8mcjabjv936qzk32c7pychxnz5f"; - name = "krecorder-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/krecorder-21.07.tar.xz"; + sha256 = "18vyhykwr5az2g2d8m8p8il7znffqzivrfix7r7aqizj7jf46l0y"; + name = "krecorder-21.07.tar.xz"; }; }; ktrip = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/ktrip-21.06.tar.xz"; - sha256 = "172y49g7h60dksd96fim67c1lmqfpha83rvh5r0hljla8x4jjrip"; - name = "ktrip-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/ktrip-21.07.tar.xz"; + sha256 = "1aglj0s72ilpb4fgkk6v6i0yg0l3g2918k8whvm63k98y0jwa7r9"; + name = "ktrip-21.07.tar.xz"; }; }; kweather = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/kweather-21.06.tar.xz"; - sha256 = "0ja0bagsk5rbdmgpakc236vlx1dfk5bnr60cdb1da7pswvxz9gfn"; - name = "kweather-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/kweather-21.07.tar.xz"; + sha256 = "092fx2w2bv80d6kddj93xw942a85mjbrbzsjqrg9msdbakcxfaal"; + name = "kweather-21.07.tar.xz"; }; }; plasma-dialer = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/plasma-dialer-21.06.tar.xz"; - sha256 = "1b6zdswy5wfbzcmpy5hmblbv95hb5bwdh6bi7f1r196aw74j4hxl"; - name = "plasma-dialer-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/plasma-dialer-21.07.tar.xz"; + sha256 = "1f69cfjdjxnldg03xrdrm9jaavmrpc7l8plnfmvria24dq8bzkx0"; + name = "plasma-dialer-21.07.tar.xz"; }; }; plasma-phonebook = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/plasma-phonebook-21.06.tar.xz"; - sha256 = "0a5vkvysjmp3lbwn9s1pfjijk9mc0yvyp3xshg0w8bz5ky06rs8f"; - name = "plasma-phonebook-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/plasma-phonebook-21.07.tar.xz"; + sha256 = "0cw3wm2pm3q9d80b23p7ina9jpbq6f8j662plyhdz2dq18c9dyni"; + name = "plasma-phonebook-21.07.tar.xz"; }; }; plasma-settings = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/plasma-settings-21.06.tar.xz"; - sha256 = "1lvjjdrgk5cxxzsb2knlbh27n7ji1plpcxr2lycfv0fjq51rjsjg"; - name = "plasma-settings-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/plasma-settings-21.07.tar.xz"; + sha256 = "0cyvbjj4j0778bqslrydllgri7j72jj04yi3rlb7n6i4a5ziaibd"; + name = "plasma-settings-21.07.tar.xz"; }; }; qmlkonsole = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/qmlkonsole-21.06.tar.xz"; - sha256 = "15rwn0rhx4c7mn68494ylg8ng1pb4afhwwndiarr8fzmi29fgx8l"; - name = "qmlkonsole-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/qmlkonsole-21.07.tar.xz"; + sha256 = "1y8jv8bspzinxbzz6aj6fwp8118k15vxcqs0jlyjd912kkjpg978"; + name = "qmlkonsole-21.07.tar.xz"; }; }; spacebar = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/spacebar-21.06.tar.xz"; - sha256 = "14wk35yk7crp9449x23yy8sxg8cnxb7gp6fhnws8zc89w3l2faqn"; - name = "spacebar-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/spacebar-21.07.tar.xz"; + sha256 = "0xqffhzzs0gzyzdyajksfghzsgsls0f0sbykmywqsk3a0jpr0d1w"; + name = "spacebar-21.07.tar.xz"; }; }; tokodon = { - version = "21.06"; + version = "21.07"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.06/tokodon-21.06.tar.xz"; - sha256 = "1xzjq3sqdccarq9a3w54hajqnhlg3lplg17f81sy9yld1as4rria"; - name = "tokodon-21.06.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.07/tokodon-21.07.tar.xz"; + sha256 = "08mjh75h3ckvmkprjvarjhhkqq8nldyblzlz2q5rmmg682v6mf7v"; + name = "tokodon-21.07.tar.xz"; }; }; } From caaebc00820f46eff90a599a1897a8de56144166 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 17:01:32 -0400 Subject: [PATCH 10/35] ktrip: Fix build for 21.07 --- pkgs/applications/plasma-mobile/ktrip.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/plasma-mobile/ktrip.nix b/pkgs/applications/plasma-mobile/ktrip.nix index cc1404d064fd..5377dd106586 100644 --- a/pkgs/applications/plasma-mobile/ktrip.nix +++ b/pkgs/applications/plasma-mobile/ktrip.nix @@ -12,6 +12,7 @@ , kirigami2 , kitemmodels , kpublictransport +, qqc2-desktop-style , qtquickcontrols2 }: @@ -32,6 +33,7 @@ mkDerivation rec { kirigami2 kitemmodels kpublictransport + qqc2-desktop-style qtquickcontrols2 ]; From 1b87466f2c7d5948e8c504e8cfb9a06257f0f3dd Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 17:03:12 -0400 Subject: [PATCH 11/35] spacebar: Fix build for 21.07 --- pkgs/applications/plasma-mobile/spacebar.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/plasma-mobile/spacebar.nix b/pkgs/applications/plasma-mobile/spacebar.nix index 1c661041f7ae..8d5665501086 100644 --- a/pkgs/applications/plasma-mobile/spacebar.nix +++ b/pkgs/applications/plasma-mobile/spacebar.nix @@ -9,7 +9,9 @@ , kirigami2 , knotifications , kpeople +, libphonenumber , libqofono +, protobuf , telepathy }: @@ -27,7 +29,9 @@ mkDerivation rec { kirigami2 knotifications kpeople + libphonenumber libqofono + protobuf # Needed by libphonenumber telepathy ]; From 1e62112123a2234c9373340e1467ae6c7f32ec69 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 17:16:31 -0400 Subject: [PATCH 12/35] plasmaMobileGear: 21.07 -> 21.08 - https://www.plasma-mobile.org/2021/08/31/plasma-mobile-gear-21-08/ New: - audiotube --- pkgs/applications/plasma-mobile/fetch.sh | 2 +- pkgs/applications/plasma-mobile/srcs.nix | 152 ++++++++++++----------- 2 files changed, 81 insertions(+), 73 deletions(-) diff --git a/pkgs/applications/plasma-mobile/fetch.sh b/pkgs/applications/plasma-mobile/fetch.sh index 7531dafc63f3..14995aeb2b7f 100644 --- a/pkgs/applications/plasma-mobile/fetch.sh +++ b/pkgs/applications/plasma-mobile/fetch.sh @@ -1 +1 @@ -WGET_ARGS=( https://download.kde.org/stable/plasma-mobile/21.07/ -A '*.tar.xz' ) +WGET_ARGS=( https://download.kde.org/stable/plasma-mobile/21.08/ -A '*.tar.xz' ) diff --git a/pkgs/applications/plasma-mobile/srcs.nix b/pkgs/applications/plasma-mobile/srcs.nix index f8bb5cbdefa2..06b551a94cf4 100644 --- a/pkgs/applications/plasma-mobile/srcs.nix +++ b/pkgs/applications/plasma-mobile/srcs.nix @@ -4,147 +4,155 @@ { alligator = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/alligator-21.07.tar.xz"; - sha256 = "1zcx21wabsvk42lhcqqw911f26zilbh70vhlp2vpl5f8adhjl9ak"; - name = "alligator-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/alligator-21.08.tar.xz"; + sha256 = "1dhwfwd1v5wmx3sldpygb79kz87j13wd0arhlkm94z1whsixan0q"; + name = "alligator-21.08.tar.xz"; }; }; angelfish = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/angelfish-21.07.tar.xz"; - sha256 = "0znxzs261924an756bqhnm7y9placxd3ar8fi48vcp3x34kczm3v"; - name = "angelfish-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/angelfish-21.08.tar.xz"; + sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh"; + name = "angelfish-21.08.tar.xz"; + }; + }; + audiotube = { + version = "21.08"; + src = fetchurl { + url = "${mirror}/stable/plasma-mobile/21.08/audiotube-21.08.tar.xz"; + sha256 = "14h4xna9v70lmp7cfpvdnz0f5a4gwgj0q3byccmawm38xsv15v8c"; + name = "audiotube-21.08.tar.xz"; }; }; calindori = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/calindori-21.07.tar.xz"; - sha256 = "00c4iklzfd4ap1nm6nh3dl5fzcsmf35i4dhyhz242byriz0k5gw2"; - name = "calindori-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/calindori-21.08.tar.xz"; + sha256 = "08s16a8skh02n8ygqwryxpzczj5aqr5k58aijaz2gzx45m7ym31b"; + name = "calindori-21.08.tar.xz"; }; }; kalk = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/kalk-21.07.tar.xz"; - sha256 = "142cy2jz2dnlsmghwnsgb2a4kmxbcr0mw9lxrn98rxfd4bb33pki"; - name = "kalk-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/kalk-21.08.tar.xz"; + sha256 = "0xzrahpz47yajalsfmpzmavxjwmr4bgljwyz2dhxdg40ryjxdy23"; + name = "kalk-21.08.tar.xz"; }; }; kasts = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/kasts-21.07.tar.xz"; - sha256 = "1ivdvhr9z3awa0pr531y4zyp2h63g1whr0kralak2k5n0wpzy44r"; - name = "kasts-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/kasts-21.08.tar.xz"; + sha256 = "10v6icxwv46nihzbdi0n2w71bsg7l166z7jf9rb7vf2mjh1gqavn"; + name = "kasts-21.08.tar.xz"; }; }; kclock = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/kclock-21.07.tar.xz"; - sha256 = "0b1264qpwrw6rbszwbaafbah0awgik4pjq7i3q36w14b5wmjyg64"; - name = "kclock-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/kclock-21.08.tar.xz"; + sha256 = "1zq0fxlwd7l3b6dgfqsmv1x4wvhmrjz5r0a38hbd7j7pzgyix47d"; + name = "kclock-21.08.tar.xz"; }; }; keysmith = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/keysmith-21.07.tar.xz"; - sha256 = "1vbcxabibxvzh97x028g6vzlgrbi1niiqj89p0icvjz7bsjzfiy7"; - name = "keysmith-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/keysmith-21.08.tar.xz"; + sha256 = "0fa8inli7cwmb75af0mr2cflng0r6k3pd6ckih6ph7szqbpg2x90"; + name = "keysmith-21.08.tar.xz"; }; }; koko = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/koko-21.07.tar.xz"; - sha256 = "0sg4h1imb5zxkbn16ybsbiydqimah2cm9asrbjwgnr47ydx176hn"; - name = "koko-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/koko-21.08.tar.xz"; + sha256 = "1sqlcl871m6dlrnkkhqa3xfwix01d74d7jf94r1a3p32hqljv76p"; + name = "koko-21.08.tar.xz"; }; }; kongress = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/kongress-21.07.tar.xz"; - sha256 = "0j3jj5xkb1l5bxqz2hi8y66xpi145phrkdgxysq444fwdxp7pr2l"; - name = "kongress-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/kongress-21.08.tar.xz"; + sha256 = "099ds4bv4ngx21f28hxcvc17wd2nk786kydwf2h5n3mdd2mgz3ka"; + name = "kongress-21.08.tar.xz"; }; }; krecorder = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/krecorder-21.07.tar.xz"; - sha256 = "18vyhykwr5az2g2d8m8p8il7znffqzivrfix7r7aqizj7jf46l0y"; - name = "krecorder-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/krecorder-21.08.tar.xz"; + sha256 = "1381x889h37saf6k875iqhwz5vbixrp7650smxp31r56ycrqq26i"; + name = "krecorder-21.08.tar.xz"; }; }; ktrip = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/ktrip-21.07.tar.xz"; - sha256 = "1aglj0s72ilpb4fgkk6v6i0yg0l3g2918k8whvm63k98y0jwa7r9"; - name = "ktrip-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/ktrip-21.08.tar.xz"; + sha256 = "0ipxi3pqd7mznq3qjf9j9w3wyck85lxnr81ay6b3ricfb08ry68x"; + name = "ktrip-21.08.tar.xz"; }; }; kweather = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/kweather-21.07.tar.xz"; - sha256 = "092fx2w2bv80d6kddj93xw942a85mjbrbzsjqrg9msdbakcxfaal"; - name = "kweather-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/kweather-21.08.tar.xz"; + sha256 = "0b1zjwsakwsnh6827zjhypvb04c78gwwygr7k1cy2x3finrp5if5"; + name = "kweather-21.08.tar.xz"; }; }; plasma-dialer = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/plasma-dialer-21.07.tar.xz"; - sha256 = "1f69cfjdjxnldg03xrdrm9jaavmrpc7l8plnfmvria24dq8bzkx0"; - name = "plasma-dialer-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/plasma-dialer-21.08.tar.xz"; + sha256 = "14vgjg0nihhm446cfrrld1l43r50dlah5xs2ypdnm68618bdc7p1"; + name = "plasma-dialer-21.08.tar.xz"; }; }; plasma-phonebook = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/plasma-phonebook-21.07.tar.xz"; - sha256 = "0cw3wm2pm3q9d80b23p7ina9jpbq6f8j662plyhdz2dq18c9dyni"; - name = "plasma-phonebook-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/plasma-phonebook-21.08.tar.xz"; + sha256 = "09gr5mkwhayx6k6bhm29bmcvdlqqw8jj7gydh5fz40g9z98c84km"; + name = "plasma-phonebook-21.08.tar.xz"; }; }; plasma-settings = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/plasma-settings-21.07.tar.xz"; - sha256 = "0cyvbjj4j0778bqslrydllgri7j72jj04yi3rlb7n6i4a5ziaibd"; - name = "plasma-settings-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/plasma-settings-21.08.tar.xz"; + sha256 = "005v1gyrzl9b0k875p2wipja3l8l4awp8nl2d1jx7c28lqaspz2j"; + name = "plasma-settings-21.08.tar.xz"; }; }; qmlkonsole = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/qmlkonsole-21.07.tar.xz"; - sha256 = "1y8jv8bspzinxbzz6aj6fwp8118k15vxcqs0jlyjd912kkjpg978"; - name = "qmlkonsole-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/qmlkonsole-21.08.tar.xz"; + sha256 = "1p3ysf6sgiji86400523hm67rvw3znj3a7k6g6s83dxynxdh2faq"; + name = "qmlkonsole-21.08.tar.xz"; }; }; spacebar = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/spacebar-21.07.tar.xz"; - sha256 = "0xqffhzzs0gzyzdyajksfghzsgsls0f0sbykmywqsk3a0jpr0d1w"; - name = "spacebar-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/spacebar-21.08.tar.xz"; + sha256 = "1cg36iys4x7p97ywilnp2lzz1ry5a1m7jz38yh2yiw6m8wvzfqff"; + name = "spacebar-21.08.tar.xz"; }; }; tokodon = { - version = "21.07"; + version = "21.08"; src = fetchurl { - url = "${mirror}/stable/plasma-mobile/21.07/tokodon-21.07.tar.xz"; - sha256 = "08mjh75h3ckvmkprjvarjhhkqq8nldyblzlz2q5rmmg682v6mf7v"; - name = "tokodon-21.07.tar.xz"; + url = "${mirror}/stable/plasma-mobile/21.08/tokodon-21.08.tar.xz"; + sha256 = "0j9zfcdss1872hv8xxrmy0jjmcz3y5kdz8gdrd6qmig5scrzjvnf"; + name = "tokodon-21.08.tar.xz"; }; }; } From a24b5e511cf2c6859dda725af48f8c296f777613 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 17:27:56 -0400 Subject: [PATCH 13/35] kweathercore: 0.4 -> 0.5 --- pkgs/development/libraries/kweathercore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/kweathercore/default.nix b/pkgs/development/libraries/kweathercore/default.nix index 8ab5d358e5c9..f3617059f1e7 100644 --- a/pkgs/development/libraries/kweathercore/default.nix +++ b/pkgs/development/libraries/kweathercore/default.nix @@ -8,14 +8,14 @@ mkDerivation rec { pname = "kweathercore"; - version = "0.4"; + version = "0.5"; src = fetchFromGitLab { domain = "invent.kde.org"; owner = "libraries"; repo = pname; rev = "v${version}"; - sha256 = "0mwmkr1xg0mcgbjgzp04chf55xyrgf0gndg3hs4c21bfjpy1gp3k"; + sha256 = "08ipabskhsbspkzzdlpwl89r070q8d0vc9500ma6d5i9fnpmkz6d"; }; buildInputs = [ From b9ecb689753d392d49237823083aec626c73ea58 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 17:28:04 -0400 Subject: [PATCH 14/35] kweather: Fix build for 21.08 --- pkgs/applications/plasma-mobile/kweather.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/plasma-mobile/kweather.nix b/pkgs/applications/plasma-mobile/kweather.nix index 8d12c76646b5..497061624b92 100644 --- a/pkgs/applications/plasma-mobile/kweather.nix +++ b/pkgs/applications/plasma-mobile/kweather.nix @@ -11,6 +11,7 @@ , kquickcharts , kweathercore , plasma-framework +, qtcharts , qtquickcontrols2 }: @@ -30,6 +31,7 @@ mkDerivation rec { kquickcharts kweathercore plasma-framework + qtcharts qtquickcontrols2 ]; From 2837f21ee941c86f49b298452a7e009e721c8eed Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 20:55:48 -0400 Subject: [PATCH 15/35] audiotube: init at 21.08 --- pkgs/applications/plasma-mobile/audiotube.nix | 61 +++++++++++++++++++ pkgs/applications/plasma-mobile/default.nix | 1 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/applications/plasma-mobile/audiotube.nix diff --git a/pkgs/applications/plasma-mobile/audiotube.nix b/pkgs/applications/plasma-mobile/audiotube.nix new file mode 100644 index 000000000000..1a1dedc7b426 --- /dev/null +++ b/pkgs/applications/plasma-mobile/audiotube.nix @@ -0,0 +1,61 @@ +{ lib +, mkDerivation +, fetchpatch + +, extra-cmake-modules + +, kcoreaddons +, kcrash +, ki18n +, kirigami2 +, qtmultimedia +, qtquickcontrols2 +, python3Packages +}: + +mkDerivation rec { + pname = "audiotube"; + + patches = [ + # Fix compatibility with ytmusicapi 0.19.1 + (fetchpatch { + url = "https://invent.kde.org/plasma-mobile/audiotube/-/commit/734caa02805988200f923b88d1590b3f7dac8ac2.patch"; + sha256 = "0zq4f0w84dv0630bpvmqkfmhxbvibr2fxhzy6d2mnf098028gzyd"; + }) + ]; + + nativeBuildInputs = [ + extra-cmake-modules + python3Packages.wrapPython + python3Packages.pybind11 + ]; + + buildInputs = [ + kcoreaddons + kcrash + ki18n + kirigami2 + qtmultimedia + qtquickcontrols2 + python3Packages.youtube-dl + python3Packages.ytmusicapi + ]; + + pythonPath = [ + python3Packages.youtube-dl + python3Packages.ytmusicapi + ]; + + preFixup = '' + buildPythonPath "$pythonPath" + qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH") + ''; + + meta = with lib; { + description = "Client for YouTube Music"; + homepage = "https://invent.kde.org/plasma-mobile/audiotube"; + # https://invent.kde.org/plasma-mobile/audiotube/-/tree/c503d0607a3386112beaa9cf990ab85fe33ef115/LICENSES + license = with licenses; [ bsd2 cc0 gpl2Only gpl3Only ]; + maintainers = with maintainers; [ samueldr ]; + }; +} diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index 04532ea18e14..643727834f99 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -62,6 +62,7 @@ let }; in { alligator = callPackage ./alligator.nix {}; + audiotube = callPackage ./audiotube.nix {}; calindori = callPackage ./calindori.nix {}; kalk = callPackage ./kalk.nix {}; kasts = callPackage ./kasts.nix {}; From 74134f7eeef4108b718fc929bb05985c1cc1f982 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Wed, 6 Oct 2021 20:58:48 -0400 Subject: [PATCH 16/35] angelfish: Provide as Plasma Mobile Gear --- .../default.nix => plasma-mobile/angelfish.nix} | 11 +++-------- pkgs/applications/plasma-mobile/default.nix | 1 + pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) rename pkgs/applications/{networking/browsers/angelfish/default.nix => plasma-mobile/angelfish.nix} (80%) diff --git a/pkgs/applications/networking/browsers/angelfish/default.nix b/pkgs/applications/plasma-mobile/angelfish.nix similarity index 80% rename from pkgs/applications/networking/browsers/angelfish/default.nix rename to pkgs/applications/plasma-mobile/angelfish.nix index dedc51469670..29d511d85f8b 100644 --- a/pkgs/applications/networking/browsers/angelfish/default.nix +++ b/pkgs/applications/plasma-mobile/angelfish.nix @@ -16,20 +16,15 @@ , qtquickcontrols2 , qtwebengine , rustPlatform +, srcs }: mkDerivation rec { pname = "angelfish"; - version = "21.08"; - - src = fetchurl { - url = "mirror://kde/stable/plasma-mobile/${version}/angelfish-${version}.tar.xz"; - sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh"; - }; cargoDeps = rustPlatform.fetchCargoTarball { - inherit src; - name = "${pname}-${version}"; + src = srcs.angelfish.src; + name = "${pname}-${srcs.angelfish.version}"; sha256 = "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak"; }; diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index 643727834f99..fd9ae2a2bae8 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -62,6 +62,7 @@ let }; in { alligator = callPackage ./alligator.nix {}; + angelfish = callPackage ./angelfish.nix { inherit srcs; }; audiotube = callPackage ./audiotube.nix {}; calindori = callPackage ./calindori.nix {}; kalk = callPackage ./kalk.nix {}; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b7938faada57..ada242aab1f8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -53,6 +53,7 @@ mapAliases ({ aminal = throw "aminal was renamed to darktile."; # added 2021-09-28 ammonite-repl = ammonite; # added 2017-05-02 amsn = throw "amsn has been removed due to being unmaintained."; # added 2020-12-09 + angelfish = libsForQt5.plasmaMobileGear.angelfish; # added 2021-10-06 antimicro = throw "antimicro has been removed as it was broken, see antimicroX instead."; # added 2020-08-06 arduino_core = arduino-core; # added 2015-02-04 ardour_5 = throw "ardour_5 has been removed. see https://github.com/NixOS/nixpkgs/issues/139549"; # added 2021-09-28 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ed831d797be..7bf7a500bbfe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23437,8 +23437,6 @@ with pkgs; }); android-studio = androidStudioPackages.stable; - angelfish = libsForQt5.callPackage ../applications/networking/browsers/angelfish { }; - animbar = callPackage ../applications/graphics/animbar { }; antfs-cli = callPackage ../applications/misc/antfs-cli {}; From 88fe1fe9ec34a05bc262fb5b30dd1b77dd88ac0b Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 18 Oct 2021 16:23:44 -0400 Subject: [PATCH 17/35] angelfish: Break build on partial updates The hardcoded cargo hash could have been left unchanged on package updates. By breaking the build explicitly we ensure partial updates won't accidentally slip past us. --- pkgs/applications/plasma-mobile/angelfish.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/plasma-mobile/angelfish.nix b/pkgs/applications/plasma-mobile/angelfish.nix index 29d511d85f8b..99df3f55c1d5 100644 --- a/pkgs/applications/plasma-mobile/angelfish.nix +++ b/pkgs/applications/plasma-mobile/angelfish.nix @@ -17,15 +17,28 @@ , qtwebengine , rustPlatform , srcs + +# These must be updated in tandem with package updates. +, cargoShaForVersion ? "21.08" +, cargoSha256 ? "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak" }: +# Guard against incomplete updates. +# Values are provided as callPackage inputs to enable easier overrides through overlays. +if cargoShaForVersion != srcs.angelfish.version +then builtins.throw '' + angelfish package update is incomplete. + Hash for cargo dependencies is declared for version ${cargoShaForVersion}, but we're building ${srcs.angelfish.version}. + Update the cargoSha256 and cargoShaForVersion for angelfish. +'' else + mkDerivation rec { pname = "angelfish"; cargoDeps = rustPlatform.fetchCargoTarball { src = srcs.angelfish.src; name = "${pname}-${srcs.angelfish.version}"; - sha256 = "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak"; + sha256 = cargoSha256; }; nativeBuildInputs = [ From 8d6de9c6009af73097c90eff2054df527d3924b3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 21 Oct 2021 08:43:51 +0100 Subject: [PATCH 18/35] postgresql11Packages.age: use latest bison The package builds successfully with bison-3.7.6 and 3.8.2. --- pkgs/servers/sql/postgresql/packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index 9cca7c8374bd..1986ed681997 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -1,8 +1,6 @@ self: super: { - age = super.callPackage ./ext/age.nix { - bison = self.bison_3_5; - }; + age = super.callPackage ./ext/age.nix { }; periods = super.callPackage ./ext/periods.nix { }; From 471e147fd094c76495cd65f3766ae931fe76b330 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 21 Oct 2021 22:40:41 +0200 Subject: [PATCH 19/35] chromiumDev: 96.0.4664.18 -> 97.0.4676.0 --- .../networking/browsers/chromium/upstream-info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index e48539aab5bb..aa77bae2d231 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -31,15 +31,15 @@ } }, "dev": { - "version": "96.0.4664.18", - "sha256": "0z7hplfl9mlbn07svcavzcb2gqn1hchwhhlpz0qykf6kd441kxpf", - "sha256bin64": "0y09aginw5qg7apm9wvxny7y8nxhsq7gnxp1jmghfjhv5xq7pdn9", + "version": "97.0.4676.0", + "sha256": "1cf660h7n1d4ds63747zfc4wmwxm348grcv40zg614cpjm4q68b5", + "sha256bin64": "116a4d47s3sx1pq8hhqybdsjxcv8657xaldrlix2z7jh94ip2nwh", "deps": { "gn": { - "version": "2021-09-24", + "version": "2021-10-08", "url": "https://gn.googlesource.com/gn", - "rev": "0153d369bbccc908f4da4993b1ba82728055926a", - "sha256": "0y4414h8jqsbz5af6pn91c0vkfp4s281s85g992xfyl785c5zbsi" + "rev": "693f9fb87e4febdd4299db9f73d8d2c958e63148", + "sha256": "1qfjj2mdpflry4f9fkagvb76zwfibys4nqz9lddy1zh5nnbd9mff" } } }, From 36bbf2562b391ddaed44c7e9f8d4a4cf24a5bad2 Mon Sep 17 00:00:00 2001 From: Armin Rothfuss Date: Thu, 21 Oct 2021 23:58:42 +0200 Subject: [PATCH 20/35] qtcreator: 4.14.0 -> 5.0.2 --- pkgs/development/tools/qtcreator/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix index 8340891da01a..57a0f188dc8f 100644 --- a/pkgs/development/tools/qtcreator/default.nix +++ b/pkgs/development/tools/qtcreator/default.nix @@ -20,12 +20,12 @@ in mkDerivation rec { pname = "qtcreator"; - version = "4.14.0"; + version = "5.0.2"; baseVersion = builtins.concatStringsSep "." (lib.take 2 (builtins.splitVersion version)); src = fetchurl { url = "http://download.qt-project.org/official_releases/${pname}/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.xz"; - sha256 = "07i045mzwbfhwj2jlijhz9xs6ay03qs5dgcw2kzlcr79a69i0h6j"; + sha256 = "1bf07150226da46237f26f5eaa9f090ce81ed79b9bc75e0dfa6328043e360103"; }; buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative elfutils.dev ] ++ @@ -75,6 +75,8 @@ mkDerivation rec { ''; postInstall = '' + mkdir -p $out/share/applications + cp share/applications/org.qt-project.qtcreator.desktop $out/share/applications substituteInPlace $out/share/applications/org.qt-project.qtcreator.desktop \ --replace "Exec=qtcreator" "Exec=$out/bin/qtcreator" ''; From c4775c6038c15d0f41615f50820e5931e2c05fde Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Thu, 21 Oct 2021 15:14:36 -0700 Subject: [PATCH 21/35] hqplayerd: add OpenGL to runpath --- pkgs/servers/hqplayerd/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/hqplayerd/default.nix b/pkgs/servers/hqplayerd/default.nix index d2b46097ac10..3bda53ad1404 100644 --- a/pkgs/servers/hqplayerd/default.nix +++ b/pkgs/servers/hqplayerd/default.nix @@ -1,5 +1,6 @@ { stdenv , alsa-lib +, addOpenGLRunpath , autoPatchelfHook , cairo , fetchurl @@ -28,7 +29,7 @@ stdenv.mkDerivation rec { ${rpmextract}/bin/rpmextract $src ''; - nativeBuildInputs = [ autoPatchelfHook rpmextract ]; + nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook rpmextract ]; buildInputs = [ alsa-lib @@ -86,8 +87,12 @@ stdenv.mkDerivation rec { --replace "NetworkManager-wait-online.service" "" ''; - postFixup = '' - patchelf --replace-needed libomp.so.5 libomp.so $out/bin/hqplayerd + # NB: addOpenGLRunpath needs to run _after_ autoPatchelfHook, which runs in + # postFixup, so we tack it on here. + doInstallCheck = true; + installCheckPhase = '' + addOpenGLRunpath $out/bin/hqplayerd + $out/bin/hqplayerd --version ''; meta = with lib; { From 4c121d16308cdaed5795a3c981fb7cef37b04449 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 22 Oct 2021 10:51:22 -0400 Subject: [PATCH 22/35] gitoxide: 0.8.4 -> 0.10.0 --- .../version-management/gitoxide/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/version-management/gitoxide/default.nix b/pkgs/applications/version-management/gitoxide/default.nix index b4bc0db4bac4..570a4c06abf9 100644 --- a/pkgs/applications/version-management/gitoxide/default.nix +++ b/pkgs/applications/version-management/gitoxide/default.nix @@ -1,22 +1,31 @@ -{ lib, stdenv, rustPlatform, cmake, fetchFromGitHub, pkg-config, openssl -, libiconv, Security, SystemConfiguration }: +{ lib +, rustPlatform +, fetchFromGitHub +, cmake +, pkg-config +, stdenv +, libiconv +, Security +, SystemConfiguration +, openssl +}: rustPlatform.buildRustPackage rec { pname = "gitoxide"; - version = "0.8.4"; + version = "0.10.0"; src = fetchFromGitHub { owner = "Byron"; repo = "gitoxide"; rev = "v${version}"; - sha256 = "WH8YiW1X7TkURjncm0OefxrZhnhGHaGLwxRNxe17g/0="; + sha256 = "sha256-c29gmmkIOyS+HNq2kv53yq+sdEDmQbSmcvVGcd55/hk="; }; - cargoSha256 = "eTPJMYl9m81o4PJKfpDs61KmehSvKnY+bgybEodOhAM="; + cargoSha256 = "sha256-oc7XpiOZj4bfqdwrEHj/CzNtWzYWFkgMJOySJNgxAGQ="; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = if stdenv.isDarwin - then [ libiconv Security SystemConfiguration] + then [ libiconv Security SystemConfiguration ] else [ openssl ]; # Needed to get openssl-sys to use pkg-config. @@ -25,7 +34,8 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "A command-line application for interacting with git repositories"; homepage = "https://github.com/Byron/gitoxide"; + changelog = "https://github.com/Byron/gitoxide/blob/v${version}/CHANGELOG.md"; license = with licenses; [ mit /* or */ asl20 ]; - maintainers = [ maintainers.syberant ]; + maintainers = with maintainers; [ syberant ]; }; } From 026fad5fa957fb52615a91781b54c9382f2f5536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Oct 2021 17:43:14 +0200 Subject: [PATCH 23/35] delve: 1.7.1 -> 1.7.2, add SuperSandro2000 as maintainer, add symlink for vscode golang extension --- pkgs/development/tools/delve/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/delve/default.nix b/pkgs/development/tools/delve/default.nix index 3ee608d4bb7f..bf0391fd755f 100644 --- a/pkgs/development/tools/delve/default.nix +++ b/pkgs/development/tools/delve/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "delve"; - version = "1.7.1"; + version = "1.7.2"; goPackagePath = "github.com/go-delve/delve"; excludedPackages = "\\(_fixtures\\|scripts\\|service/test\\)"; @@ -11,7 +11,7 @@ buildGoPackage rec { owner = "go-delve"; repo = "delve"; rev = "v${version}"; - sha256 = "sha256-dnmV7LZjq86AwLWXfWBGm1pmFM0uipv1FwR6EhV8CZQ="; + sha256 = "sha256-Mye8Gh73yQ1fhjVpEOKBQGjdOzgMUqzdNiBjRRTteTg="; }; subPackages = [ "cmd/dlv" ]; @@ -22,12 +22,16 @@ buildGoPackage rec { # fortify source breaks build since delve compiles with -O0 wrapProgram $out/bin/dlv \ --prefix disableHardening " " fortify + + # add symlink for vscode golang extension + # https://github.com/golang/vscode-go/blob/master/docs/debugging.md#manually-installing-dlv-dap + ln $out/bin/dlv $out/bin/dlv-dap ''; meta = with lib; { description = "debugger for the Go programming language"; homepage = "https://github.com/derekparker/delve"; - maintainers = with maintainers; [ vdemeester ]; + maintainers = with maintainers; [ SuperSandro2000 vdemeester ]; license = licenses.mit; platforms = [ "x86_64-linux" ] ++ platforms.darwin; }; From 32e10ca78a4594eacdaa83dca9bb1263bc30809f Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 24 Sep 2021 00:15:29 +0200 Subject: [PATCH 24/35] lpcfreenetdv: init at unstable-2021-06-29 --- .../libraries/lpcnetfreedv/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/libraries/lpcnetfreedv/default.nix diff --git a/pkgs/development/libraries/lpcnetfreedv/default.nix b/pkgs/development/libraries/lpcnetfreedv/default.nix new file mode 100644 index 000000000000..ac12d3a5fd6b --- /dev/null +++ b/pkgs/development/libraries/lpcnetfreedv/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, codec2 }: + +let + dataVersion = "191005_v1.0"; + data = fetchurl { + url = "http://rowetel.com/downloads/deep/lpcnet_${dataVersion}.tgz"; + sha256 = "1j1695hm2pg6ri611f9kr3spm4yxvpikws55z9zxizai8y94152h"; + }; +in stdenv.mkDerivation rec { + pname = "lpcnetfreedv"; + version = "unstable-2021-06-29"; + + src = fetchFromGitHub { + owner = "drowe67"; + repo = "LPCNet"; + rev = "0dc5935bbf49ff3ba3c9654cc2f802838ebbaead"; + sha256 = "0r6488z40fkar11ync8achpg5l6qz7y7cbh7cs3b3w4fsxn58q9i"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ codec2 ]; + + postPatch = '' + mkdir build + ln -s ${data} build/lpcnet_${dataVersion}.tgz + ''; + + meta = with lib; { + homepage = "https://freedv.org/"; + description = "Experimental Neural Net speech coding for FreeDV"; + license = licenses.bsd3; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b022361f2752..24fbba49a917 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6792,6 +6792,8 @@ with pkgs; lottieconverter = callPackage ../tools/misc/lottieconverter { }; + lpcnetfreedv = callPackage ../development/libraries/lpcnetfreedv { }; + lsd = callPackage ../tools/misc/lsd { }; lsdvd = callPackage ../tools/cd-dvd/lsdvd {}; From 932c1bca7c0ff0cdc70d4fc50a9a1d6cda6bea98 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Wed, 20 Oct 2021 17:38:32 +0200 Subject: [PATCH 25/35] freedv: init at 1.6.1 --- pkgs/applications/radio/freedv/default.nix | 49 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/applications/radio/freedv/default.nix diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix new file mode 100644 index 000000000000..b369a5475e53 --- /dev/null +++ b/pkgs/applications/radio/freedv/default.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, codec2 +, libsamplerate +, libsndfile +, lpcnetfreedv +, portaudio +, speexdsp +, hamlib +, wxGTK31-gtk3 +}: + +stdenv.mkDerivation rec { + pname = "freedv"; + version = "1.6.1"; + + src = fetchFromGitHub { + owner = "drowe67"; + repo = "freedv-gui"; + rev = "v${version}"; + sha256 = "1dzhf944vgla9a5ilcgwivhzgdbfaknqnwbpb071a0rz8rajnv0q"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ + codec2 + libsamplerate + libsndfile + lpcnetfreedv + portaudio + speexdsp + hamlib + wxGTK31-gtk3 + ]; + + cmakeFlags = [ + "-DUSE_INTERNAL_CODEC2:BOOL=FALSE" + "-DUSE_STATIC_DEPS:BOOL=FALSE" + ]; + + meta = with lib; { + homepage = "https://freedv.org/"; + description = "Digital voice for HF radio"; + license = licenses.lgpl21; + maintainers = with maintainers; [ mvs ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24fbba49a917..acbbe8335319 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24989,6 +24989,8 @@ with pkgs; shiboken2; }; + freedv = callPackage ../applications/radio/freedv { }; + freemind = callPackage ../applications/misc/freemind { jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 From 148352e7506862e7f309727786bbd32155e31d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Fri, 22 Oct 2021 11:40:39 -0500 Subject: [PATCH 26/35] =?UTF-8?q?crystal:=201.2.0=20=E2=86=92=201.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/compilers/crystal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 29e826c88d66..18f6da39b254 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -241,8 +241,8 @@ rec { }; crystal_1_2 = generic { - version = "1.2.0"; - sha256 = "sha256-38mmsolzmCnv+MFUMc+AEiklDLBHIr/jqXMLzc0nVq4="; + version = "1.2.1"; + sha256 = "sha256-jyNmY3n+u8WoVqHY8B5H9Vr9Ix3RogCtm8irkXZ3aek="; binary = crystal_1_1; }; From e2db47a66f20ef8c8ca7f3202a416c977d6799db Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 22 Oct 2021 13:03:52 -0400 Subject: [PATCH 27/35] anewer: init at 0.1.6 --- pkgs/tools/text/anewer/default.nix | 22 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/tools/text/anewer/default.nix diff --git a/pkgs/tools/text/anewer/default.nix b/pkgs/tools/text/anewer/default.nix new file mode 100644 index 000000000000..49113a64d5bf --- /dev/null +++ b/pkgs/tools/text/anewer/default.nix @@ -0,0 +1,22 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "anewer"; + version = "0.1.6"; + + src = fetchFromGitHub { + owner = "ysf"; + repo = pname; + rev = version; + sha256 = "181mi674354bddnq894yyq587w7skjh35vn61i41vfi6lqz5dy3d"; + }; + + cargoSha256 = "sha256-LJ0l5CZM5NqdbCZe4ELkYf9EkKyBxL/LrNmFy+JS6gM="; + + meta = with lib; { + description = "Append lines from stdin to a file if they don't already exist in the file"; + homepage = "https://github.com/ysf/anewer"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3d7ee648a3ce..25e67a1daeea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1176,6 +1176,8 @@ with pkgs; stdenv = if stdenv.targetPlatform.isAarch64 then gcc10Stdenv else stdenv; }); + anewer = callPackage ../tools/text/anewer { }; + angle-grinder = callPackage ../tools/text/angle-grinder {}; ansifilter = callPackage ../tools/text/ansifilter {}; From bf657a0996d8faca4c3a88dbd00205ee7475e4e1 Mon Sep 17 00:00:00 2001 From: Mika Naylor Date: Fri, 22 Oct 2021 19:30:45 +0200 Subject: [PATCH 28/35] flink: 1.13.2 -> 1.14.0 --- pkgs/applications/networking/cluster/flink/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/flink/default.nix b/pkgs/applications/networking/cluster/flink/default.nix index ccefd6d3de25..55f3e23ad6c3 100644 --- a/pkgs/applications/networking/cluster/flink/default.nix +++ b/pkgs/applications/networking/cluster/flink/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "flink"; - version = "1.13.2"; + version = "1.14.0"; src = fetchurl { url = "mirror://apache/flink/${pname}-${version}/${pname}-${version}-bin-scala_2.11.tgz"; - sha256 = "sha256-GPiHV19Z2Htt75hCXK2nCeQMIBQFEEUxXlBembenFL0="; + sha256 = "149b9ae774022acc0109dced893ca2d73430627a612be17ff12de8734464aff8"; }; nativeBuildInputs = [ makeWrapper ]; From 7db7784f5176fa1e9f94d16b01689f823441d58e Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 22 Oct 2021 13:31:50 -0400 Subject: [PATCH 29/35] anewer: fix license Co-authored-by: Fabian Affolter --- pkgs/tools/text/anewer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/text/anewer/default.nix b/pkgs/tools/text/anewer/default.nix index 49113a64d5bf..e41b12cee447 100644 --- a/pkgs/tools/text/anewer/default.nix +++ b/pkgs/tools/text/anewer/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Append lines from stdin to a file if they don't already exist in the file"; homepage = "https://github.com/ysf/anewer"; - license = licenses.gpl3Only; + license = licenses.gpl3Plus; maintainers = with maintainers; [ figsoda ]; }; } From c28e9c4c50d50c289af6c6b018735b44167018bd Mon Sep 17 00:00:00 2001 From: wucke13 Date: Sat, 2 Oct 2021 15:10:10 +0200 Subject: [PATCH 30/35] factorio: 1.1.39 -> 1.1.42 Also fixes a small issue in the update.py: The upstream API seems to have changed in a sense that the demo is not available in experimental channel anymore. Hence the original update.py script would fail, due to the missing `demo` key in the experimental channel. I added a sane failure path which just ignores if a release type (like `demo`) is missing in the channel, in order to increase the scripts resilience. --- pkgs/games/factorio/update.py | 4 ++- pkgs/games/factorio/versions.json | 48 +++++++++++++------------------ 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/pkgs/games/factorio/update.py b/pkgs/games/factorio/update.py index 3806ba3614f1..833a4ae068ea 100755 --- a/pkgs/games/factorio/update.py +++ b/pkgs/games/factorio/update.py @@ -89,7 +89,9 @@ def generate_our_versions(factorio_versions: FactorioVersionsJSON) -> OurVersion for system in SYSTEMS: for release_type in RELEASE_TYPES: for release_channel in RELEASE_CHANNELS: - version = factorio_versions[release_channel.name][release_type.name] + version = factorio_versions[release_channel.name].get(release_type.name) + if version == None: + continue this_release = { "name": f"factorio_{release_type.name}_{system.tar_name}-{version}.tar.xz", "url": f"https://factorio.com/get-download/{version}/{release_type.name}/{system.url_name}", diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json index d1175d9670e6..90d472605023 100644 --- a/pkgs/games/factorio/versions.json +++ b/pkgs/games/factorio/versions.json @@ -2,56 +2,48 @@ "x86_64-linux": { "alpha": { "experimental": { - "name": "factorio_alpha_x64-1.1.39.tar.xz", + "name": "factorio_alpha_x64-1.1.42.tar.xz", "needsAuth": true, - "sha256": "1wyvk0niyppg7h9ayfsiy6x309bjwsbgf62nah13aps89jk8n1pc", + "sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.39/alpha/linux64", - "version": "1.1.39" + "url": "https://factorio.com/get-download/1.1.42/alpha/linux64", + "version": "1.1.42" }, "stable": { - "name": "factorio_alpha_x64-1.1.38.tar.xz", + "name": "factorio_alpha_x64-1.1.42.tar.xz", "needsAuth": true, - "sha256": "0cjhfyz4j06yn08n239ajjjpgykh39hzifhmd0ygr5szw9gdc851", + "sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.38/alpha/linux64", - "version": "1.1.38" + "url": "https://factorio.com/get-download/1.1.42/alpha/linux64", + "version": "1.1.42" } }, "demo": { - "experimental": { - "name": "factorio_demo_x64-1.1.37.tar.xz", - "needsAuth": false, - "sha256": "06qwx9wd3990d3256y9y5qsxa0936076jgwhinmrlvjp9lxwl4ly", - "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.37/demo/linux64", - "version": "1.1.37" - }, "stable": { - "name": "factorio_demo_x64-1.1.38.tar.xz", + "name": "factorio_demo_x64-1.1.42.tar.xz", "needsAuth": false, - "sha256": "0y53w01dyfmavw1yxbjqjiirmvw32bnf9bqz0isnd72dvkg0kziv", + "sha256": "155m1ijdbc7szhpdw8f8g82ysd7av9zb6llqq4z96nn834px9m2d", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.38/demo/linux64", - "version": "1.1.38" + "url": "https://factorio.com/get-download/1.1.42/demo/linux64", + "version": "1.1.42" } }, "headless": { "experimental": { - "name": "factorio_headless_x64-1.1.39.tar.xz", + "name": "factorio_headless_x64-1.1.42.tar.xz", "needsAuth": false, - "sha256": "06figqmyd5bgwhpppziag4hs7x3ixr7wd8186cza3ly57bibha2m", + "sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.39/headless/linux64", - "version": "1.1.39" + "url": "https://factorio.com/get-download/1.1.42/headless/linux64", + "version": "1.1.42" }, "stable": { - "name": "factorio_headless_x64-1.1.38.tar.xz", + "name": "factorio_headless_x64-1.1.42.tar.xz", "needsAuth": false, - "sha256": "1c929pa9ifz0cvmx9k5yd267hjd5p7fdbln0czl3dq1vlskk1w71", + "sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.38/headless/linux64", - "version": "1.1.38" + "url": "https://factorio.com/get-download/1.1.42/headless/linux64", + "version": "1.1.42" } } } From 47c38dc25f0f1223ac79eff052d8f7af94844b2a Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 22 Oct 2021 22:16:28 +0300 Subject: [PATCH 31/35] =?UTF-8?q?sdrangel:=206.16.3=20=E2=86=92=206.17.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/radio/sdrangel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/sdrangel/default.nix b/pkgs/applications/radio/sdrangel/default.nix index fd742474ec13..4c22d0e9325e 100644 --- a/pkgs/applications/radio/sdrangel/default.nix +++ b/pkgs/applications/radio/sdrangel/default.nix @@ -33,13 +33,13 @@ mkDerivation rec { pname = "sdrangel"; - version = "6.16.3"; + version = "6.17.1"; src = fetchFromGitHub { owner = "f4exb"; repo = "sdrangel"; rev = "v${version}"; - sha256 = "sha256-qgFnl9IliKRI4TptpXyK9JHzpLEUQ7NZLIfc0AROCvA="; + sha256 = "sha256-VWHFrgJVyI3CtLXUiG3/4/cRTD8jSdunbrro34yLKvs="; fetchSubmodules = false; }; From 56d0b5cd6a61da42cca5be52b216bad9d1ff2b59 Mon Sep 17 00:00:00 2001 From: pennae Date: Fri, 21 May 2021 19:23:01 +0200 Subject: [PATCH 32/35] nixos/mosquitto: rewrite the module mosquitto needs a lot of attention concerning its config because it doesn't parse it very well, often ignoring trailing parts of lines, duplicated config keys, or just looking back way further in the file to associated config keys with previously defined items than might be expected. this replaces the mosquitto module completely. we now have a hierarchical config that flattens out to the mosquitto format (hopefully) without introducing spooky action at a distance. --- .../from_md/release-notes/rl-2111.section.xml | 8 + .../manual/release-notes/rl-2111.section.md | 3 + .../modules/services/networking/mosquitto.nix | 772 +++++++++++++----- nixos/tests/home-assistant.nix | 13 +- nixos/tests/mosquitto.nix | 20 +- 5 files changed, 587 insertions(+), 229 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index 4bbd46428524..cbcc3cb7cfcd 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -1138,6 +1138,14 @@ Superuser created successfully. coursier, you can create a shell alias. + + + The services.mosquitto module has been + rewritten to support multiple listeners and per-listener + configuration. Module configurations from previous releases + will no longer work and must be updated. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 36d03fd0b59b..982f87daecdc 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -351,6 +351,9 @@ In addition to numerous new and upgraded packages, this release has the followin - The `coursier` package's binary was renamed from `coursier` to `cs`. Completions which haven't worked for a while should now work with the renamed binary. To keep using `coursier`, you can create a shell alias. +- The `services.mosquitto` module has been rewritten to support multiple listeners and per-listener configuration. + Module configurations from previous releases will no longer work and must be updated. + ## Other Notable Changes {#sec-release-21.11-notable-changes} diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index b0fbfc194083..5a573cbf4ac9 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -5,35 +5,529 @@ with lib; let cfg = config.services.mosquitto; - listenerConf = optionalString cfg.ssl.enable '' - listener ${toString cfg.ssl.port} ${cfg.ssl.host} - cafile ${cfg.ssl.cafile} - certfile ${cfg.ssl.certfile} - keyfile ${cfg.ssl.keyfile} - ''; + # note that mosquitto config parsing is very simplistic as of may 2021. + # often times they'll e.g. strtok() a line, check the first two tokens, and ignore the rest. + # there's no escaping available either, so we have to prevent any being necessary. + str = types.strMatching "[^\r\n]*" // { + description = "single-line string"; + }; + path = types.addCheck types.path (p: str.check "${p}"); + configKey = types.strMatching "[^\r\n\t ]+"; + optionType = with types; oneOf [ str path bool int ] // { + description = "string, path, bool, or integer"; + }; + optionToString = v: + if isBool v then boolToString v + else if path.check v then "${v}" + else toString v; - passwordConf = optionalString cfg.checkPasswords '' - password_file ${cfg.dataDir}/passwd - ''; + assertKeysValid = prefix: valid: config: + mapAttrsToList + (n: _: { + assertion = valid ? ${n}; + message = "Invalid config key ${prefix}.${n}."; + }) + config; - mosquittoConf = pkgs.writeText "mosquitto.conf" '' - acl_file ${aclFile} - persistence true - allow_anonymous ${boolToString cfg.allowAnonymous} - listener ${toString cfg.port} ${cfg.host} - ${passwordConf} - ${listenerConf} - ${cfg.extraConf} - ''; + formatFreeform = { prefix ? "" }: mapAttrsToList (n: v: "${prefix}${n} ${optionToString v}"); - userAcl = (concatStringsSep "\n\n" (mapAttrsToList (n: c: - "user ${n}\n" + (concatStringsSep "\n" c.acl)) cfg.users - )); + userOptions = with types; submodule { + options = { + password = mkOption { + type = uniq (nullOr str); + default = null; + description = '' + Specifies the (clear text) password for the MQTT User. + ''; + }; - aclFile = pkgs.writeText "mosquitto.acl" '' - ${cfg.aclExtraConf} - ${userAcl} - ''; + passwordFile = mkOption { + type = uniq (nullOr types.path); + example = "/path/to/file"; + default = null; + description = '' + Specifies the path to a file containing the + clear text password for the MQTT user. + ''; + }; + + hashedPassword = mkOption { + type = uniq (nullOr str); + default = null; + description = '' + Specifies the hashed password for the MQTT User. + To generate hashed password install mosquitto + package and use mosquitto_passwd. + ''; + }; + + hashedPasswordFile = mkOption { + type = uniq (nullOr types.path); + example = "/path/to/file"; + default = null; + description = '' + Specifies the path to a file containing the + hashed password for the MQTT user. + To generate hashed password install mosquitto + package and use mosquitto_passwd. + ''; + }; + + acl = mkOption { + type = listOf str; + example = [ "read A/B" "readwrite A/#" ]; + default = []; + description = '' + Control client access to topics on the broker. + ''; + }; + }; + }; + + userAsserts = prefix: users: + mapAttrsToList + (n: _: { + assertion = builtins.match "[^:\r\n]+" n != null; + message = "Invalid user name ${n} in ${prefix}"; + }) + users + ++ mapAttrsToList + (n: u: { + assertion = count (s: s != null) [ + u.password u.passwordFile u.hashedPassword u.hashedPasswordFile + ] <= 1; + message = "Cannot set more than one password option for user ${n} in ${prefix}"; + }) users; + + makePasswordFile = users: path: + let + makeLines = store: file: + mapAttrsToList + (n: u: "addLine ${escapeShellArg n} ${escapeShellArg u.${store}}") + (filterAttrs (_: u: u.${store} != null) users) + ++ mapAttrsToList + (n: u: "addFile ${escapeShellArg n} ${escapeShellArg "${u.${file}}"}") + (filterAttrs (_: u: u.${file} != null) users); + plainLines = makeLines "password" "passwordFile"; + hashedLines = makeLines "hashedPassword" "hashedPasswordFile"; + in + pkgs.writeScript "make-mosquitto-passwd" + ('' + #! ${pkgs.runtimeShell} + + set -eu + + file=${escapeShellArg path} + + rm -f "$file" + touch "$file" + + addLine() { + echo "$1:$2" >> "$file" + } + addFile() { + if [ $(wc -l <"$2") -gt 1 ]; then + echo "invalid mosquitto password file $2" >&2 + return 1 + fi + echo "$1:$(cat "$2")" >> "$file" + } + '' + + concatStringsSep "\n" + (plainLines + ++ optional (plainLines != []) '' + ${pkgs.mosquitto}/bin/mosquitto_passwd -U "$file" + '' + ++ hashedLines)); + + makeACLFile = idx: users: supplement: + pkgs.writeText "mosquitto-acl-${toString idx}.conf" + (concatStringsSep + "\n" + (flatten [ + supplement + (mapAttrsToList + (n: u: [ "user ${n}" ] ++ map (t: "topic ${t}") u.acl) + users) + ])); + + authPluginOptions = with types; submodule { + options = { + plugin = mkOption { + type = path; + description = '' + Plugin path to load, should be a .so file. + ''; + }; + + denySpecialChars = mkOption { + type = bool; + description = '' + Automatically disallow all clients using # + or + in their name/id. + ''; + default = true; + }; + + options = mkOption { + type = attrsOf optionType; + description = '' + Options for the auth plugin. Each key turns into a auth_opt_* + line in the config. + ''; + default = {}; + }; + }; + }; + + authAsserts = prefix: auth: + mapAttrsToList + (n: _: { + assertion = configKey.check n; + message = "Invalid auth plugin key ${prefix}.${n}"; + }) + auth; + + formatAuthPlugin = plugin: + [ + "auth_plugin ${plugin.plugin}" + "auth_plugin_deny_special_chars ${optionToString plugin.denySpecialChars}" + ] + ++ formatFreeform { prefix = "auth_opt_"; } plugin.options; + + freeformListenerKeys = { + allow_anonymous = 1; + allow_zero_length_clientid = 1; + auto_id_prefix = 1; + cafile = 1; + capath = 1; + certfile = 1; + ciphers = 1; + "ciphers_tls1.3" = 1; + crlfile = 1; + dhparamfile = 1; + http_dir = 1; + keyfile = 1; + max_connections = 1; + max_qos = 1; + max_topic_alias = 1; + mount_point = 1; + protocol = 1; + psk_file = 1; + psk_hint = 1; + require_certificate = 1; + socket_domain = 1; + tls_engine = 1; + tls_engine_kpass_sha1 = 1; + tls_keyform = 1; + tls_version = 1; + use_identity_as_username = 1; + use_subject_as_username = 1; + use_username_as_clientid = 1; + }; + + listenerOptions = with types; submodule { + options = { + port = mkOption { + type = port; + description = '' + Port to listen on. Must be set to 0 to listen on a unix domain socket. + ''; + default = 1883; + }; + + address = mkOption { + type = nullOr str; + description = '' + Address to listen on. Listen on 0.0.0.0/:: + when unset. + ''; + default = null; + }; + + authPlugins = mkOption { + type = listOf authPluginOptions; + description = '' + Authentication plugin to attach to this listener. + Refer to the + mosquitto.conf documentation for details on authentication plugins. + ''; + default = []; + }; + + users = mkOption { + type = attrsOf userOptions; + example = { john = { password = "123456"; acl = [ "topic readwrite john/#" ]; }; }; + description = '' + A set of users and their passwords and ACLs. + ''; + default = {}; + }; + + acl = mkOption { + type = listOf str; + description = '' + Additional ACL items to prepend to the generated ACL file. + ''; + default = []; + }; + + settings = mkOption { + type = submodule { + freeformType = attrsOf optionType; + }; + description = '' + Additional settings for this listener. + ''; + default = {}; + }; + }; + }; + + listenerAsserts = prefix: listener: + assertKeysValid prefix freeformListenerKeys listener.settings + ++ userAsserts prefix listener.users + ++ imap0 + (i: v: authAsserts "${prefix}.authPlugins.${toString i}" v) + listener.authPlugins; + + formatListener = idx: listener: + [ + "listener ${toString listener.port} ${toString listener.address}" + "password_file ${cfg.dataDir}/passwd-${toString idx}" + "acl_file ${makeACLFile idx listener.users listener.acl}" + ] + ++ formatFreeform {} listener.settings + ++ concatMap formatAuthPlugin listener.authPlugins; + + freeformBridgeKeys = { + bridge_alpn = 1; + bridge_attempt_unsubscribe = 1; + bridge_bind_address = 1; + bridge_cafile = 1; + bridge_capath = 1; + bridge_certfile = 1; + bridge_identity = 1; + bridge_insecure = 1; + bridge_keyfile = 1; + bridge_max_packet_size = 1; + bridge_outgoing_retain = 1; + bridge_protocol_version = 1; + bridge_psk = 1; + bridge_require_ocsp = 1; + bridge_tls_version = 1; + cleansession = 1; + idle_timeout = 1; + keepalive_interval = 1; + local_cleansession = 1; + local_clientid = 1; + local_password = 1; + local_username = 1; + notification_topic = 1; + notifications = 1; + notifications_local_only = 1; + remote_clientid = 1; + remote_password = 1; + remote_username = 1; + restart_timeout = 1; + round_robin = 1; + start_type = 1; + threshold = 1; + try_private = 1; + }; + + bridgeOptions = with types; submodule { + options = { + addresses = mkOption { + type = listOf (submodule { + options = { + address = mkOption { + type = str; + description = '' + Address of the remote MQTT broker. + ''; + }; + + port = mkOption { + type = port; + description = '' + Port of the remote MQTT broker. + ''; + default = 1883; + }; + }; + }); + default = []; + description = '' + Remote endpoints for the bridge. + ''; + }; + + topics = mkOption { + type = listOf str; + description = '' + Topic patterns to be shared between the two brokers. + Refer to the + mosquitto.conf documentation for details on the format. + ''; + default = []; + example = [ "# both 2 local/topic/ remote/topic/" ]; + }; + + settings = mkOption { + type = submodule { + freeformType = attrsOf optionType; + }; + description = '' + Additional settings for this bridge. + ''; + default = {}; + }; + }; + }; + + bridgeAsserts = prefix: bridge: + assertKeysValid prefix freeformBridgeKeys bridge.settings + ++ [ { + assertion = length bridge.addresses > 0; + message = "Bridge ${prefix} needs remote broker addresses"; + } ]; + + formatBridge = name: bridge: + [ + "connection ${name}" + "addresses ${concatMapStringsSep " " (a: "${a.address}:${toString a.port}") bridge.addresses}" + ] + ++ map (t: "topic ${t}") bridge.topics + ++ formatFreeform {} bridge.settings; + + freeformGlobalKeys = { + allow_duplicate_messages = 1; + autosave_interval = 1; + autosave_on_changes = 1; + check_retain_source = 1; + connection_messages = 1; + log_facility = 1; + log_timestamp = 1; + log_timestamp_format = 1; + max_inflight_bytes = 1; + max_inflight_messages = 1; + max_keepalive = 1; + max_packet_size = 1; + max_queued_bytes = 1; + max_queued_messages = 1; + memory_limit = 1; + message_size_limit = 1; + persistence_file = 1; + persistence_location = 1; + persistent_client_expiration = 1; + pid_file = 1; + queue_qos0_messages = 1; + retain_available = 1; + set_tcp_nodelay = 1; + sys_interval = 1; + upgrade_outgoing_qos = 1; + websockets_headers_size = 1; + websockets_log_level = 1; + }; + + globalOptions = with types; { + enable = mkEnableOption "the MQTT Mosquitto broker"; + + bridges = mkOption { + type = attrsOf bridgeOptions; + default = {}; + description = '' + Bridges to build to other MQTT brokers. + ''; + }; + + listeners = mkOption { + type = listOf listenerOptions; + default = {}; + description = '' + Listeners to configure on this broker. + ''; + }; + + includeDirs = mkOption { + type = listOf path; + description = '' + Directories to be scanned for further config files to include. + Directories will processed in the order given, + *.conf files in the directory will be + read in case-sensistive alphabetical order. + ''; + default = []; + }; + + logDest = mkOption { + type = listOf (either path (enum [ "stdout" "stderr" "syslog" "topic" "dlt" ])); + description = '' + Destinations to send log messages to. + ''; + default = [ "stderr" ]; + }; + + logType = mkOption { + type = listOf (enum [ "debug" "error" "warning" "notice" "information" + "subscribe" "unsubscribe" "websockets" "none" "all" ]); + description = '' + Types of messages to log. + ''; + default = []; + }; + + persistence = mkOption { + type = bool; + description = '' + Enable persistent storage of subscriptions and messages. + ''; + default = true; + }; + + dataDir = mkOption { + default = "/var/lib/mosquitto"; + type = types.path; + description = '' + The data directory. + ''; + }; + + settings = mkOption { + type = submodule { + freeformType = attrsOf optionType; + }; + description = '' + Global configuration options for the mosquitto broker. + ''; + default = {}; + }; + }; + + globalAsserts = prefix: cfg: + flatten [ + (assertKeysValid prefix freeformGlobalKeys cfg.settings) + (imap0 (n: l: listenerAsserts "${prefix}.listener.${toString n}" l) cfg.listeners) + (mapAttrsToList (n: b: bridgeAsserts "${prefix}.bridge.${n}" b) cfg.bridges) + ]; + + formatGlobal = cfg: + [ + "per_listener_settings true" + "persistence ${optionToString cfg.persistence}" + ] + ++ map + (d: if path.check d then "log_dest file ${d}" else "log_dest ${d}") + cfg.logDest + ++ map (t: "log_type ${t}") cfg.logType + ++ formatFreeform {} cfg.settings + ++ concatLists (imap0 formatListener cfg.listeners) + ++ concatLists (mapAttrsToList formatBridge cfg.bridges) + ++ map (d: "include_dir ${d}") cfg.includeDirs; + + configFile = pkgs.writeText "mosquitto.conf" + (concatStringsSep "\n" (formatGlobal cfg)); in @@ -41,179 +535,13 @@ in ###### Interface - options = { - services.mosquitto = { - enable = mkEnableOption "the MQTT Mosquitto broker"; - - host = mkOption { - default = "127.0.0.1"; - example = "0.0.0.0"; - type = types.str; - description = '' - Host to listen on without SSL. - ''; - }; - - port = mkOption { - default = 1883; - type = types.int; - description = '' - Port on which to listen without SSL. - ''; - }; - - ssl = { - enable = mkEnableOption "SSL listener"; - - cafile = mkOption { - type = types.nullOr types.path; - default = null; - description = "Path to PEM encoded CA certificates."; - }; - - certfile = mkOption { - type = types.nullOr types.path; - default = null; - description = "Path to PEM encoded server certificate."; - }; - - keyfile = mkOption { - type = types.nullOr types.path; - default = null; - description = "Path to PEM encoded server key."; - }; - - host = mkOption { - default = "0.0.0.0"; - example = "localhost"; - type = types.str; - description = '' - Host to listen on with SSL. - ''; - }; - - port = mkOption { - default = 8883; - type = types.int; - description = '' - Port on which to listen with SSL. - ''; - }; - }; - - dataDir = mkOption { - default = "/var/lib/mosquitto"; - type = types.path; - description = '' - The data directory. - ''; - }; - - users = mkOption { - type = types.attrsOf (types.submodule { - options = { - password = mkOption { - type = with types; uniq (nullOr str); - default = null; - description = '' - Specifies the (clear text) password for the MQTT User. - ''; - }; - - passwordFile = mkOption { - type = with types; uniq (nullOr str); - example = "/path/to/file"; - default = null; - description = '' - Specifies the path to a file containing the - clear text password for the MQTT user. - ''; - }; - - hashedPassword = mkOption { - type = with types; uniq (nullOr str); - default = null; - description = '' - Specifies the hashed password for the MQTT User. - To generate hashed password install mosquitto - package and use mosquitto_passwd. - ''; - }; - - hashedPasswordFile = mkOption { - type = with types; uniq (nullOr str); - example = "/path/to/file"; - default = null; - description = '' - Specifies the path to a file containing the - hashed password for the MQTT user. - To generate hashed password install mosquitto - package and use mosquitto_passwd. - ''; - }; - - acl = mkOption { - type = types.listOf types.str; - example = [ "topic read A/B" "topic A/#" ]; - description = '' - Control client access to topics on the broker. - ''; - }; - }; - }); - example = { john = { password = "123456"; acl = [ "topic readwrite john/#" ]; }; }; - description = '' - A set of users and their passwords and ACLs. - ''; - }; - - allowAnonymous = mkOption { - default = false; - type = types.bool; - description = '' - Allow clients to connect without authentication. - ''; - }; - - checkPasswords = mkOption { - default = false; - example = true; - type = types.bool; - description = '' - Refuse connection when clients provide incorrect passwords. - ''; - }; - - extraConf = mkOption { - default = ""; - type = types.lines; - description = '' - Extra config to append to `mosquitto.conf` file. - ''; - }; - - aclExtraConf = mkOption { - default = ""; - type = types.lines; - description = '' - Extra config to prepend to the ACL file. - ''; - }; - - }; - }; - + options.services.mosquitto = globalOptions; ###### Implementation config = mkIf cfg.enable { - assertions = mapAttrsToList (name: cfg: { - assertion = length (filter (s: s != null) (with cfg; [ - password passwordFile hashedPassword hashedPasswordFile - ])) <= 1; - message = "Cannot set more than one password option"; - }) cfg.users; + assertions = globalAsserts "services.mosquitto" cfg; systemd.services.mosquitto = { description = "Mosquitto MQTT Broker Daemon"; @@ -227,7 +555,7 @@ in RuntimeDirectory = "mosquitto"; WorkingDirectory = cfg.dataDir; Restart = "on-failure"; - ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}"; + ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${configFile}"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; # Hardening @@ -252,12 +580,34 @@ in ReadWritePaths = [ cfg.dataDir "/tmp" # mosquitto_passwd creates files in /tmp before moving them - ]; - ReadOnlyPaths = with cfg.ssl; lib.optionals (enable) [ - certfile - keyfile - cafile - ]; + ] ++ filter path.check cfg.logDest; + ReadOnlyPaths = + map (p: "${p}") + (cfg.includeDirs + ++ filter + (v: v != null) + (flatten [ + (map + (l: [ + (l.settings.psk_file or null) + (l.settings.http_dir or null) + (l.settings.cafile or null) + (l.settings.capath or null) + (l.settings.certfile or null) + (l.settings.crlfile or null) + (l.settings.dhparamfile or null) + (l.settings.keyfile or null) + ]) + cfg.listeners) + (mapAttrsToList + (_: b: [ + (b.settings.bridge_cafile or null) + (b.settings.bridge_capath or null) + (b.settings.bridge_certfile or null) + (b.settings.bridge_keyfile or null) + ]) + cfg.bridges) + ])); RemoveIPC = true; RestrictAddressFamilies = [ "AF_UNIX" # for sd_notify() call @@ -275,20 +625,12 @@ in ]; UMask = "0077"; }; - preStart = '' - rm -f ${cfg.dataDir}/passwd - touch ${cfg.dataDir}/passwd - '' + concatStringsSep "\n" ( - mapAttrsToList (n: c: - if c.hashedPasswordFile != null then - "echo '${n}:'$(cat '${c.hashedPasswordFile}') >> ${cfg.dataDir}/passwd" - else if c.passwordFile != null then - "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} $(cat '${c.passwordFile}')" - else if c.hashedPassword != null then - "echo '${n}:${c.hashedPassword}' >> ${cfg.dataDir}/passwd" - else optionalString (c.password != null) - "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} '${c.password}'" - ) cfg.users); + preStart = + concatStringsSep + "\n" + (imap0 + (idx: listener: makePasswordFile listener.users "${cfg.dataDir}/passwd-${toString idx}") + cfg.listeners); }; users.users.mosquitto = { @@ -302,4 +644,6 @@ in users.groups.mosquitto.gid = config.ids.gids.mosquitto; }; + + meta.maintainers = with lib.maintainers; [ pennae ]; } diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix index 699be8fd7dc6..0894736bac9c 100644 --- a/nixos/tests/home-assistant.nix +++ b/nixos/tests/home-assistant.nix @@ -12,13 +12,14 @@ in { environment.systemPackages = with pkgs; [ mosquitto ]; services.mosquitto = { enable = true; - checkPasswords = true; - users = { - "${mqttUsername}" = { - acl = [ "topic readwrite #" ]; - password = mqttPassword; + listeners = [ { + users = { + "${mqttUsername}" = { + acl = [ "readwrite #" ]; + password = mqttPassword; + }; }; - }; + } ]; }; services.home-assistant = { inherit configDir; diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix index e29bd559ed9b..1a534184066c 100644 --- a/nixos/tests/mosquitto.nix +++ b/nixos/tests/mosquitto.nix @@ -19,16 +19,18 @@ in { server = { pkgs, ... }: { networking.firewall.allowedTCPPorts = [ port ]; services.mosquitto = { - inherit port; enable = true; - host = "0.0.0.0"; - checkPasswords = true; - users.${username} = { - inherit password; - acl = [ - "topic readwrite ${topic}" - ]; - }; + listeners = [ + { + inherit port; + users.${username} = { + inherit password; + acl = [ + "readwrite ${topic}" + ]; + }; + } + ]; }; # disable private /tmp for this test From c47fcb70c6885d6df869934280ebeb715ca7e6fd Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 26 May 2021 18:59:37 +0200 Subject: [PATCH 33/35] nixos/mosquitto: rewrite the test expand the test to check all four forms of passwords, tls certificates (both server and client), and that acl files are formatted properly. --- nixos/tests/mosquitto.nix | 182 +++++++++++++++++++++++++++++--------- 1 file changed, 140 insertions(+), 42 deletions(-) diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix index 1a534184066c..eb47e97ba04b 100644 --- a/nixos/tests/mosquitto.nix +++ b/nixos/tests/mosquitto.nix @@ -2,13 +2,59 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: let port = 1888; - username = "mqtt"; + tlsPort = 1889; password = "VERY_secret"; + hashedPassword = "$7$101$/WJc4Mp+I+uYE9sR$o7z9rD1EYXHPwEP5GqQj6A7k4W1yVbePlb8TqNcuOLV9WNCiDgwHOB0JHC1WCtdkssqTBduBNUnUGd6kmZvDSw=="; topic = "test/foo"; + + snakeOil = pkgs.runCommand "snakeoil-certs" { + buildInputs = [ pkgs.gnutls.bin ]; + caTemplate = pkgs.writeText "snakeoil-ca.template" '' + cn = server + expiration_days = -1 + cert_signing_key + ca + ''; + certTemplate = pkgs.writeText "snakeoil-cert.template" '' + cn = server + expiration_days = -1 + tls_www_server + encryption_key + signing_key + ''; + userCertTemplate = pkgs.writeText "snakeoil-user-cert.template" '' + organization = snakeoil + cn = client1 + expiration_days = -1 + tls_www_client + encryption_key + signing_key + ''; + } '' + mkdir "$out" + + certtool -p --bits 2048 --outfile "$out/ca.key" + certtool -s --template "$caTemplate" --load-privkey "$out/ca.key" \ + --outfile "$out/ca.crt" + certtool -p --bits 2048 --outfile "$out/server.key" + certtool -c --template "$certTemplate" \ + --load-ca-privkey "$out/ca.key" \ + --load-ca-certificate "$out/ca.crt" \ + --load-privkey "$out/server.key" \ + --outfile "$out/server.crt" + + certtool -p --bits 2048 --outfile "$out/client1.key" + certtool -c --template "$userCertTemplate" \ + --load-privkey "$out/client1.key" \ + --load-ca-privkey "$out/ca.key" \ + --load-ca-certificate "$out/ca.crt" \ + --outfile "$out/client1.crt" + ''; + in { name = "mosquitto"; meta = with pkgs.lib; { - maintainers = with maintainers; [ peterhoeg ]; + maintainers = with maintainers; [ pennae peterhoeg ]; }; nodes = let @@ -17,79 +63,131 @@ in { }; in { server = { pkgs, ... }: { - networking.firewall.allowedTCPPorts = [ port ]; + networking.firewall.allowedTCPPorts = [ port tlsPort ]; services.mosquitto = { enable = true; + settings = { + sys_interval = 1; + }; listeners = [ { inherit port; - users.${username} = { - inherit password; - acl = [ - "readwrite ${topic}" - ]; + users = { + password_store = { + inherit password; + }; + password_file = { + passwordFile = pkgs.writeText "mqtt-password" password; + }; + hashed_store = { + inherit hashedPassword; + }; + hashed_file = { + hashedPasswordFile = pkgs.writeText "mqtt-hashed-password" hashedPassword; + }; + + reader = { + inherit password; + acl = [ + "read ${topic}" + "read $SYS/#" # so we always have something to read + ]; + }; + writer = { + inherit password; + acl = [ "write ${topic}" ]; + }; + }; + } + { + port = tlsPort; + users.client1 = { + acl = [ "read $SYS/#" ]; + }; + settings = { + cafile = "${snakeOil}/ca.crt"; + certfile = "${snakeOil}/server.crt"; + keyfile = "${snakeOil}/server.key"; + require_certificate = true; + use_identity_as_username = true; }; } ]; }; - - # disable private /tmp for this test - systemd.services.mosquitto.serviceConfig.PrivateTmp = lib.mkForce false; }; client1 = client; client2 = client; }; - testScript = let - file = "/tmp/msg"; - in '' - def mosquitto_cmd(binary): + testScript = '' + def mosquitto_cmd(binary, user, topic, port): return ( - "${pkgs.mosquitto}/bin/mosquitto_{} " + "mosquitto_{} " "-V mqttv311 " "-h server " - "-p ${toString port} " - "-u ${username} " + "-p {} " + "-u {} " "-P '${password}' " - "-t ${topic}" - ).format(binary) + "-t '{}'" + ).format(binary, port, user, topic) - def publish(args): - return "{} {}".format(mosquitto_cmd("pub"), args) + def publish(args, user, topic="${topic}", port=${toString port}): + return "{} {}".format(mosquitto_cmd("pub", user, topic, port), args) - def subscribe(args): - return "({} -C 1 {} | tee ${file} &)".format(mosquitto_cmd("sub"), args) + def subscribe(args, user, topic="${topic}", port=${toString port}): + return "{} -C 1 {}".format(mosquitto_cmd("sub", user, topic, port), args) + + def parallel(*fns): + from threading import Thread + threads = [ Thread(target=fn) for fn in fns ] + for t in threads: t.start() + for t in threads: t.join() start_all() server.wait_for_unit("mosquitto.service") - for machine in server, client1, client2: - machine.fail("test -f ${file}") + def check_passwords(): + client1.succeed(publish("-m test", "password_store")) + client1.succeed(publish("-m test", "password_file")) + client1.succeed(publish("-m test", "hashed_store")) + client1.succeed(publish("-m test", "hashed_file")) - # QoS = 0, so only one subscribers should get it - server.execute(subscribe("-q 0")) + check_passwords() - # we need to give the subscribers some time to connect - client2.execute("sleep 5") - client2.succeed(publish("-m FOO -q 0")) + def check_acl(): + client1.succeed(subscribe("", "reader", topic="$SYS/#")) + client1.fail(subscribe("-W 5", "writer", topic="$SYS/#")) - server.wait_until_succeeds("grep -q FOO ${file}") - server.execute("rm ${file}") + parallel( + lambda: client1.succeed(subscribe("-i 3688cdd7-aa07-42a4-be22-cb9352917e40", "reader")), + lambda: [ + server.wait_for_console_text("3688cdd7-aa07-42a4-be22-cb9352917e40"), + client2.succeed(publish("-m test", "writer")) + ]) - # QoS = 1, so both subscribers should get it - server.execute(subscribe("-q 1")) - client1.execute(subscribe("-q 1")) + parallel( + lambda: client1.fail(subscribe("-W 5 -i 24ff16a2-ae33-4a51-9098-1b417153c712", "reader")), + lambda: [ + server.wait_for_console_text("24ff16a2-ae33-4a51-9098-1b417153c712"), + client2.succeed(publish("-m test", "reader")) + ]) - # we need to give the subscribers some time to connect - client2.execute("sleep 5") - client2.succeed(publish("-m BAR -q 1")) + check_acl() - for machine in server, client1: - machine.wait_until_succeeds("grep -q BAR ${file}") - machine.execute("rm ${file}") + def check_tls(): + client1.succeed( + subscribe( + "--cafile ${snakeOil}/ca.crt " + "--cert ${snakeOil}/client1.crt " + "--key ${snakeOil}/client1.key", + topic="$SYS/#", + port=${toString tlsPort}, + user="no_such_user")) + + check_tls() ''; }) From 1fa5e13f30c60890b01475d7945a17ca5721a5f2 Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 11 Oct 2021 15:28:56 +0200 Subject: [PATCH 34/35] nixos/borgbackup: allow dump scripts as stdin inputs borg is able to process stdin during backups when backing up the special path -, which can be very useful for backing up things that can be streamed (eg database dumps, zfs snapshots). --- nixos/modules/services/backup/borgbackup.nix | 43 ++++++++++++++++---- nixos/tests/borgbackup.nix | 33 +++++++++++++++ 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index 5461dbaf0bd0..220c571b927e 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -42,12 +42,16 @@ let ${cfg.postInit} fi '' + '' - borg create $extraArgs \ - --compression ${cfg.compression} \ - --exclude-from ${mkExcludeFile cfg} \ - $extraCreateArgs \ - "::$archiveName$archiveSuffix" \ - ${escapeShellArgs cfg.paths} + ( + set -o pipefail + ${optionalString (cfg.dumpCommand != null) ''${escapeShellArg cfg.dumpCommand} | \''} + borg create $extraArgs \ + --compression ${cfg.compression} \ + --exclude-from ${mkExcludeFile cfg} \ + $extraCreateArgs \ + "::$archiveName$archiveSuffix" \ + ${if cfg.paths == null then "-" else escapeShellArgs cfg.paths} + ) '' + optionalString cfg.appendFailedSuffix '' borg rename $extraArgs \ "::$archiveName$archiveSuffix" "$archiveName" @@ -182,6 +186,14 @@ let + " without at least one public key"; }; + mkSourceAssertions = name: cfg: { + assertion = count isNull [ cfg.dumpCommand cfg.paths ] == 1; + message = '' + Exactly one of borgbackup.jobs.${name}.paths or borgbackup.jobs.${name}.dumpCommand + must be set. + ''; + }; + mkRemovableDeviceAssertions = name: cfg: { assertion = !(isLocalPath cfg.repo) -> !cfg.removableDevice; message = '' @@ -240,11 +252,25 @@ in { options = { paths = mkOption { - type = with types; coercedTo str lib.singleton (listOf str); - description = "Path(s) to back up."; + type = with types; nullOr (coercedTo str lib.singleton (listOf str)); + default = null; + description = '' + Path(s) to back up. + Mutually exclusive with . + ''; example = "/home/user"; }; + dumpCommand = mkOption { + type = with types; nullOr path; + default = null; + description = '' + Backup the stdout of this program instead of filesystem paths. + Mutually exclusive with . + ''; + example = "/path/to/createZFSsend.sh"; + }; + repo = mkOption { type = types.str; description = "Remote or local repository to back up to."; @@ -657,6 +683,7 @@ in { assertions = mapAttrsToList mkPassAssertion jobs ++ mapAttrsToList mkKeysAssertion repos + ++ mapAttrsToList mkSourceAssertions jobs ++ mapAttrsToList mkRemovableDeviceAssertions jobs; system.activationScripts = mapAttrs' mkActivationScript jobs; diff --git a/nixos/tests/borgbackup.nix b/nixos/tests/borgbackup.nix index fae1d2d07138..cbb28689209b 100644 --- a/nixos/tests/borgbackup.nix +++ b/nixos/tests/borgbackup.nix @@ -81,6 +81,24 @@ in { environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519.appendOnly"; }; + commandSuccess = { + dumpCommand = pkgs.writeScript "commandSuccess" '' + echo -n test + ''; + repo = remoteRepo; + encryption.mode = "none"; + startAt = [ ]; + environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; + }; + + commandFail = { + dumpCommand = "${pkgs.coreutils}/bin/false"; + repo = remoteRepo; + encryption.mode = "none"; + startAt = [ ]; + environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; + }; + }; }; @@ -171,5 +189,20 @@ in { client.fail("{} list borg\@server:wrong".format(borg)) # TODO: Make sure that data is not actually deleted + + with subtest("commandSuccess"): + server.wait_for_unit("sshd.service") + client.wait_for_unit("network.target") + client.systemctl("start --wait borgbackup-job-commandSuccess") + client.fail("systemctl is-failed borgbackup-job-commandSuccess") + id = client.succeed("borg-job-commandSuccess list | tail -n1 | cut -d' ' -f1").strip() + client.succeed(f"borg-job-commandSuccess extract ::{id} stdin") + assert "test" == client.succeed("cat stdin") + + with subtest("commandFail"): + server.wait_for_unit("sshd.service") + client.wait_for_unit("network.target") + client.systemctl("start --wait borgbackup-job-commandFail") + client.succeed("systemctl is-failed borgbackup-job-commandFail") ''; }) From 1fb77e822b87b0ca729c007e63166c7d2d38e947 Mon Sep 17 00:00:00 2001 From: talyz Date: Fri, 22 Oct 2021 23:38:53 +0200 Subject: [PATCH 35/35] discourse: Fix the public directory path reported by Discourse Change the path to the public directory reported by Discourse to its real path instead of the symlink in the store, since the store path won't be matched by any nginx rules. Fixes #142528. --- pkgs/servers/web-apps/discourse/default.nix | 5 +++++ .../web-apps/discourse/public_dir_path.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/servers/web-apps/discourse/public_dir_path.patch diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 592b981dd772..587cb363fc6e 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -266,6 +266,11 @@ let # Make sure the notification email setting applies ./notification_email.patch + + # Change the path to the public directory reported by Discourse + # to its real path instead of the symlink in the store, since + # the store path won't be matched by any nginx rules + ./public_dir_path.patch ]; postPatch = '' diff --git a/pkgs/servers/web-apps/discourse/public_dir_path.patch b/pkgs/servers/web-apps/discourse/public_dir_path.patch new file mode 100644 index 000000000000..0c6579736e22 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/public_dir_path.patch @@ -0,0 +1,13 @@ +diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb +index 25649532c0..614e062dc1 100644 +--- a/lib/file_store/local_store.rb ++++ b/lib/file_store/local_store.rb +@@ -88,7 +88,7 @@ module FileStore + end + + def public_dir +- File.join(Rails.root, "public") ++ "/run/discourse/public" + end + + def tombstone_dir