From c05019d716e2d5aa6f6d05150672c413688b38e3 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 19 Jun 2023 14:35:52 +0200 Subject: [PATCH 001/216] PULL_REQUEST_TEMPLATE.md: Update sandboxing check Update the sandboxing check to include the `relaxed` setting for sandboxing. Previously there was no obvious and correct way to convey this intermediate setting between sandboxing being completely disabled and being enforced strictly. --- .github/PULL_REQUEST_TEMPLATE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b2ec787313e0..c4ed5c15d41a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,7 +14,9 @@ For new packages please briefly describe the package or provide a link to its ho - [ ] aarch64-linux - [ ] x86_64-darwin - [ ] aarch64-darwin -- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html)) +- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html)) + - [ ] `sandbox = relaxed` + - [ ] `sandbox = true` - [ ] Tested, as applicable: - [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests)) - and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests) From 8027d95ff01ba1a9dbc9f960a929ffe4e306d25c Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 22 Jul 2023 15:38:42 +0800 Subject: [PATCH 002/216] xrootd: enable structured attributes --- pkgs/tools/networking/xrootd/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/networking/xrootd/default.nix b/pkgs/tools/networking/xrootd/default.nix index e5aad1b4ee9b..bb8576e7af97 100644 --- a/pkgs/tools/networking/xrootd/default.nix +++ b/pkgs/tools/networking/xrootd/default.nix @@ -24,6 +24,9 @@ }: stdenv.mkDerivation (finalAttrs: { + + __structuredAttrs = true; + pname = "xrootd"; version = "5.5.5"; From 9c80ef7f16acb29560154af94615768d16858559 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 26 May 2023 17:26:47 +0800 Subject: [PATCH 003/216] xrootd: wrap executables with [DY]LD_LIBRARY_PATH --- pkgs/tools/networking/xrootd/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/xrootd/default.nix b/pkgs/tools/networking/xrootd/default.nix index bb8576e7af97..47496173642c 100644 --- a/pkgs/tools/networking/xrootd/default.nix +++ b/pkgs/tools/networking/xrootd/default.nix @@ -4,6 +4,7 @@ , fetchFromGitHub , cmake , cppunit +, makeWrapper , pkg-config , curl , fuse @@ -58,6 +59,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake + makeWrapper pkg-config ]; @@ -104,7 +106,18 @@ stdenv.mkDerivation (finalAttrs: { "-DENABLE_TESTS=TRUE" ]; - postFixup = lib.optionalString (externalEtc != null) '' + makeWrapperArgs = [ + # Workaround the library-not-found issue + # happening to binaries compiled with xrootd libraries. + # See #169677 + "--prefix" "${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH" ":" "${placeholder "out"}/lib" + ]; + + postFixup = '' + while IFS= read -r FILE; do + wrapProgram "$FILE" "''${makeWrapperArgs[@]}" + done < <(find "$bin/bin" -mindepth 1 -maxdepth 1 -type f,l -perm -a+x) + '' + lib.optionalString (externalEtc != null) '' mv "$out"/etc{,.orig} ln -s ${lib.escapeShellArg externalEtc} "$out/etc" ''; From bc744410f5b6e406b2ac2cd0a000db6c88fdc2bd Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 26 May 2023 17:30:25 +0800 Subject: [PATCH 004/216] xrootd.fetchxrd: remove duplicated wrapping --- pkgs/tools/networking/xrootd/fetchxrd.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/tools/networking/xrootd/fetchxrd.nix b/pkgs/tools/networking/xrootd/fetchxrd.nix index b7a77f80549b..c5ec8f02e783 100644 --- a/pkgs/tools/networking/xrootd/fetchxrd.nix +++ b/pkgs/tools/networking/xrootd/fetchxrd.nix @@ -21,11 +21,9 @@ inherit url; urls = if urls == [ ] then lib.singleton url else urls; } - # Set [DY]LD_LIBRARY_PATH to workaround #169677 - # TODO: Remove the library path after #200830 get merged '' for u in $urls; do - ${lib.optionalString buildPlatform.isDarwin "DY"}LD_LIBRARY_PATH=${lib.makeLibraryPath [ xrootd ]} xrdcp --force "$u" "$out" + xrdcp --force "$u" "$out" ret=$? (( ret != 0 )) || break done From 4f318516389444054791920017c5e3e29bfb2c1c Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 3 Aug 2023 07:57:02 +0800 Subject: [PATCH 005/216] xrootd.fetchxrd: show progress bar with --verbose Show the progress bar and other information during the download. Provide a way to distinguish connection interrupt from authentication failure. --- pkgs/tools/networking/xrootd/fetchxrd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/xrootd/fetchxrd.nix b/pkgs/tools/networking/xrootd/fetchxrd.nix index c5ec8f02e783..5bad585186ac 100644 --- a/pkgs/tools/networking/xrootd/fetchxrd.nix +++ b/pkgs/tools/networking/xrootd/fetchxrd.nix @@ -23,7 +23,7 @@ } '' for u in $urls; do - xrdcp --force "$u" "$out" + xrdcp --verbose --force "$u" "$out" ret=$? (( ret != 0 )) || break done From 95f76d1d100df7126ce202606745557710aa1c33 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Jul 2023 02:46:47 +0800 Subject: [PATCH 006/216] xrootd: opt out systemd where it breaks --- pkgs/top-level/all-packages.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index af68261a0fb9..2ef5f06ea73c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1889,7 +1889,10 @@ with pkgs; xpaste = callPackage ../tools/text/xpaste { }; - xrootd = callPackage ../tools/networking/xrootd { }; + xrootd = callPackage ../tools/networking/xrootd { + # Workaround systemd static build breakage + systemd = if systemd.meta.broken then null else systemd; + }; yabridge = callPackage ../tools/audio/yabridge { wine = wineWowPackages.staging; From 86f362ce5b9d6606c6b6b832d864a47c45a05aaa Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 17 Aug 2023 23:45:27 +0900 Subject: [PATCH 007/216] bioawk: init at unstable-2017-09-11 --- .../science/biology/bioawk/default.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/applications/science/biology/bioawk/default.nix diff --git a/pkgs/applications/science/biology/bioawk/default.nix b/pkgs/applications/science/biology/bioawk/default.nix new file mode 100644 index 000000000000..cfbb1a551fac --- /dev/null +++ b/pkgs/applications/science/biology/bioawk/default.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, fetchFromGitHub +, installShellFiles +, bison +, zlib +}: + +stdenv.mkDerivation { + pname = "bioawk"; + version = "unstable-2017-09-11"; + + src = fetchFromGitHub { + owner = "lh3"; + repo = "bioawk"; + rev = "fd40150b7c557da45e781a999d372abbc634cc21"; + hash = "sha256-WWgz96DPP83J45isWkMbgEvOlibq6WefK//ImV6+AU0="; + }; + + nativeBuildInputs = [ + bison + installShellFiles + ]; + + buildInputs = [ + zlib + ]; + + buildFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 bioawk -t $out/bin + mv awk.1 bioawk.1 + installManPage bioawk.1 + + runHook postInstall + ''; + + meta = with lib; { + description = "BWK awk modified for biological data"; + homepage = "https://github.com/lh3/bioawk"; + license = licenses.hpnd; + maintainers = with maintainers; [ natsukium ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8aed8f81e818..d2f791224a83 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38671,6 +38671,8 @@ with pkgs; bftools = callPackage ../applications/science/biology/bftools { }; + bioawk = callPackage ../applications/science/biology/bioawk { }; + blast = callPackage ../applications/science/biology/blast { inherit (darwin.apple_sdk.frameworks) ApplicationServices; }; From f99f2a1a483bd90be4f623dc8e7fae2479218947 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Fri, 15 Sep 2023 23:01:36 +0200 Subject: [PATCH 008/216] python3Packages: fix wrong ordering of certbot-dns-google in python-modules --- pkgs/top-level/python-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f76878628d68..cc01b17e6d17 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1849,11 +1849,12 @@ self: super: with self; { certbot-dns-cloudflare = callPackage ../development/python-modules/certbot-dns-cloudflare { }; + certbot-dns-google = callPackage ../development/python-modules/certbot-dns-google { }; + certbot-dns-inwx = callPackage ../development/python-modules/certbot-dns-inwx { }; certbot-dns-rfc2136 = callPackage ../development/python-modules/certbot-dns-rfc2136 { }; - certbot-dns-google = callPackage ../development/python-modules/certbot-dns-google { }; certbot-dns-route53 = callPackage ../development/python-modules/certbot-dns-route53 { }; From ae98fb4f90a8001b0d8ef94bbf1f21837ca010bf Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Fri, 15 Sep 2023 23:02:31 +0200 Subject: [PATCH 009/216] python3Packages.certbot-dns-ovh: init at 2.6.0 (follows certbot) --- .../certbot-dns-ovh/default.nix | 39 +++++++++++++++++++ .../poetry2nix/overrides/build-systems.json | 3 ++ pkgs/top-level/python-packages.nix | 3 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/certbot-dns-ovh/default.nix diff --git a/pkgs/development/python-modules/certbot-dns-ovh/default.nix b/pkgs/development/python-modules/certbot-dns-ovh/default.nix new file mode 100644 index 000000000000..da0dd57cff87 --- /dev/null +++ b/pkgs/development/python-modules/certbot-dns-ovh/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, acme +, certbot +, dns-lexicon +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "certbot-dns-ovh"; + + inherit (certbot) src version; + disabled = pythonOlder "3.6"; + + sourceRoot = "${src.name}/certbot-dns-ovh"; + + propagatedBuildInputs = [ + acme + certbot + dns-lexicon + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "-o cache_dir=$(mktemp -d)" + + # Monitor https://github.com/certbot/certbot/issues/9606 for a solution + "-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'" + "-W 'ignore:Package lexicon.providers is deprecated and will be removed in Lexicon 4>=.:DeprecationWarning'" + "-W 'ignore:Legacy configuration object has been used to load the ConfigResolver.:DeprecationWarning'" + ]; + + meta = certbot.meta // { + description = "OVH DNS Authenticator plugin for Certbot"; + }; +} diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json index 04174d1c4354..2e859c6ddbf5 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json @@ -2732,6 +2732,9 @@ "certbot-dns-inwx": [ "setuptools" ], + "certbot-dns-ovh": [ + "setuptools" + ], "certbot-dns-rfc2136": [ "setuptools" ], diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc01b17e6d17..abf3cb37e9f4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1853,8 +1853,9 @@ self: super: with self; { certbot-dns-inwx = callPackage ../development/python-modules/certbot-dns-inwx { }; - certbot-dns-rfc2136 = callPackage ../development/python-modules/certbot-dns-rfc2136 { }; + certbot-dns-ovh = callPackage ../development/python-modules/certbot-dns-ovh { }; + certbot-dns-rfc2136 = callPackage ../development/python-modules/certbot-dns-rfc2136 { }; certbot-dns-route53 = callPackage ../development/python-modules/certbot-dns-route53 { }; From a7e9282a10bf394f0573aadbde11482ceb787508 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Fri, 15 Sep 2023 23:05:13 +0200 Subject: [PATCH 010/216] certbot-full: add certbot-dns-google and certbot-dns-ovh --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fdb6e6ff0cf6..aeca42859403 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20983,6 +20983,8 @@ with pkgs; certbot-full = certbot.withPlugins (cp: with cp; [ certbot-dns-cloudflare + certbot-dns-google + certbot-dns-ovh certbot-dns-rfc2136 certbot-dns-route53 ]); From 9cf05b5d6b96f4bd069b6f5a996f75ab1d6b90a8 Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 20:14:09 +0200 Subject: [PATCH 011/216] python310Packages.watchdog-gevent: init at 0.1.1 --- .../watchdog-gevent/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/watchdog-gevent/default.nix diff --git a/pkgs/development/python-modules/watchdog-gevent/default.nix b/pkgs/development/python-modules/watchdog-gevent/default.nix new file mode 100644 index 000000000000..e1b812b9612f --- /dev/null +++ b/pkgs/development/python-modules/watchdog-gevent/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, gevent +, pytestCheckHook +, watchdog +}: + +buildPythonPackage rec { + pname = "watchdog-gevent"; + version = "0.1.1"; + format = "setuptools"; + + # Need to fetch from github because tests are not present in pypi + src = fetchFromGitHub { + owner = "Bogdanp"; + repo = "watchdog_gevent"; + rev = "v${version}"; + hash = "sha256-FESm3fNuLmOg2ilI/x8U9LuAimHLnahcTHYzW/nzOVY="; + }; + + propagatedBuildInputs = [ watchdog gevent ]; + + postPatch = '' + sed -i setup.cfg \ + -e 's:--cov watchdog_gevent::' \ + -e 's:--cov-report html::' + ''; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "watchdog_gevent" ]; + + meta = with lib; { + description = "A gevent-based observer for watchdog"; + homepage = "https://github.com/Bogdanp/watchdog_gevent"; + license = licenses.asl20; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1004d365de7d..39d04cf68917 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13915,6 +13915,8 @@ self: super: with self; { inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; }; + watchdog-gevent = callPackage ../development/python-modules/watchdog-gevent { }; + watchfiles = callPackage ../development/python-modules/watchfiles { inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; }; From 548e9790a3816af3b8d01aa46dd23f65498570c1 Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 21:11:06 +0200 Subject: [PATCH 012/216] python310Packages.staticmap: init at 0.5.7 --- .../python-modules/staticmap/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/staticmap/default.nix diff --git a/pkgs/development/python-modules/staticmap/default.nix b/pkgs/development/python-modules/staticmap/default.nix new file mode 100644 index 000000000000..bb3eac8655bd --- /dev/null +++ b/pkgs/development/python-modules/staticmap/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pillow +, requests +}: + +buildPythonPackage rec { + pname = "staticmap"; + version = "0.5.7"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-x6lrkCumEpLoGMILCBBhnWuBps21C8wauS1QrE2yCn8="; + }; + + propagatedBuildInputs = [ requests pillow ]; + + pythonImportsCheck = [ "staticmap" ]; + + # Tests seem to be broken + doCheck = false; + + meta = with lib; { + description = "A small, python-based library for creating map images with lines and markers"; + homepage = "https://pypi.org/project/staticmap/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 39d04cf68917..f8e0b39260e8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12553,6 +12553,8 @@ self: super: with self; { static3 = callPackage ../development/python-modules/static3 { }; + staticmap = callPackage ../development/python-modules/staticmap { }; + staticjinja = callPackage ../development/python-modules/staticjinja { }; statistics = callPackage ../development/python-modules/statistics { }; From 5e3fc68fd4a4b610639aaafec14810e93a430f94 Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 21:21:28 +0200 Subject: [PATCH 013/216] python310Packages.dramatiq: init at 1.14.2 --- .../python-modules/dramatiq/default.nix | 106 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 108 insertions(+) create mode 100644 pkgs/development/python-modules/dramatiq/default.nix diff --git a/pkgs/development/python-modules/dramatiq/default.nix b/pkgs/development/python-modules/dramatiq/default.nix new file mode 100644 index 000000000000..8b7300d786f5 --- /dev/null +++ b/pkgs/development/python-modules/dramatiq/default.nix @@ -0,0 +1,106 @@ +{ lib +, stdenv +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, gevent +, pika +, prometheus-client +, pylibmc +, pytestCheckHook +, redis +, watchdog +, watchdog-gevent +}: + +buildPythonPackage rec { + pname = "dramatiq"; + version = "1.14.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Bogdanp"; + repo = "dramatiq"; + rev = "v${version}"; + hash = "sha256-yv6HUJI7wsAQdBJ5QNv7qXhtzPvCsrF1389kyemAV7Y="; + }; + + propagatedBuildInputs = [ + prometheus-client + ]; + + passthru.optional-dependencies = { + all = [ + gevent + pika + pylibmc + redis + watchdog + watchdog-gevent + ]; + gevent = [ + gevent + ]; + memcached = [ + pylibmc + ]; + rabbitmq = [ + pika + ]; + redis = [ + redis + ]; + watch = [ + watchdog + watchdog-gevent + ]; + }; + + nativeCheckInputs = [ pytestCheckHook pika redis pylibmc ]; + + postPatch = '' + sed -i ./setup.cfg \ + -e 's:--cov dramatiq::' \ + -e 's:--cov-report html::' \ + -e 's:--benchmark-autosave::' \ + -e 's:--benchmark-compare::' \ + ''; + + disabledTests = [ + # Requires a running redis + "test_after_process_boot_call_has_no_blocked_signals" + "test_cli_can_be_reloaded_on_sighup" + "test_cli_can_watch_for_source_code_changes" + "test_cli_fork_functions_have_no_blocked_signals" + "test_consumer_threads_have_no_blocked_signals" + "test_middleware_fork_functions_have_no_blocked_signals" + "test_redis_broker_can_connect_via_client" + "test_redis_broker_can_connect_via_url" + "test_redis_process_100k_messages_with_cli" + "test_redis_process_10k_fib_with_cli" + "test_redis_process_1k_latency_with_cli" + "test_worker_threads_have_no_blocked_signals" + # Requires a running rabbitmq + "test_rabbitmq_broker_can_be_passed_a_list_of_parameters_for_failover" + "test_rabbitmq_broker_can_be_passed_a_list_of_uri_for_failover" + "test_rabbitmq_broker_can_be_passed_a_semicolon_separated_list_of_uris" + "test_rabbitmq_broker_connections_are_lazy" + "test_rabbitmq_process_100k_messages_with_cli" + "test_rabbitmq_process_10k_fib_with_cli" + "test_rabbitmq_process_1k_latency_with_cli" + ] ++ lib.optionals stdenv.isDarwin [ + # Takes too long for darwin ofborg + "test_retry_exceptions_can_specify_a_delay" + ]; + + pythonImportsCheck = [ "dramatiq" ]; + + meta = with lib; { + description = "Background Processing for Python 3"; + homepage = "https://github.com/Bogdanp/dramatiq"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f8e0b39260e8..0afae2847973 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3244,6 +3244,8 @@ self: super: with self; { dragonfly = callPackage ../development/python-modules/dragonfly { }; + dramatiq = callPackage ../development/python-modules/dramatiq { }; + drawille = callPackage ../development/python-modules/drawille { }; drawilleplot = callPackage ../development/python-modules/drawilleplot { }; From 5f554d4cd41ee9dcf317260656b471e813816112 Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 23:25:39 +0200 Subject: [PATCH 014/216] python310Packages.periodiq: init at 0.12.1 --- .../python-modules/periodiq/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/periodiq/default.nix diff --git a/pkgs/development/python-modules/periodiq/default.nix b/pkgs/development/python-modules/periodiq/default.nix new file mode 100644 index 000000000000..5ed6a028aa38 --- /dev/null +++ b/pkgs/development/python-modules/periodiq/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitLab +, poetry-core +, dramatiq +, pendulum +, setuptools +, pytest-mock +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "periodiq"; + version = "0.12.1"; + format = "pyproject"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitLab { + owner = "bersace"; + repo = "periodiq"; + rev = "v${version}"; + hash = "sha256-Ar0n+Wi1OUtRdhVxrU7Nz4je8ylaHgPZbXE0a30hzU0="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'poetry>=0.12' 'poetry-core' \ + --replace 'poetry.masonry.api' 'poetry.core.masonry.api' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + dramatiq + pendulum + setuptools + ]; + + nativeCheckInputs = [ pytestCheckHook pytest-mock ]; + + pytestFlagsArray = [ "tests/unit" ]; + + pythonImportsCheck = [ "periodiq" ]; + + meta = with lib; { + description = "Simple Scheduler for Dramatiq Task Queue"; + homepage = "https://pypi.org/project/periodiq/"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0afae2847973..1e41cfcf3d7f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8091,6 +8091,8 @@ self: super: with self; { periodictable = callPackage ../development/python-modules/periodictable { }; + periodiq = callPackage ../development/python-modules/periodiq { }; + permissionedforms = callPackage ../development/python-modules/permissionedforms { }; persim = callPackage ../development/python-modules/persim { }; From bec31afea79150165c3952aeb947781b0cd206af Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 22:50:47 +0200 Subject: [PATCH 015/216] python310Packages.flask-dramatiq: init at 0.6.0 --- .../python-modules/flask-dramatiq/default.nix | 85 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 87 insertions(+) create mode 100644 pkgs/development/python-modules/flask-dramatiq/default.nix diff --git a/pkgs/development/python-modules/flask-dramatiq/default.nix b/pkgs/development/python-modules/flask-dramatiq/default.nix new file mode 100644 index 000000000000..6f8884516f49 --- /dev/null +++ b/pkgs/development/python-modules/flask-dramatiq/default.nix @@ -0,0 +1,85 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitLab +, poetry-core +, dramatiq +, flask +, requests +, pytestCheckHook +, flask-migrate +, periodiq +, postgresql +, postgresqlTestHook +, psycopg2 +}: + +buildPythonPackage { + pname = "flask-dramatiq"; + version = "0.6.0"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitLab { + owner = "bersace"; + repo = "flask-dramatiq"; + rev = "840209e9bf582b4dda468e8bba515f248f3f8534"; + hash = "sha256-qjV1zyVzHPXMt+oUeGBdP9XVlbcSz2MF9Zygj543T4w="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'poetry>=0.12' 'poetry-core' \ + --replace 'poetry.masonry.api' 'poetry.core.masonry.api' + + patchShebangs --build ./example.py + + sed -i ./tests/unit/pytest.ini \ + -e 's:--cov=flask_dramatiq::' \ + -e 's:--cov-report=term-missing::' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + dramatiq + ]; + + nativeCheckInputs = [ + pytestCheckHook + flask + requests + flask-migrate + periodiq + postgresql + postgresqlTestHook + psycopg2 + ] ++ dramatiq.optional-dependencies.rabbitmq; + + postgresqlTestSetupPost = '' + substituteInPlace config.py \ + --replace 'SQLALCHEMY_DATABASE_URI = f"postgresql://{PGUSER}:{PGPASSWORD}@{PGHOST}/{PGDATABASE}"' \ + "SQLALCHEMY_DATABASE_URI = \"postgresql://$PGUSER/$PGDATABASE?host=$PGHOST\"" + python3 ./example.py db upgrade + ''; + + pytestFlagsArray = [ "-x" "tests/func/" "tests/unit"]; + + pythonImportsCheck = [ "flask_dramatiq" ]; + + # Does HTTP requests to localhost + disabledTests = [ + "test_fast" + "test_other" + ]; + + meta = with lib; { + description = "Adds Dramatiq support to your Flask application"; + homepage = "https://gitlab.com/bersace/flask-dramatiq"; + license = licenses.bsd3; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1e41cfcf3d7f..c55264e87fbb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3941,6 +3941,8 @@ self: super: with self; { flask-cors = callPackage ../development/python-modules/flask-cors { }; + flask-dramatiq = callPackage ../development/python-modules/flask-dramatiq { }; + flask-elastic = callPackage ../development/python-modules/flask-elastic { }; flask-expects-json = callPackage ../development/python-modules/flask-expects-json { }; From c814bbda40c688a205050937ade1deb67887efee Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 2 Oct 2023 21:31:50 +0100 Subject: [PATCH 016/216] nginx: add missing nginx.8 manpage Without the change "man nginx" does not render any synopsis. Closes: https://github.com/NixOS/nixpkgs/issues/258658 --- pkgs/servers/http/nginx/generic.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 3db19396bee9..1f175c03d8a8 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -2,7 +2,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt , nginx-doc , nixosTests -, substituteAll, removeReferencesTo, gd, geoip, perl +, installShellFiles, substituteAll, removeReferencesTo, gd, geoip, perl , withDebug ? false , withKTLS ? false , withStream ? true @@ -51,15 +51,17 @@ assert lib.assertMsg (lib.unique moduleNames == moduleNames) stdenv.mkDerivation { inherit pname version nginxVersion; - outputs = ["out" "doc"]; + outputs = [ "out" "doc" ]; src = if src != null then src else fetchurl { url = "https://nginx.org/download/nginx-${version}.tar.gz"; inherit hash; }; - nativeBuildInputs = [ removeReferencesTo ] - ++ nativeBuildInputs; + nativeBuildInputs = [ + installShellFiles + removeReferencesTo + ] ++ nativeBuildInputs; buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ] ++ buildInputs @@ -166,6 +168,12 @@ stdenv.mkDerivation { preInstall = '' mkdir -p $doc cp -r ${nginx-doc}/* $doc + + # TODO: make it unconditional when `openresty` and `nginx` are not + # sharing this code. + if [[ -e man/nginx.8 ]]; then + installManPage man/nginx.8 + fi ''; disallowedReferences = map (m: m.src) modules; From 57147fe506a2d758145a6bbc1359c973436f30b2 Mon Sep 17 00:00:00 2001 From: Rob <86313040+robert-manchester@users.noreply.github.com> Date: Sun, 8 Oct 2023 05:49:37 -0700 Subject: [PATCH 017/216] maintainers: add robert-manchester --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2e7d6171ea0f..88595a2a7dff 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14912,6 +14912,12 @@ githubId = 496447; name = "Robert Hensing"; }; + robert-manchester = { + email = "robert.manchester@gmail.com"; + github = "robert-manchester"; + githubId = 86313040; + name = "Robert Manchester"; + }; robertodr = { email = "roberto.diremigio@gmail.com"; github = "robertodr"; From f2bf0dbd4e8d26b7db861307a9ac224c4fde5eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 10 Oct 2023 18:25:22 +0200 Subject: [PATCH 018/216] =?UTF-8?q?fishPlugins.tide:=205.6.0=20=E2=86=92?= =?UTF-8?q?=206.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/shells/fish/plugins/tide.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/fish/plugins/tide.nix b/pkgs/shells/fish/plugins/tide.nix index 94cbfaa6b8f9..39afd487afdb 100644 --- a/pkgs/shells/fish/plugins/tide.nix +++ b/pkgs/shells/fish/plugins/tide.nix @@ -4,13 +4,13 @@ # Refer to the following comment to get you setup: https://github.com/NixOS/nixpkgs/pull/201646#issuecomment-1320893716 buildFishPlugin rec { pname = "tide"; - version = "5.6.0"; + version = "6.0.1"; src = fetchFromGitHub { owner = "IlanCosman"; repo = "tide"; rev = "v${version}"; - hash = "sha256-cCI1FDpvajt1vVPUd/WvsjX/6BJm6X1yFPjqohmo1rI="; + hash = "sha256-oLD7gYFCIeIzBeAW1j62z5FnzWAp3xSfxxe7kBtTLgA="; }; #buildFishplugin will only move the .fish files, but tide has a tide configure function From 136c2e9b6f06cf56ccb8acf89c2def562560f48b Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 11 Oct 2023 11:28:55 +0900 Subject: [PATCH 019/216] python311Packages.zope-lifecycleevent: rename from zope_lifecycleevent --- .../{zope_lifecycleevent => zope-lifecycleevent}/default.nix | 5 +++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename pkgs/development/python-modules/{zope_lifecycleevent => zope-lifecycleevent}/default.nix (89%) diff --git a/pkgs/development/python-modules/zope_lifecycleevent/default.nix b/pkgs/development/python-modules/zope-lifecycleevent/default.nix similarity index 89% rename from pkgs/development/python-modules/zope_lifecycleevent/default.nix rename to pkgs/development/python-modules/zope-lifecycleevent/default.nix index 807deb097feb..31077143f381 100644 --- a/pkgs/development/python-modules/zope_lifecycleevent/default.nix +++ b/pkgs/development/python-modules/zope-lifecycleevent/default.nix @@ -7,11 +7,12 @@ }: buildPythonPackage rec { - pname = "zope.lifecycleevent"; + pname = "zope-lifecycleevent"; version = "4.4"; src = fetchPypi { - inherit pname version; + pname = "zope.lifecycleevent"; + inherit version; hash = "sha256-9ahU6J/5fe6ke/vqN4u77yeJ0uDMkKHB2lfZChzmfLU="; }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a791b8ccd86c..5f6c543db4c3 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -421,5 +421,6 @@ mapAliases ({ zope_component = zope-component; # added 2023-07-28 zope_deprecation = zope-deprecation; # added 2023-10-07 zope_i18nmessageid = zope-i18nmessageid; # added 2023-07-29 + zope_lifecycleevent = zope-lifecycleevent; # added 2023-10-11 zope_proxy = zope-proxy; # added 2023-10-07 }) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e845f54927d..f364bd6019a3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15918,7 +15918,7 @@ self: super: with self; { zope_interface = callPackage ../development/python-modules/zope_interface { }; - zope_lifecycleevent = callPackage ../development/python-modules/zope_lifecycleevent { }; + zope-lifecycleevent = callPackage ../development/python-modules/zope-lifecycleevent { }; zope_location = callPackage ../development/python-modules/zope_location { }; From 58b0faf3881b01ffb1894fc3c0b0c4dc56c03923 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 11 Oct 2023 12:00:55 +0900 Subject: [PATCH 020/216] python311Packages.zope-lifecycleevent: refactor --- .../python-modules/zope-lifecycleevent/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/zope-lifecycleevent/default.nix b/pkgs/development/python-modules/zope-lifecycleevent/default.nix index 31077143f381..619817d41fd2 100644 --- a/pkgs/development/python-modules/zope-lifecycleevent/default.nix +++ b/pkgs/development/python-modules/zope-lifecycleevent/default.nix @@ -2,13 +2,15 @@ , buildPythonPackage , fetchPypi , isPy3k +, setuptools , zope_event -, zope-component +, zope_interface }: buildPythonPackage rec { pname = "zope-lifecycleevent"; version = "4.4"; + pyproject = true; src = fetchPypi { pname = "zope.lifecycleevent"; @@ -16,7 +18,11 @@ buildPythonPackage rec { hash = "sha256-9ahU6J/5fe6ke/vqN4u77yeJ0uDMkKHB2lfZChzmfLU="; }; - propagatedBuildInputs = [ zope_event zope-component ]; + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ zope_event zope_interface ]; # namespace colides with local directory doCheck = false; @@ -30,8 +36,8 @@ buildPythonPackage rec { meta = with lib; { homepage = "https://github.com/zopefoundation/zope.lifecycleevent"; description = "Object life-cycle events"; - license = licenses.zpl20; + changelog = "https://github.com/zopefoundation/zope.lifecycleevent/blob/${version}/CHANGES.rst"; + license = licenses.zpl21; maintainers = with maintainers; [ goibhniu ]; }; - } From 60995e325c4dcb045fc58395928d2ebf39c7d4c2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 11 Oct 2023 12:01:41 +0900 Subject: [PATCH 021/216] python311Packages.zope-lifecycleevent: 4.4 -> 5.0 Changelog: https://github.com/zopefoundation/zope.lifecycleevent/blob/5.0/CHANGES.rst --- .../python-modules/zope-lifecycleevent/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/zope-lifecycleevent/default.nix b/pkgs/development/python-modules/zope-lifecycleevent/default.nix index 619817d41fd2..fc6b0005ffac 100644 --- a/pkgs/development/python-modules/zope-lifecycleevent/default.nix +++ b/pkgs/development/python-modules/zope-lifecycleevent/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, isPy3k +, pythonOlder , setuptools , zope_event , zope_interface @@ -9,13 +9,15 @@ buildPythonPackage rec { pname = "zope-lifecycleevent"; - version = "4.4"; + version = "5.0"; pyproject = true; + disabled = pythonOlder "3.7"; + src = fetchPypi { pname = "zope.lifecycleevent"; inherit version; - hash = "sha256-9ahU6J/5fe6ke/vqN4u77yeJ0uDMkKHB2lfZChzmfLU="; + hash = "sha256-6tP7SW52FPm1adFtrUt4BSsKwhh1utjWbKNQNS2bb50="; }; nativeBuildInputs = [ @@ -27,8 +29,7 @@ buildPythonPackage rec { # namespace colides with local directory doCheck = false; - # zope uses pep 420 namespaces for python3, doesn't work with nix + python2 - pythonImportsCheck = lib.optionals isPy3k [ + pythonImportsCheck = [ "zope.lifecycleevent" "zope.interface" ]; From f8b06175be9752193c7640ade43ffef743175e72 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 11 Oct 2023 12:47:46 +0900 Subject: [PATCH 022/216] python311Packages.sphinx-pypi-upload: remove It is abandoned and uploading documentation to PyPI has been disabled. --- .../sphinx_pypi_upload/default.nix | 21 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 pkgs/development/python-modules/sphinx_pypi_upload/default.nix diff --git a/pkgs/development/python-modules/sphinx_pypi_upload/default.nix b/pkgs/development/python-modules/sphinx_pypi_upload/default.nix deleted file mode 100644 index d2c20e980e7a..000000000000 --- a/pkgs/development/python-modules/sphinx_pypi_upload/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -}: - -buildPythonPackage rec { - pname = "Sphinx-PyPI-upload"; - version = "0.2.1"; - - src = fetchPypi { - inherit pname version; - sha256 = "5f919a47ce7a7e6028dba809de81ae1297ac192347cf6fc54efca919d4865159"; - }; - - meta = with lib; { - description = "Setuptools command for uploading Sphinx documentation to PyPI"; - homepage = "https://bitbucket.org/jezdez/sphinx-pypi-upload/"; - license = licenses.bsd0; - }; - -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a791b8ccd86c..b4b4514a7beb 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -372,6 +372,7 @@ mapAliases ({ somecomfort = throw "somecomfort was removed because Home Assistant switched to aiosomecomfort"; # added 2023-02-01 SPARQLWrapper = sparqlwrapper; sphinx-jquery = sphinxcontrib-jquery; # added 2023-02-24 + sphinx_pypi_upload = throw "sphinx_pypi_upload has been removed since it is abandoned."; # added 2023-10-11 sphinx_rtd_theme = sphinx-rtd-theme; # added 2022-08-03 sphinxcontrib-autoapi = sphinx-autoapi; # added 2023-02=28 sphinxcontrib_plantuml = sphinxcontrib-plantuml; # added 2021-08-02 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e845f54927d..d1c0b2f62fa4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13187,8 +13187,6 @@ self: super: with self; { sphinx-mdinclude = callPackage ../development/python-modules/sphinx-mdinclude { }; - sphinx_pypi_upload = callPackage ../development/python-modules/sphinx_pypi_upload { }; - sphinx-rtd-theme = callPackage ../development/python-modules/sphinx-rtd-theme { }; sphinx-serve = callPackage ../development/python-modules/sphinx-serve { }; From f5701c559273a46f0c8d172f6e32b7b9baabc89f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 12 Oct 2023 04:28:53 +0000 Subject: [PATCH 023/216] openai-whisper-cpp: 1.4.0 -> 1.4.2 --- pkgs/tools/audio/openai-whisper-cpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/audio/openai-whisper-cpp/default.nix b/pkgs/tools/audio/openai-whisper-cpp/default.nix index f6d83690824f..f19425201cde 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/default.nix +++ b/pkgs/tools/audio/openai-whisper-cpp/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "whisper-cpp"; - version = "1.4.0"; + version = "1.4.2"; src = fetchFromGitHub { owner = "ggerganov"; repo = "whisper.cpp"; rev = "refs/tags/v${version}" ; - hash = "sha256-176MpooVQrq1dXC62h8Yyyhw6IjCA50tp1J4DQPSePQ="; + hash = "sha256-Qea9zGLJ41D+l8h1Sg/KJI6Ou02jtbRIxYPGoabM8nY="; }; # The upstream download script tries to download the models to the From 39e1727f0f01181655f31de474f2fe13b7ce582e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 21:41:57 +0200 Subject: [PATCH 024/216] nixos/dex: fix start with latest systemd update With those settings starting dex crashed with: Oct 03 21:37:51 hydrogen (tart-pre)[11048]: dex.service: Failed to set up mount namespacing: /run/systemd/mount-rootfs/sys/fs/cgroup/system.slice/dex.service/memory.pressure: No such file or directory Oct 03 21:37:51 hydrogen (tart-pre)[11048]: dex.service: Failed at step NAMESPACE spawning /nix/store/q8clp1lm8jznxf9330jd8cwc6mdy6glz-dex-start-pre: No such file or directory --- nixos/modules/services/web-apps/dex.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/web-apps/dex.nix b/nixos/modules/services/web-apps/dex.nix index bd041db007a1..0c4a71c6dfe4 100644 --- a/nixos/modules/services/web-apps/dex.nix +++ b/nixos/modules/services/web-apps/dex.nix @@ -108,8 +108,7 @@ in ProtectClock = true; ProtectHome = true; ProtectHostname = true; - # Would re-mount paths ignored by temporary root - #ProtectSystem = "strict"; + ProtectSystem = "strict"; ProtectControlGroups = true; ProtectKernelLogs = true; ProtectKernelModules = true; @@ -121,9 +120,7 @@ in RestrictSUIDSGID = true; SystemCallArchitectures = "native"; SystemCallFilter = [ "@system-service" "~@privileged @setuid @keyring" ]; - TemporaryFileSystem = "/:ro"; - # Does not work well with the temporary root - #UMask = "0066"; + UMask = "0066"; } // optionalAttrs (cfg.environmentFile != null) { EnvironmentFile = cfg.environmentFile; }; From a9a9c7df7a212e820c5e4091ea2a8925a177d4a9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 13 Oct 2023 07:25:52 +0000 Subject: [PATCH 025/216] python310Packages.annotated-types: 0.5.0 -> 0.6.0 --- pkgs/development/python-modules/annotated-types/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/annotated-types/default.nix b/pkgs/development/python-modules/annotated-types/default.nix index 645e3c40c48c..85e2379507c6 100644 --- a/pkgs/development/python-modules/annotated-types/default.nix +++ b/pkgs/development/python-modules/annotated-types/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "annotated-types"; - version = "0.5.0"; + version = "0.6.0"; format = "pyproject"; src = fetchFromGitHub { owner = "annotated-types"; repo = "annotated-types"; - rev = "v${version}"; - hash = "sha256-zCsWfJ8BQuov8FN+hlm9XBKWAAQ/KHPK/x024A8k2kE="; + rev = "refs/tags/v${version}"; + hash = "sha256-SZ9/rXYcns4DFM6vk6SRKvuv3MY3T7xO9aW7WAQqtVE="; }; nativeBuildInputs = [ From 60cd55da084c5a9e5000bc125edc362833a89ad9 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 14 Oct 2023 04:20:00 +0000 Subject: [PATCH 026/216] pgmoneta: init at 0.7.0 --- pkgs/by-name/pg/pgmoneta/package.nix | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/by-name/pg/pgmoneta/package.nix diff --git a/pkgs/by-name/pg/pgmoneta/package.nix b/pkgs/by-name/pg/pgmoneta/package.nix new file mode 100644 index 000000000000..bbfbb1a64476 --- /dev/null +++ b/pkgs/by-name/pg/pgmoneta/package.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, bzip2 +, cjson +, cmake +, curl +, docutils +, fetchFromGitHub +, libarchive +, libev +, libgccjit +, libssh +, lz4 +, openssl +, systemd +, zlib +, zstd +}: + +stdenv.mkDerivation rec { + pname = "pgmoneta"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "pgmoneta"; + repo = "pgmoneta"; + rev = version; + hash = "sha256-Acg60QFMmRTubYWkPxbHTciVOYoIWc3GZGQVauewZik="; + }; + + nativeBuildInputs = [ + cmake + docutils # for rst2man + ]; + + buildInputs = [ + bzip2 + cjson + curl + libarchive + libev + libgccjit + libssh + lz4 + openssl + systemd + zlib + zstd + ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-error"; + + meta = with lib; { + description = "Backup / restore solution for PostgreSQL"; + homepage = "https://pgmoneta.github.io/"; + changelog = "https://github.com/pgmoneta/pgmoneta/releases/tag/${version}"; + license = licenses.bsd3; + maintainers = [ maintainers.marsam ]; + platforms = platforms.linux; + }; +} From 119714f5787108a099d3b4867bb061738a66457e Mon Sep 17 00:00:00 2001 From: Gustavo Coutinho de Souza Date: Fri, 6 Oct 2023 19:54:31 -0300 Subject: [PATCH 027/216] xssstate: refactor drv and add `meta.mainProgram` --- pkgs/tools/X11/xssstate/default.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/X11/xssstate/default.nix b/pkgs/tools/X11/xssstate/default.nix index a1ce545a5f13..53fd1138c29d 100644 --- a/pkgs/tools/X11/xssstate/default.nix +++ b/pkgs/tools/X11/xssstate/default.nix @@ -4,29 +4,31 @@ , libX11 , libXScrnSaver }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "xssstate"; - # - # Use the date of the last commit, since there were bug fixes after the 1.1 - # release. - # - version = "unstable-2022-09-24"; + version = "1.1-unstable-2022-09-24"; + src = fetchgit { url = "https://git.suckless.org/xssstate/"; rev = "5d8e9b49ce2970f786f1e5aa12bbaae83900453f"; hash = "sha256-Aor12tU1I/qNZCdBhZcvNK1FWFh0HYK8CEI29X5yoeA="; }; - makeFlags = [ "VERSION=${version}" ]; + buildInputs = [ + libX11 + libXScrnSaver + ]; - installFlags = [ "PREFIX=$(out)" ]; - - buildInputs = [ libX11 libXScrnSaver ]; + makeFlags = [ + "PREFIX=${placeholder "out"}" + "VERSION=${finalAttrs.version}" + ]; meta = with lib; { description = "A simple tool to retrieve the X screensaver state"; license = licenses.mit; maintainers = with maintainers; [ onemoresuza ]; platforms = platforms.linux; + mainProgram = "xssstate"; }; -} +}) From 6cd8da76f9fa62343e22a0cbeda3ade5345901ec Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 20 Jul 2023 01:22:43 +0200 Subject: [PATCH 028/216] nixos/hedgedoc: refactor to reduce option count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove lots of declared options that were not used outside of being included in settings. These should now be used through the freeform module. - Deprecate `cfg.workDir`, in favor of using systemds `StateDirectory` - Use sqlite as default database. Co-authored-by: Sandro Jäckel --- .../manual/release-notes/rl-2311.section.md | 2 + nixos/modules/services/web-apps/hedgedoc.nix | 1207 +++-------------- nixos/tests/hedgedoc.nix | 64 +- 3 files changed, 259 insertions(+), 1014 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 69722b9ab53b..f4afb9b9b8ef 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -335,6 +335,8 @@ - The application firewall `opensnitch` now uses the process monitor method eBPF as default as recommended by upstream. The method can be changed with the setting [services.opensnitch.settings.ProcMonitorMethod](#opt-services.opensnitch.settings.ProcMonitorMethod). +- `services.hedgedoc` has been heavily refactored, reducing the amount of declared options in the module. Most of the options should still work without any changes. Some options have been deprecated, as they no longer have any effect. See [#244941](https://github.com/NixOS/nixpkgs/pull/244941) for more details. + - The module [services.ankisyncd](#opt-services.ankisyncd.package) has been switched to [anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) from the old python version, which was difficult to update, had not been updated in a while, and did not support recent versions of anki. Unfortunately all servers supporting new clients (newer version of anki-sync-server, anki's built in sync server and this new rust package) do not support the older sync protocol that was used in the old server, so such old clients will also need updating and in particular the anki package in nixpkgs is also being updated in this release. The module update takes care of the new config syntax and the data itself (user login and cards) are compatible, so users of the module will be able to just log in again after updating both client and server without any extra action. diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index bfa5fd5aff25..2cc732636e6d 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - inherit (lib) literalExpression mdDoc mkEnableOption mkIf mkOption mkPackageOptionMD mkRenamedOptionModule types versionAtLeast; + inherit (lib) mkOption types mdDoc literalExpression; cfg = config.services.hedgedoc; @@ -9,990 +9,187 @@ let # versionAtLeast statement remains set to 21.03 for backwards compatibility. # See https://github.com/NixOS/nixpkgs/pull/108899 and # https://github.com/NixOS/rfcs/blob/master/rfcs/0080-nixos-release-schedule.md. - name = if versionAtLeast config.system.stateVersion "21.03" - then "hedgedoc" - else "codimd"; + name = if lib.versionAtLeast config.system.stateVersion "21.03" then + "hedgedoc" + else + "codimd"; - settingsFormat = pkgs.formats.json {}; - - prettyJSON = conf: - pkgs.runCommandLocal "hedgedoc-config.json" { - nativeBuildInputs = [ pkgs.jq ]; - } '' - jq '{production:del(.[]|nulls)|del(.[][]?|nulls)}' \ - < ${settingsFormat.generate "hedgedoc-ugly.json" cfg.settings} \ - > $out - ''; + settingsFormat = pkgs.formats.json { }; in { imports = [ - (mkRenamedOptionModule [ "services" "codimd" ] [ "services" "hedgedoc" ]) - (mkRenamedOptionModule - [ "services" "hedgedoc" "configuration" ] [ "services" "hedgedoc" "settings" ]) + (lib.mkRenamedOptionModule [ "services" "codimd" ] [ "services" "hedgedoc" ]) + (lib.mkRenamedOptionModule [ "services" "hedgedoc" "configuration" ] [ "services" "hedgedoc" "settings" ]) + (lib.mkRenamedOptionModule [ "services" "hedgedoc" "groups" ] [ "users" "users" "hedgedoc" "extraGroups" ]) + (lib.mkRemovedOptionModule [ "services" "hedgedoc" "workDir" ] '' + This option has been removed in favor of systemd managing the state directory. + + If you have set this option without specifying `services.settings.uploadsDir`, + please move these files to `/var/lib/hedgedoc/uploads`, or set the option to point + at the correct location. + '') ]; options.services.hedgedoc = { - package = mkPackageOptionMD pkgs "hedgedoc" { }; - enable = mkEnableOption (lib.mdDoc "the HedgeDoc Markdown Editor"); + package = lib.mkPackageOptionMD pkgs "hedgedoc" { }; + enable = lib.mkEnableOption (mdDoc "the HedgeDoc Markdown Editor"); - groups = mkOption { - type = types.listOf types.str; - default = []; - description = lib.mdDoc '' - Groups to which the service user should be added. - ''; - }; - - workDir = mkOption { - type = types.path; - default = "/var/lib/${name}"; - description = lib.mdDoc '' - Working directory for the HedgeDoc service. - ''; - }; - - settings = let options = { - debug = mkEnableOption (lib.mdDoc "debug mode"); - domain = mkOption { - type = types.nullOr types.str; - default = null; - example = "hedgedoc.org"; - description = lib.mdDoc '' - Domain name for the HedgeDoc instance. - ''; - }; - urlPath = mkOption { - type = types.nullOr types.str; - default = null; - example = "/url/path/to/hedgedoc"; - description = lib.mdDoc '' - Path under which HedgeDoc is accessible. - ''; - }; - host = mkOption { - type = types.str; - default = "localhost"; - description = lib.mdDoc '' - Address to listen on. - ''; - }; - port = mkOption { - type = types.port; - default = 3000; - example = 80; - description = lib.mdDoc '' - Port to listen on. - ''; - }; - path = mkOption { - type = types.nullOr types.str; - default = null; - example = "/run/hedgedoc.sock"; - description = lib.mdDoc '' - Specify where a UNIX domain socket should be placed. - ''; - }; - allowOrigin = mkOption { - type = types.listOf types.str; - default = []; - example = [ "localhost" "hedgedoc.org" ]; - description = lib.mdDoc '' - List of domains to whitelist. - ''; - }; - useSSL = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Enable to use SSL server. This will also enable - {option}`protocolUseSSL`. - ''; - }; - enableStatsApi = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Enables or disables the /status and /metrics endpoint. - ''; - }; - hsts = { - enable = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to enable HSTS if HTTPS is also enabled. - ''; - }; - maxAgeSeconds = mkOption { - type = types.int; - default = 31536000; - description = lib.mdDoc '' - Max duration for clients to keep the HSTS status. - ''; - }; - includeSubdomains = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to include subdomains in HSTS. - ''; - }; - preload = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to allow preloading of the site's HSTS status. - ''; - }; - }; - csp = mkOption { - type = types.nullOr types.attrs; - default = null; - example = literalExpression '' - { - enable = true; - directives = { - scriptSrc = "trustworthy.scripts.example.com"; - }; - upgradeInsecureRequest = "auto"; - addDefaults = true; - } - ''; - description = lib.mdDoc '' - Specify the Content Security Policy which is passed to Helmet. - For configuration details see . - ''; - }; - protocolUseSSL = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Enable to use TLS for resource paths. - This only applies when {option}`domain` is set. - ''; - }; - urlAddPort = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Enable to add the port to callback URLs. - This only applies when {option}`domain` is set - and only for ports other than 80 and 443. - ''; - }; - useCDN = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Whether to use CDN resources or not. - ''; - }; - allowAnonymous = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to allow anonymous usage. - ''; - }; - allowAnonymousEdits = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Whether to allow guests to edit existing notes with the `freely` permission, - when {option}`allowAnonymous` is enabled. - ''; - }; - allowFreeURL = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Whether to allow note creation by accessing a nonexistent note URL. - ''; - }; - requireFreeURLAuthentication = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Whether to require authentication for FreeURL mode style note creation. - ''; - }; - defaultPermission = mkOption { - type = types.enum [ "freely" "editable" "limited" "locked" "private" ]; - default = "editable"; - description = lib.mdDoc '' - Default permissions for notes. - This only applies for signed-in users. - ''; - }; - dbURL = mkOption { - type = types.nullOr types.str; - default = null; - example = '' - postgres://user:pass@host:5432/dbname - ''; - description = lib.mdDoc '' - Specify which database to use. - HedgeDoc supports mysql, postgres, sqlite and mssql. - See [ - https://sequelize.readthedocs.io/en/v3/](https://sequelize.readthedocs.io/en/v3/) for more information. - Note: This option overrides {option}`db`. - ''; - }; - db = mkOption { - type = types.attrs; - default = {}; - example = literalExpression '' - { - dialect = "sqlite"; - storage = "/var/lib/${name}/db.${name}.sqlite"; - } - ''; - description = lib.mdDoc '' - Specify the configuration for sequelize. - HedgeDoc supports mysql, postgres, sqlite and mssql. - See [ - https://sequelize.readthedocs.io/en/v3/](https://sequelize.readthedocs.io/en/v3/) for more information. - Note: This option overrides {option}`db`. - ''; - }; - sslKeyPath= mkOption { - type = types.nullOr types.str; - default = null; - example = "/var/lib/hedgedoc/hedgedoc.key"; - description = lib.mdDoc '' - Path to the SSL key. Needed when {option}`useSSL` is enabled. - ''; - }; - sslCertPath = mkOption { - type = types.nullOr types.str; - default = null; - example = "/var/lib/hedgedoc/hedgedoc.crt"; - description = lib.mdDoc '' - Path to the SSL cert. Needed when {option}`useSSL` is enabled. - ''; - }; - sslCAPath = mkOption { - type = types.listOf types.str; - default = []; - example = [ "/var/lib/hedgedoc/ca.crt" ]; - description = lib.mdDoc '' - SSL ca chain. Needed when {option}`useSSL` is enabled. - ''; - }; - dhParamPath = mkOption { - type = types.nullOr types.str; - default = null; - example = "/var/lib/hedgedoc/dhparam.pem"; - description = lib.mdDoc '' - Path to the SSL dh params. Needed when {option}`useSSL` is enabled. - ''; - }; - tmpPath = mkOption { - type = types.str; - default = "/tmp"; - description = lib.mdDoc '' - Path to the temp directory HedgeDoc should use. - Note that {option}`serviceConfig.PrivateTmp` is enabled for - the HedgeDoc systemd service by default. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - defaultNotePath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/default.md"; - defaultText = literalExpression "\"\${cfg.package}/public/default.md\""; - description = lib.mdDoc '' - Path to the default Note file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - docsPath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/docs"; - defaultText = literalExpression "\"\${cfg.package}/public/docs\""; - description = lib.mdDoc '' - Path to the docs directory. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - indexPath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/views/index.ejs"; - defaultText = literalExpression "\"\${cfg.package}/public/views/index.ejs\""; - description = lib.mdDoc '' - Path to the index template file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - hackmdPath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/views/hackmd.ejs"; - defaultText = literalExpression "\"\${cfg.package}/public/views/hackmd.ejs\""; - description = lib.mdDoc '' - Path to the hackmd template file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - errorPath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/views/error.ejs"; - defaultText = literalExpression "\"\${cfg.package}/public/views/error.ejs\""; - description = lib.mdDoc '' - Path to the error template file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - prettyPath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/views/pretty.ejs"; - defaultText = literalExpression "\"\${cfg.package}/public/views/pretty.ejs\""; - description = lib.mdDoc '' - Path to the pretty template file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - slidePath = mkOption { - type = types.nullOr types.str; - default = "${cfg.package}/public/views/slide.hbs"; - defaultText = literalExpression "\"\${cfg.package}/public/views/slide.hbs\""; - description = lib.mdDoc '' - Path to the slide template file. - (Non-canonical paths are relative to HedgeDoc's base directory) - ''; - }; - uploadsPath = mkOption { - type = types.str; - default = "${cfg.workDir}/uploads"; - defaultText = literalExpression "\"\${cfg.workDir}/uploads\""; - description = lib.mdDoc '' - Path under which uploaded files are saved. - ''; - }; - sessionName = mkOption { - type = types.str; - default = "connect.sid"; - description = lib.mdDoc '' - Specify the name of the session cookie. - ''; - }; - sessionSecret = mkOption { - type = types.nullOr types.str; - default = null; - description = lib.mdDoc '' - Specify the secret used to sign the session cookie. - If unset, one will be generated on startup. - ''; - }; - sessionLife = mkOption { - type = types.int; - default = 1209600000; - description = lib.mdDoc '' - Session life time in milliseconds. - ''; - }; - heartbeatInterval = mkOption { - type = types.int; - default = 5000; - description = lib.mdDoc '' - Specify the socket.io heartbeat interval. - ''; - }; - heartbeatTimeout = mkOption { - type = types.int; - default = 10000; - description = lib.mdDoc '' - Specify the socket.io heartbeat timeout. - ''; - }; - documentMaxLength = mkOption { - type = types.int; - default = 100000; - description = lib.mdDoc '' - Specify the maximum document length. - ''; - }; - email = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to enable email sign-in. - ''; - }; - allowEmailRegister = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to enable email registration. - ''; - }; - allowGravatar = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to use gravatar as profile picture source. - ''; - }; - imageUploadType = mkOption { - type = types.enum [ "imgur" "s3" "minio" "filesystem" ]; - default = "filesystem"; - description = lib.mdDoc '' - Specify where to upload images. - ''; - }; - minio = mkOption { - type = types.nullOr (types.submodule { - options = { - accessKey = mkOption { - type = types.str; - description = lib.mdDoc '' - Minio access key. - ''; - }; - secretKey = mkOption { - type = types.str; - description = lib.mdDoc '' - Minio secret key. - ''; - }; - endPoint = mkOption { - type = types.str; - description = lib.mdDoc '' - Minio endpoint. - ''; - }; - port = mkOption { - type = types.port; - default = 9000; - description = lib.mdDoc '' - Minio listen port. - ''; - }; - secure = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to use HTTPS for Minio. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the minio third-party integration."; - }; - s3 = mkOption { - type = types.nullOr (types.submodule { - options = { - accessKeyId = mkOption { - type = types.str; - description = lib.mdDoc '' - AWS access key id. - ''; - }; - secretAccessKey = mkOption { - type = types.str; - description = lib.mdDoc '' - AWS access key. - ''; - }; - region = mkOption { - type = types.str; - description = lib.mdDoc '' - AWS S3 region. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the s3 third-party integration."; - }; - s3bucket = mkOption { - type = types.nullOr types.str; - default = null; - description = lib.mdDoc '' - Specify the bucket name for upload types `s3` and `minio`. - ''; - }; - allowPDFExport = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to enable PDF exports. - ''; - }; - imgur.clientId = mkOption { - type = types.nullOr types.str; - default = null; - description = lib.mdDoc '' - Imgur API client ID. - ''; - }; - azure = mkOption { - type = types.nullOr (types.submodule { - options = { - connectionString = mkOption { - type = types.str; - description = lib.mdDoc '' - Azure Blob Storage connection string. - ''; - }; - container = mkOption { - type = types.str; - description = lib.mdDoc '' - Azure Blob Storage container name. - It will be created if non-existent. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the azure third-party integration."; - }; - oauth2 = mkOption { - type = types.nullOr (types.submodule { - options = { - authorizationURL = mkOption { - type = types.str; - description = lib.mdDoc '' - Specify the OAuth authorization URL. - ''; - }; - tokenURL = mkOption { - type = types.str; - description = lib.mdDoc '' - Specify the OAuth token URL. - ''; - }; - baseURL = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the OAuth base URL. - ''; - }; - userProfileURL = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the OAuth userprofile URL. - ''; - }; - userProfileUsernameAttr = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the name of the attribute for the username from the claim. - ''; - }; - userProfileDisplayNameAttr = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the name of the attribute for the display name from the claim. - ''; - }; - userProfileEmailAttr = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the name of the attribute for the email from the claim. - ''; - }; - scope = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the OAuth scope. - ''; - }; - providerName = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the name to be displayed for this strategy. - ''; - }; - rolesClaim = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the role claim name. - ''; - }; - accessRole = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify role which should be included in the ID token roles claim to grant access - ''; - }; - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - Specify the OAuth client ID. - ''; - }; - clientSecret = mkOption { - type = with types; nullOr str; - default = null; - description = lib.mdDoc '' - Specify the OAuth client secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the OAuth integration."; - }; - facebook = mkOption { - type = types.nullOr (types.submodule { - options = { - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - Facebook API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Facebook API client secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the facebook third-party integration"; - }; - twitter = mkOption { - type = types.nullOr (types.submodule { - options = { - consumerKey = mkOption { - type = types.str; - description = lib.mdDoc '' - Twitter API consumer key. - ''; - }; - consumerSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Twitter API consumer secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the Twitter third-party integration."; - }; - github = mkOption { - type = types.nullOr (types.submodule { - options = { - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - GitHub API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Github API client secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the GitHub third-party integration."; - }; - gitlab = mkOption { - type = types.nullOr (types.submodule { - options = { - baseURL = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - GitLab API authentication endpoint. - Only needed for other endpoints than gitlab.com. - ''; - }; - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - GitLab API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - GitLab API client secret. - ''; - }; - scope = mkOption { - type = types.enum [ "api" "read_user" ]; - default = "api"; - description = lib.mdDoc '' - GitLab API requested scope. - GitLab snippet import/export requires api scope. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the GitLab third-party integration."; - }; - mattermost = mkOption { - type = types.nullOr (types.submodule { - options = { - baseURL = mkOption { - type = types.str; - description = lib.mdDoc '' - Mattermost authentication endpoint. - ''; - }; - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - Mattermost API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Mattermost API client secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the Mattermost third-party integration."; - }; - dropbox = mkOption { - type = types.nullOr (types.submodule { - options = { - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - Dropbox API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Dropbox API client secret. - ''; - }; - appKey = mkOption { - type = types.str; - description = lib.mdDoc '' - Dropbox app key. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the Dropbox third-party integration."; - }; - google = mkOption { - type = types.nullOr (types.submodule { - options = { - clientID = mkOption { - type = types.str; - description = lib.mdDoc '' - Google API client ID. - ''; - }; - clientSecret = mkOption { - type = types.str; - description = lib.mdDoc '' - Google API client secret. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the Google third-party integration."; - }; - ldap = mkOption { - type = types.nullOr (types.submodule { - options = { - providerName = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Optional name to be displayed at login form, indicating the LDAP provider. - ''; - }; - url = mkOption { - type = types.str; - example = "ldap://localhost"; - description = lib.mdDoc '' - URL of LDAP server. - ''; - }; - bindDn = mkOption { - type = types.str; - description = lib.mdDoc '' - Bind DN for LDAP access. - ''; - }; - bindCredentials = mkOption { - type = types.str; - description = lib.mdDoc '' - Bind credentials for LDAP access. - ''; - }; - searchBase = mkOption { - type = types.str; - example = "o=users,dc=example,dc=com"; - description = lib.mdDoc '' - LDAP directory to begin search from. - ''; - }; - searchFilter = mkOption { - type = types.str; - example = "(uid={{username}})"; - description = lib.mdDoc '' - LDAP filter to search with. - ''; - }; - searchAttributes = mkOption { - type = types.nullOr (types.listOf types.str); - default = null; - example = [ "displayName" "mail" ]; - description = lib.mdDoc '' - LDAP attributes to search with. - ''; - }; - userNameField = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - LDAP field which is used as the username on HedgeDoc. - By default {option}`useridField` is used. - ''; - }; - useridField = mkOption { - type = types.str; - example = "uid"; - description = lib.mdDoc '' - LDAP field which is a unique identifier for users on HedgeDoc. - ''; - }; - tlsca = mkOption { - type = types.str; - default = "/etc/ssl/certs/ca-certificates.crt"; - example = "server-cert.pem,root.pem"; - description = lib.mdDoc '' - Root CA for LDAP TLS in PEM format. - ''; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the LDAP integration."; - }; - saml = mkOption { - type = types.nullOr (types.submodule { - options = { - idpSsoUrl = mkOption { - type = types.str; - example = "https://idp.example.com/sso"; - description = lib.mdDoc '' - IdP authentication endpoint. - ''; - }; - idpCert = mkOption { - type = types.path; - example = "/path/to/cert.pem"; - description = lib.mdDoc '' - Path to IdP certificate file in PEM format. - ''; - }; - issuer = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Optional identity of the service provider. - This defaults to the server URL. - ''; - }; - identifierFormat = mkOption { - type = types.str; - default = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"; - description = lib.mdDoc '' - Optional name identifier format. - ''; - }; - groupAttribute = mkOption { - type = types.str; - default = ""; - example = "memberOf"; - description = lib.mdDoc '' - Optional attribute name for group list. - ''; - }; - externalGroups = mkOption { - type = types.listOf types.str; - default = []; - example = [ "Temporary-staff" "External-users" ]; - description = lib.mdDoc '' - Excluded group names. - ''; - }; - requiredGroups = mkOption { - type = types.listOf types.str; - default = []; - example = [ "Hedgedoc-Users" ]; - description = lib.mdDoc '' - Required group names. - ''; - }; - providerName = mkOption { - type = types.str; - default = ""; - example = "My institution"; - description = lib.mdDoc '' - Optional name to be displayed at login form indicating the SAML provider. - ''; - }; - attribute = { - id = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Attribute map for `id`. - Defaults to `NameID` of SAML response. - ''; - }; - username = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Attribute map for `username`. - Defaults to `NameID` of SAML response. - ''; - }; - email = mkOption { - type = types.str; - default = ""; - description = lib.mdDoc '' - Attribute map for `email`. - Defaults to `NameID` of SAML response if - {option}`identifierFormat` has - the default value. - ''; - }; - }; - }; - }); - default = null; - description = lib.mdDoc "Configure the SAML integration."; - }; - }; in lib.mkOption { - type = lib.types.submodule { + settings = mkOption { + type = types.submodule { freeformType = settingsFormat.type; - inherit options; + options = { + domain = mkOption { + type = with types; nullOr str; + default = null; + example = "hedgedoc.org"; + description = mdDoc '' + Domain to use for website. + + This is useful if you are trying to run hedgedoc behind + a reverse proxy. + ''; + }; + urlPath = mkOption { + type = with types; nullOr str; + default = null; + example = "hedgedoc"; + description = mdDoc '' + URL path for the website. + + This is useful if you are hosting hedgedoc on a path like + `www.example.com/hedgedoc` + ''; + }; + host = mkOption { + type = with types; nullOr str; + default = "localhost"; + description = mdDoc '' + Address to listen on. + ''; + }; + port = mkOption { + type = types.port; + default = 3000; + example = 80; + description = mdDoc '' + Port to listen on. + ''; + }; + path = mkOption { + type = with types; nullOr path; + default = null; + example = "/run/hedgedoc/hedgedoc.sock"; + description = mdDoc '' + Path to UNIX domain socket to listen on + + ::: {.note} + If specified, {option}`host` and {option}`port` will be ignored. + ::: + ''; + }; + protocolUseSSL = mkOption { + type = types.bool; + default = false; + example = true; + description = mdDoc '' + Use `https://` for all links. + + This is useful if you are trying to run hedgedoc behind + a reverse proxy. + + ::: {.note} + Only applied if {option}`domain` is set. + ::: + ''; + }; + allowOrigin = mkOption { + type = with types; listOf str; + default = with cfg.settings; [ host ] ++ lib.optionals (domain != null) [ domain ]; + defaultText = literalExpression '' + with config.services.hedgedoc.settings; [ host ] ++ lib.optionals (domain != null) [ domain ] + ''; + example = [ "localhost" "hedgedoc.org" ]; + description = mdDoc '' + List of domains to whitelist. + ''; + }; + db = mkOption { + type = types.attrs; + default = { + dialect = "sqlite"; + storage = "/var/lib/${name}/db.sqlite"; + }; + defaultText = literalExpression '' + { + dialect = "sqlite"; + storage = "/var/lib/hedgedoc/db.sqlite"; + } + ''; + example = literalExpression '' + db = { + username = "hedgedoc"; + database = "hedgedoc"; + host = "localhost:5432"; + # or via socket + # host = "/run/postgresql"; + dialect = "postgresql"; + }; + ''; + description = mdDoc '' + Specify the configuration for sequelize. + HedgeDoc supports `mysql`, `postgres`, `sqlite` and `mssql`. + See + for more information. + + ::: {.note} + The relevant parts will be overriden if you set {option}`dbURL`. + ::: + ''; + }; + useSSL = mkOption { + type = types.bool; + default = false; + description = mdDoc '' + Enable to use SSL server. + + ::: {.note} + This will also enable {option}`protocolUseSSL`. + + It will also require you to set the following: + + - {option}`sslKeyPath` + - {option}`sslCertPath` + - {option}`sslCAPath` + - {option}`dhParamPath` + ::: + ''; + }; + uploadsPath = mkOption { + type = types.path; + default = "/var/lib/${name}/uploads"; + defaultText = "/var/lib/hedgedoc/uploads"; + description = mdDoc '' + Directory for storing uploaded images. + ''; + }; + + # Declared because we change the default to false. + allowGravatar = mkOption { + type = types.bool; + default = false; + example = true; + description = mdDoc '' + Whether to enable [Libravatar](https://wiki.libravatar.org/) as + profile picture source on your instance. + + Despite the naming of the setting, Hedgedoc replaced Gravatar + with Libravatar in [CodiMD 1.4.0](https://hedgedoc.org/releases/1.4.0/) + ''; + }; + }; }; - description = lib.mdDoc '' + + description = mdDoc '' HedgeDoc configuration, see for documentation. @@ -1003,7 +200,7 @@ in type = with types; nullOr path; default = null; example = "/var/lib/hedgedoc/hedgedoc.env"; - description = lib.mdDoc '' + description = mdDoc '' Environment file as defined in {manpage}`systemd.exec(5)`. Secrets may be passed to the service without adding them to the world-readable @@ -1028,44 +225,54 @@ in }; }; - config = mkIf cfg.enable { - assertions = [ - { assertion = cfg.settings.db == {} -> ( - cfg.settings.dbURL != "" && cfg.settings.dbURL != null - ); - message = "Database configuration for HedgeDoc missing."; } - ]; - users.groups.${name} = {}; + config = lib.mkIf cfg.enable { + users.groups.${name} = { }; users.users.${name} = { description = "HedgeDoc service user"; group = name; - extraGroups = cfg.groups; - home = cfg.workDir; - createHome = true; isSystemUser = true; }; + services.hedgedoc.settings = { + defaultNotePath = lib.mkDefault "${cfg.package}/public/default.md"; + docsPath = lib.mkDefault "${cfg.package}/public/docs"; + viewPath = lib.mkDefault "${cfg.package}/public/views"; + }; + systemd.services.hedgedoc = { description = "HedgeDoc Service"; + documentation = [ "https://docs.hedgedoc.org/" ]; wantedBy = [ "multi-user.target" ]; after = [ "networking.target" ]; - preStart = '' - ${pkgs.envsubst}/bin/envsubst \ - -o ${cfg.workDir}/config.json \ - -i ${prettyJSON cfg.settings} - mkdir -p ${cfg.settings.uploadsPath} - ''; + preStart = + let + configFile = settingsFormat.generate "hedgedoc-config.json" { + production = cfg.settings; + }; + in + '' + ${pkgs.envsubst}/bin/envsubst \ + -o /run/${name}/config.json \ + -i ${configFile} + ${pkgs.coreutils}/bin/mkdir -p ${cfg.settings.uploadsPath} + ''; serviceConfig = { - WorkingDirectory = cfg.workDir; - StateDirectory = [ cfg.workDir cfg.settings.uploadsPath ]; - ExecStart = "${lib.getExe cfg.package}"; - EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; + User = name; + Group = name; + + Restart = "always"; + ExecStart = "${cfg.package}/bin/hedgedoc"; + RuntimeDirectory = [ name ]; + StateDirectory = [ name ]; + WorkingDirectory = "/run/${name}"; + ReadWritePaths = [ + "-${cfg.settings.uploadsPath}" + ] ++ lib.optionals (cfg.settings.db ? "storage") [ "-${cfg.settings.db.storage}" ]; + EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; Environment = [ - "CMD_CONFIG_FILE=${cfg.workDir}/config.json" + "CMD_CONFIG_FILE=/run/${name}/config.json" "NODE_ENV=production" ]; - Restart = "always"; - User = name; PrivateTmp = true; }; }; diff --git a/nixos/tests/hedgedoc.nix b/nixos/tests/hedgedoc.nix index 410350d83627..16e0dc14e947 100644 --- a/nixos/tests/hedgedoc.nix +++ b/nixos/tests/hedgedoc.nix @@ -8,20 +8,22 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: nodes = { hedgedocSqlite = { ... }: { - services = { - hedgedoc = { - enable = true; - settings.dbURL = "sqlite:///var/lib/hedgedoc/hedgedoc.db"; - }; - }; + services.hedgedoc.enable = true; }; - hedgedocPostgres = { ... }: { + hedgedocPostgresWithTCPSocket = { ... }: { systemd.services.hedgedoc.after = [ "postgresql.service" ]; services = { hedgedoc = { enable = true; - settings.dbURL = "postgres://hedgedoc:\${DB_PASSWORD}@localhost:5432/hedgedocdb"; + settings.db = { + dialect = "postgres"; + user = "hedgedoc"; + password = "$DB_PASSWORD"; + host = "localhost"; + port = 5432; + database = "hedgedocdb"; + }; /* * Do not use pkgs.writeText for secrets as @@ -40,6 +42,33 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: }; }; }; + + hedgedocPostgresWithUNIXSocket = { ... }: { + systemd.services.hedgedoc.after = [ "postgresql.service" ]; + services = { + hedgedoc = { + enable = true; + settings.db = { + dialect = "postgres"; + user = "hedgedoc"; + password = "$DB_PASSWORD"; + host = "/run/postgresql"; + database = "hedgedocdb"; + }; + + environmentFile = pkgs.writeText "hedgedoc-env" '' + DB_PASSWORD=snakeoilpassword + ''; + }; + postgresql = { + enable = true; + initialScript = pkgs.writeText "pg-init-script.sql" '' + CREATE ROLE hedgedoc LOGIN PASSWORD 'snakeoilpassword'; + CREATE DATABASE hedgedocdb OWNER hedgedoc; + ''; + }; + }; + }; }; testScript = '' @@ -50,11 +79,18 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: hedgedocSqlite.wait_for_open_port(3000) hedgedocSqlite.wait_until_succeeds("curl -sSf http://localhost:3000/new") - with subtest("HedgeDoc postgres"): - hedgedocPostgres.wait_for_unit("postgresql.service") - hedgedocPostgres.wait_for_unit("hedgedoc.service") - hedgedocPostgres.wait_for_open_port(5432) - hedgedocPostgres.wait_for_open_port(3000) - hedgedocPostgres.wait_until_succeeds("curl -sSf http://localhost:3000/new") + with subtest("HedgeDoc postgres with TCP socket"): + hedgedocPostgresWithTCPSocket.wait_for_unit("postgresql.service") + hedgedocPostgresWithTCPSocket.wait_for_unit("hedgedoc.service") + hedgedocPostgresWithTCPSocket.wait_for_open_port(5432) + hedgedocPostgresWithTCPSocket.wait_for_open_port(3000) + hedgedocPostgresWithTCPSocket.wait_until_succeeds("curl -sSf http://localhost:3000/new") + + with subtest("HedgeDoc postgres with UNIX socket"): + hedgedocPostgresWithUNIXSocket.wait_for_unit("postgresql.service") + hedgedocPostgresWithUNIXSocket.wait_for_unit("hedgedoc.service") + hedgedocPostgresWithUNIXSocket.wait_for_open_port(5432) + hedgedocPostgresWithUNIXSocket.wait_for_open_port(3000) + hedgedocPostgresWithUNIXSocket.wait_until_succeeds("curl -sSf http://localhost:3000/new") ''; }) From 2e22b70d8dfe5571fdbeac217d51122230c2587a Mon Sep 17 00:00:00 2001 From: Madoura Date: Thu, 12 Oct 2023 05:04:58 -0500 Subject: [PATCH 029/216] python3Packages.desktop-entry-lib: init at 3.1 --- .../desktop-entry-lib/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/desktop-entry-lib/default.nix diff --git a/pkgs/development/python-modules/desktop-entry-lib/default.nix b/pkgs/development/python-modules/desktop-entry-lib/default.nix new file mode 100644 index 000000000000..5a6d3c00e7f0 --- /dev/null +++ b/pkgs/development/python-modules/desktop-entry-lib/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, fetchFromGitea +, setuptools +}: + +buildPythonPackage rec { + pname = "desktop-entry-lib"; + version = "3.1"; + pyproject = true; + disabled = pythonOlder "3.9"; + + # We could use fetchPypi, but then the tests won't run + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "JakobDev"; + repo = pname; + rev = version; + hash = "sha256-+c+FuLv88wc4yVw3iyFFtfbocnWzTCIe2DS0SWoj+VI="; + }; + + nativeBuildInputs = [ setuptools ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "desktop_entry_lib" ]; + + meta = with lib; { + description = "Allows reading and writing .desktop files according to the Desktop Entry Specification"; + homepage = "https://codeberg.org/JakobDev/desktop-entry-lib"; + changelog = "https://codeberg.org/JakobDev/desktop-entry-lib/releases/tag/${version}"; + license = licenses.bsd2; + maintainers = with maintainers; [ Madouura ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 831ae4d39def..fd3f6303c242 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2717,6 +2717,8 @@ self: super: with self; { derpconf = callPackage ../development/python-modules/derpconf { }; + desktop-entry-lib = callPackage ../development/python-modules/desktop-entry-lib { }; + desktop-notifier = callPackage ../development/python-modules/desktop-notifier { }; detect-secrets = callPackage ../development/python-modules/detect-secrets { }; From 9478a7ef8220b0a74dffcca2bdd46c10ae93fd59 Mon Sep 17 00:00:00 2001 From: traxys Date: Sat, 22 Apr 2023 23:57:57 +0200 Subject: [PATCH 030/216] fit-trackee: init at 0.7.15 --- .../geospatial/fit-trackee/default.nix | 105 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 107 insertions(+) create mode 100644 pkgs/servers/geospatial/fit-trackee/default.nix diff --git a/pkgs/servers/geospatial/fit-trackee/default.nix b/pkgs/servers/geospatial/fit-trackee/default.nix new file mode 100644 index 000000000000..c7bc7fbc2e5b --- /dev/null +++ b/pkgs/servers/geospatial/fit-trackee/default.nix @@ -0,0 +1,105 @@ +{ lib +, python3 +, fetchFromGitHub +, fetchPypi +, postgresql +, postgresqlTestHook +}: +let + python = python3.override { + packageOverrides = self: super: { + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "1.4.49"; + src = fetchPypi { + pname = "SQLAlchemy"; + inherit version; + hash = "sha256-Bv8ly64ww5bEt3N0ZPKn/Deme32kCZk7GCsCTOyArtk="; + }; + # Remove "test/typing" that does not exist + disabledTestPaths = [ + "test/aaa_profiling" + "test/ext/mypy" + ]; + }); + }; + }; + +in +python.pkgs.buildPythonApplication rec { + pname = "fit-trackee"; + version = "0.7.22"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "SamR1"; + repo = "FitTrackee"; + rev = "v${version}"; + hash = "sha256-aPQ8jLssN9nx0Bpd/44E3sQi2w0cR8ecG76DJjreeHA="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace psycopg2-binary psycopg2 \ + --replace 'poetry>=0.12' 'poetry-core' \ + --replace 'poetry.masonry.api' 'poetry.core.masonry.api' + ''; + + nativeBuildInputs = [ + python3.pkgs.poetry-core + ]; + + propagatedBuildInputs = with python.pkgs; [ + authlib + babel + dramatiq + flask + flask-bcrypt + flask-dramatiq + flask-limiter + flask-migrate + gpxpy + gunicorn + humanize + psycopg2 + pyjwt + pyopenssl + pytz + shortuuid + sqlalchemy + staticmap + ua-parser + ] ++ dramatiq.optional-dependencies.redis; + + pythonImportsCheck = [ "fittrackee" ]; + + nativeCheckInputs = with python.pkgs; [ + pytestCheckHook + freezegun + postgresqlTestHook + postgresql + ]; + + pytestFlagsArray = [ + "fittrackee" + ]; + + postgresqlTestSetupPost = '' + export DATABASE_TEST_URL=postgresql://$PGUSER/$PGDATABAS?host=$PGHOST + ''; + + postInstall = '' + mkdir -p $out/var/share/fittrackee-instance + ''; + + preCheck = '' + export TMP=$(mktemp -d) + ''; + + meta = with lib; { + description = "Self-hosted outdoor activity tracker :bicyclist"; + homepage = "https://github.com/SamR1/FitTrackee"; + changelog = "https://github.com/SamR1/FitTrackee/blob/${src.rev}/CHANGELOG.md"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ traxys ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 358d79cc695e..a5f1109b4ee7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27708,6 +27708,8 @@ with pkgs; ### SERVERS / GEOSPATIAL + fit-trackee = callPackage ../servers/geospatial/fit-trackee { }; + geoserver = callPackage ../servers/geospatial/geoserver { }; mapcache = callPackage ../servers/geospatial/mapcache { }; From d894a80537fac33cd2e4cf80dd6902e6e3cf8d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sun, 15 Oct 2023 17:27:46 +0200 Subject: [PATCH 031/216] cpufrequtils: add mainProgram `cpufreq-set` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/os-specific/linux/cpufrequtils/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/cpufrequtils/default.nix b/pkgs/os-specific/linux/cpufrequtils/default.nix index d64996c4961e..2bccf5a10020 100644 --- a/pkgs/os-specific/linux/cpufrequtils/default.nix +++ b/pkgs/os-specific/linux/cpufrequtils/default.nix @@ -27,5 +27,6 @@ stdenv.mkDerivation rec { homepage = "http://ftp.be.debian.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html"; license = licenses.gpl2Only; platforms = [ "x86_64-linux" ]; + mainProgram = "cpufreq-set"; }; } From 38cae8b359c44d9e38d3c294f1975d4bf2c8e698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sun, 15 Oct 2023 17:29:03 +0200 Subject: [PATCH 032/216] cpufrequtils: change sha256 hash to sri form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- pkgs/os-specific/linux/cpufrequtils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/cpufrequtils/default.nix b/pkgs/os-specific/linux/cpufrequtils/default.nix index 2bccf5a10020..f62d8463714e 100644 --- a/pkgs/os-specific/linux/cpufrequtils/default.nix +++ b/pkgs/os-specific/linux/cpufrequtils/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://ftp.be.debian.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-${version}.tar.gz"; - sha256 = "127i38d4w1hv2dzdy756gmbhq25q3k34nqb2s0xlhsfhhdqs0lq0"; + hash = "sha256-AFOgcYPQaUg70GJhS8YcuAgMV32mHN9+ExsGThoa8Yg="; }; patches = [ From a9f4d2dd95514d0a05b8d70e062eac8d82d50eb7 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 16 Oct 2023 04:20:00 +0000 Subject: [PATCH 033/216] pgbouncer: 1.20.1 -> 1.21.0 Changelog: https://github.com/pgbouncer/pgbouncer/releases/tag/pgbouncer_1_21_0 --- pkgs/servers/sql/pgbouncer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/pgbouncer/default.nix b/pkgs/servers/sql/pgbouncer/default.nix index b0f2bcb61626..7f6cfa0f898a 100644 --- a/pkgs/servers/sql/pgbouncer/default.nix +++ b/pkgs/servers/sql/pgbouncer/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "pgbouncer"; - version = "1.20.1"; + version = "1.21.0"; src = fetchurl { url = "https://www.pgbouncer.org/downloads/files/${version}/${pname}-${version}.tar.gz"; - hash = "sha256-JJks9VfXNCbXBIaY3/x7AZ5jZNTYdXriz14kcShqIIg="; + hash = "sha256-fh3WIMjYWoSQr/JQYdUFXXrvnPPov+LZ53GbjuWRFOI="; }; nativeBuildInputs = [ pkg-config ]; From 3ece074bf4828ed1985b881c59c0ff240d7172fb Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 16 Oct 2023 15:22:33 +0900 Subject: [PATCH 034/216] python311Packages.opsdroid-get-image-size: rename from opsdroid_get_image_size --- pkgs/applications/networking/opsdroid/default.nix | 2 +- .../default.nix | 5 +++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) rename pkgs/development/python-modules/{opsdroid_get_image_size => opsdroid-get-image-size}/default.nix (84%) diff --git a/pkgs/applications/networking/opsdroid/default.nix b/pkgs/applications/networking/opsdroid/default.nix index 4398c771e535..d4f2a9b26a18 100644 --- a/pkgs/applications/networking/opsdroid/default.nix +++ b/pkgs/applications/networking/opsdroid/default.nix @@ -17,7 +17,7 @@ python3Packages.buildPythonPackage rec { doCheck = false; propagatedBuildInputs = with python3Packages; [ - click babel opsdroid_get_image_size slackclient webexteamssdk bleach + click babel opsdroid-get-image-size slackclient webexteamssdk bleach parse emoji puremagic yamale nbformat websockets pycron nbconvert aiohttp matrix-api-async aioredis aiosqlite arrow pyyaml motor regex mattermostdriver setuptools voluptuous ibm-watson tailer multidict diff --git a/pkgs/development/python-modules/opsdroid_get_image_size/default.nix b/pkgs/development/python-modules/opsdroid-get-image-size/default.nix similarity index 84% rename from pkgs/development/python-modules/opsdroid_get_image_size/default.nix rename to pkgs/development/python-modules/opsdroid-get-image-size/default.nix index 0f33da44145f..c88ce6928b09 100644 --- a/pkgs/development/python-modules/opsdroid_get_image_size/default.nix +++ b/pkgs/development/python-modules/opsdroid-get-image-size/default.nix @@ -2,11 +2,12 @@ }: buildPythonPackage rec { - pname = "opsdroid_get_image_size"; + pname = "opsdroid-get-image-size"; version = "0.2.2"; src = fetchPypi { - inherit pname version; + pname = "opsdroid_get_image_size"; + inherit version; sha256 = "124j2xvfxv09q42qfb8nqlcn55y7f09iayrix3yfyrs2qyzav78a"; }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 94eeeb99eb80..25fe57b77600 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -241,6 +241,7 @@ mapAliases ({ notifymuch = throw "notifymuch has been promoted to a top-level attribute"; # added 2022-10-02 Nuitka = nuitka; # added 2023-02-19 ntlm-auth = throw "ntlm-auth has been removed, because it relies on the md4 implementation provided by openssl. Use pyspnego instead."; + opsdroid_get_image_size = opsdroid-get-image-size; # added 2023-10-16 ordereddict = throw "ordereddict has been removed because it is only useful on unsupported python versions."; # added 2022-05-28 pafy = throw "pafy has been removed because it is unmaintained and only a dependency of mps-youtube, itself superseded by yewtube"; # Added 2023-01-19 pam = python-pam; # added 2020-09-07. diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a3b1b0383365..e068e0a98581 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8502,7 +8502,7 @@ self: super: with self; { opower = callPackage ../development/python-modules/opower { }; - opsdroid_get_image_size = callPackage ../development/python-modules/opsdroid_get_image_size { }; + opsdroid-get-image-size = callPackage ../development/python-modules/opsdroid-get-image-size { }; opt-einsum = callPackage ../development/python-modules/opt-einsum { }; From b5a169004012af311ac4783439028feb7469e880 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 16 Oct 2023 15:28:18 +0900 Subject: [PATCH 035/216] python311Packages.opsdroid-get-image-size: refactor --- .../opsdroid-get-image-size/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/opsdroid-get-image-size/default.nix b/pkgs/development/python-modules/opsdroid-get-image-size/default.nix index c88ce6928b09..edd09d2750e2 100644 --- a/pkgs/development/python-modules/opsdroid-get-image-size/default.nix +++ b/pkgs/development/python-modules/opsdroid-get-image-size/default.nix @@ -1,16 +1,24 @@ -{ lib, buildPythonPackage, fetchPypi +{ lib +, buildPythonPackage +, fetchPypi +, setuptools }: buildPythonPackage rec { pname = "opsdroid-get-image-size"; version = "0.2.2"; + pyproject = true; src = fetchPypi { pname = "opsdroid_get_image_size"; inherit version; - sha256 = "124j2xvfxv09q42qfb8nqlcn55y7f09iayrix3yfyrs2qyzav78a"; + hash = "sha256-Cp2tvsdCZ+/86DF7FRNwx5diGcUWLYcFwQns7nYXkog="; }; + nativeBuildInputs = [ + setuptools + ]; + # test data not included on pypi doCheck = false; From 447551520b31cf28738cfaa927f31d73530cdbeb Mon Sep 17 00:00:00 2001 From: Madoura Date: Mon, 16 Oct 2023 08:34:02 -0500 Subject: [PATCH 036/216] kokkos: init at 4.1.00 --- pkgs/by-name/ko/kokkos/package.nix | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/ko/kokkos/package.nix diff --git a/pkgs/by-name/ko/kokkos/package.nix b/pkgs/by-name/ko/kokkos/package.nix new file mode 100644 index 000000000000..b6578f4a020f --- /dev/null +++ b/pkgs/by-name/ko/kokkos/package.nix @@ -0,0 +1,44 @@ +{ lib +, stdenv +, fetchFromGitHub +, gitUpdater +, cmake +, python3 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "kokkos"; + version = "4.1.00"; + + src = fetchFromGitHub { + owner = "kokkos"; + repo = "kokkos"; + rev = finalAttrs.version; + hash = "sha256-bPgXn1Lv+EiiKEHgTVhRFhcELUnZCphaXDlrTYq6cpY="; + }; + + nativeBuildInputs = [ + cmake + python3 + ]; + + cmakeFlags = [ + (lib.cmakeBool "Kokkos_ENABLE_TESTS" true) + ]; + + postPatch = '' + patchShebangs . + ''; + + doCheck = true; + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + description = "C++ Performance Portability Programming EcoSystem"; + homepage = "https://github.com/kokkos/kokkos"; + license = with licenses; [ asl20-llvm ]; + maintainers = with maintainers; [ Madouura ]; + platforms = platforms.unix; + broken = stdenv.isDarwin; + }; +}) From a70a3e61d77e64233b12e6ed678fbdf4b694c262 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 22 Jul 2023 23:47:26 +0200 Subject: [PATCH 037/216] nixos/hedgedoc: harden systemd unit --- nixos/modules/services/web-apps/hedgedoc.nix | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index 2cc732636e6d..3ad60678647d 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -273,7 +273,46 @@ in "CMD_CONFIG_FILE=/run/${name}/config.json" "NODE_ENV=production" ]; + + # Hardening + AmbientCapabilities = ""; + CapabilityBoundingSet = ""; + LockPersonality = true; + NoNewPrivileges = true; + PrivateDevices = true; + PrivateMounts = true; PrivateTmp = true; + PrivateUsers = true; + ProcSubset = "pid"; + ProtectClock = true; + ProtectControlGroups = true; + ProtectHome = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectProc = "invisible"; + ProtectSystem = "strict"; + RemoveIPC = true; + RestrictAddressFamilies = [ + "AF_INET" + "AF_INET6" + # Required for connecting to database sockets, + # and listening to unix socket at `cfg.settings.path` + "AF_UNIX" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + SocketBindAllow = lib.mkIf (cfg.settings.path == null) cfg.settings.port; + SocketBindDeny = "any"; + SystemCallArchitectures = "native"; + SystemCallFilter = [ + "@system-service" + "~@privileged @obsolete" + "@pkey" + ]; + UMask = "0007"; }; }; }; From abe468822f042f8d1b71beddbdc520601e32f7b6 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 22 Jul 2023 23:53:37 +0200 Subject: [PATCH 038/216] nixos/hedgedoc: add SuperSandro2000 and h7x4 as maintainer --- nixos/modules/services/web-apps/hedgedoc.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index 3ad60678647d..1a66f077b09d 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -17,6 +17,8 @@ let settingsFormat = pkgs.formats.json { }; in { + meta.maintainers = with lib.maintainers; [ SuperSandro2000 h7x4 ]; + imports = [ (lib.mkRenamedOptionModule [ "services" "codimd" ] [ "services" "hedgedoc" ]) (lib.mkRenamedOptionModule [ "services" "hedgedoc" "configuration" ] [ "services" "hedgedoc" "settings" ]) From d479580285ed54b392f718c23a2d0cbfd303b62b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 16 Oct 2023 16:20:00 -0500 Subject: [PATCH 039/216] nodejs_21: init at 21.0.0 Changelog: https://github.com/nodejs/node/releases/tag/v21.0.0 --- pkgs/development/web/nodejs/v21.nix | 19 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 10 +++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/web/nodejs/v21.nix diff --git a/pkgs/development/web/nodejs/v21.nix b/pkgs/development/web/nodejs/v21.nix new file mode 100644 index 000000000000..6d59e20dfa5f --- /dev/null +++ b/pkgs/development/web/nodejs/v21.nix @@ -0,0 +1,19 @@ +{ callPackage, openssl, python3, enableNpm ? true }: + +let + buildNodejs = callPackage ./nodejs.nix { + inherit openssl; + python = python3; + }; +in +buildNodejs { + inherit enableNpm; + version = "21.0.0"; + sha256 = "sha256-vFYZK5Ua0YNQbcqaz3pNDAJZEUC3/I8lZhN1GZJm8/I="; + patches = [ + ./revert-arm64-pointer-auth.patch + ./disable-darwin-v8-system-instrumentation-node19.patch + ./bypass-darwin-xcrun-node16.patch + ./node-npm-build-npm-package-logic.patch + ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6f366214a0b..20afeb85a606 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10295,10 +10295,14 @@ with pkgs; nodejs-slim_20 = callPackage ../development/web/nodejs/v20.nix { enableNpm = false; }; corepack_20 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_20; }); + nodejs_21 = callPackage ../development/web/nodejs/v21.nix { }; + nodejs-slim_21 = callPackage ../development/web/nodejs/v21.nix { enableNpm = false; }; + corepack_21 = hiPrio (callPackage ../development/web/nodejs/corepack.nix { nodejs = nodejs_21; }); + # Update this when adding the newest nodejs major version! - nodejs_latest = nodejs_20; - nodejs-slim_latest = nodejs-slim_20; - corepack_latest = hiPrio corepack_20; + nodejs_latest = nodejs_21; + nodejs-slim_latest = nodejs-slim_21; + corepack_latest = hiPrio corepack_21; buildNpmPackage = callPackage ../build-support/node/build-npm-package { }; From bc53cc867a7a24ddb1f0fd925f40f37ff56c8f23 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 17 Oct 2023 18:06:43 +0900 Subject: [PATCH 040/216] python311Packages.optuna: 3.3.0 -> 3.4.0 Diff: https://github.com/optuna/optuna/compare/refs/tags/v3.3.0...v3.4.0 Changelog: https://github.com/optuna/optuna/releases/tag/refs/tags/v3.4.0 --- pkgs/development/python-modules/optuna/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/optuna/default.nix b/pkgs/development/python-modules/optuna/default.nix index f3b41af02096..7a3b3cca06b0 100644 --- a/pkgs/development/python-modules/optuna/default.nix +++ b/pkgs/development/python-modules/optuna/default.nix @@ -13,6 +13,7 @@ , distributed , fakeredis , fastai +, google-cloud-storage , lightgbm , matplotlib , mlflow @@ -43,7 +44,7 @@ buildPythonPackage rec { pname = "optuna"; - version = "3.3.0"; + version = "3.4.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -52,7 +53,7 @@ buildPythonPackage rec { owner = "optuna"; repo = "optuna"; rev = "refs/tags/v${version}"; - hash = "sha256-uHv8uEJOQO1+AeNSxBtnCt6gDQHLT1RToF4hfolVVX0="; + hash = "sha256-WUjO13NxX0FneOPS4nn6aHq48X95r+GJR/Oxir6n8Pk="; }; nativeBuildInputs = [ @@ -62,7 +63,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ alembic - cmaes colorlog numpy packaging @@ -96,6 +96,8 @@ buildPythonPackage rec { optional = [ boto3 botorch + cmaes + google-cloud-storage matplotlib pandas plotly From 06752bb288d022e03af201077aab8a76de1eed99 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 17 Oct 2023 21:46:45 +0000 Subject: [PATCH 041/216] python311Packages.rtree: 1.0.1 -> 1.1.0 --- pkgs/development/python-modules/rtree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rtree/default.nix b/pkgs/development/python-modules/rtree/default.nix index 7d4e14196314..0de516ec85f0 100644 --- a/pkgs/development/python-modules/rtree/default.nix +++ b/pkgs/development/python-modules/rtree/default.nix @@ -10,13 +10,13 @@ buildPythonPackage rec { pname = "rtree"; - version = "1.0.1"; + version = "1.1.0"; disabled = pythonOlder "3.7"; src = fetchPypi { pname = "Rtree"; inherit version; - hash = "sha256-IiEhaZwwOmQGXYSb9wOLHsq8N7Zcf6NAvts47w6AVCk="; + hash = "sha256-b47lBN3l0AWyWwiq9b4LNASvOtX+zm4d3N41kIp5ipU="; }; postPatch = '' From 9887a4e63091505a6f0f8f064462cc6a598cb263 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 18 Oct 2023 12:40:28 +0000 Subject: [PATCH 042/216] python311Packages.logilab-common: 1.10.0 -> 1.11.0 --- pkgs/development/python-modules/logilab/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/logilab/common.nix b/pkgs/development/python-modules/logilab/common.nix index 9467f003c703..b03fd98eefe8 100644 --- a/pkgs/development/python-modules/logilab/common.nix +++ b/pkgs/development/python-modules/logilab/common.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "logilab-common"; - version = "1.10.0"; + version = "1.11.0"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-MoXt3tta5OimJUjOkWSMDCmXV0aS8N0W5bcANwAelYY="; + hash = "sha256-lWl6654nbOBCec24iJ7GGKEcYy/gYDn9wMil3PPqWkk="; }; nativeBuildInputs = [ From dc4d0c3c2a4fa933805c92358d185a5cb1aee34d Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Wed, 18 Oct 2023 22:22:22 +0530 Subject: [PATCH 043/216] redis: 7.2.1 -> 7.2.2 Changelog: https://github.com/redis/redis/raw/7.2.2/00-RELEASENOTES --- pkgs/servers/nosql/redis/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 25d889694504..b1f3bb7adcc3 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -12,11 +12,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "redis"; - version = "7.2.1"; + version = "7.2.2"; src = fetchurl { url = "https://download.redis.io/releases/redis-${finalAttrs.version}.tar.gz"; - hash = "sha256-XHbZkKGxxflJvNHu2Q0Mik9wNpvb3LQCiMVh3fiJZ6Q="; + hash = "sha256-ypmb4IgA7cbSZTecTHqvrZLw7kAGkuTi1pgpq0tMPQg="; }; patches = lib.optionals useSystemJemalloc [ From 71c1dba86da87fccc2837ce32c5d87813d23f0be Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 18 Oct 2023 20:23:41 +0200 Subject: [PATCH 044/216] wdisplays: unstable-2021-04-03 -> 1.1.1 ChangeLogs: * https://github.com/artizirk/wdisplays/releases/tag/1.1 * https://github.com/artizirk/wdisplays/releases/tag/1.1.1 The original repo re-appeared now[1], but I have zero reason to trust them to not delete it any time again. The fork I switched to after it disappeared back in 2021 was marked as archived a while later. The one that people contribute to and is also used by Fedora[2] and AUR[3] is artizirk/wdisplays which is used now. [1] https://github.com/cyclopsian/wdisplays [2] https://src.fedoraproject.org/rpms/wdisplays/blob/f09a1e35d560de153b1bc0939382c37e863e7137/f/wdisplays.spec [3] https://aur.archlinux.org/packages/wdisplays --- pkgs/tools/graphics/wdisplays/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/graphics/wdisplays/default.nix b/pkgs/tools/graphics/wdisplays/default.nix index b05aa13ea601..9c7093b58f85 100644 --- a/pkgs/tools/graphics/wdisplays/default.nix +++ b/pkgs/tools/graphics/wdisplays/default.nix @@ -1,24 +1,20 @@ { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, gtk3, libepoxy, wayland, wrapGAppsHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "wdisplays"; - version = "unstable-2021-04-03"; + version = "1.1.1"; nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ]; buildInputs = [ gtk3 libepoxy wayland ]; src = fetchFromGitHub { - owner = "luispabon"; + owner = "artizirk"; repo = "wdisplays"; - rev = "7f2eac0d2aa81b5f495da7950fd5a94683f7868e"; - sha256 = "sha256-cOF3+T34zPro58maWUouGG+vlLm2C5NfcH7PZhSvApE="; + rev = finalAttrs.version; + sha256 = "sha256-dtvP930ChiDRT60xq6xBDU6k+zHnkrAkxkKz2FxlzRs="; }; - patchPhase = '' - substituteInPlace ./resources/wdisplays.desktop.in --replace "@app_id@" "wdisplays" - ''; - meta = with lib; { description = "A graphical application for configuring displays in Wayland compositors"; homepage = "https://github.com/luispabon/wdisplays"; @@ -27,4 +23,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; mainProgram = "wdisplays"; }; -} +}) From cce349c3fa5b64391cb5a59503515b45fc004cb1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 18 Oct 2023 19:26:33 +0000 Subject: [PATCH 045/216] remind: 04.02.05 -> 04.02.07 --- pkgs/tools/misc/remind/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/remind/default.nix b/pkgs/tools/misc/remind/default.nix index 945e592e848a..97aefe1f8e5c 100644 --- a/pkgs/tools/misc/remind/default.nix +++ b/pkgs/tools/misc/remind/default.nix @@ -15,11 +15,11 @@ let in tcl.mkTclDerivation rec { pname = "remind"; - version = "04.02.05"; + version = "04.02.07"; src = fetchurl { url = "https://dianne.skoll.ca/projects/remind/download/remind-${version}.tar.gz"; - sha256 = "sha256-nOEFhVwZvgUod+j/5ifllFgTS7I8+hOAeMSDlRH4+Ag="; + sha256 = "sha256-A+EtkNmQOcz3Mb4q7qQGNL6pyCnRus4nqNor485tsZA="; }; propagatedBuildInputs = tclLibraries; From 99b58813ea9e1aa7520c1dd762a6fed9e72d56ce Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 02:17:16 +0000 Subject: [PATCH 046/216] rsbkb: 1.2 -> 1.2.1 --- pkgs/tools/text/rsbkb/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/rsbkb/default.nix b/pkgs/tools/text/rsbkb/default.nix index fd02babac0b0..1510a63b050f 100644 --- a/pkgs/tools/text/rsbkb/default.nix +++ b/pkgs/tools/text/rsbkb/default.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "rsbkb"; - version = "1.2"; + version = "1.2.1"; src = fetchFromGitHub { owner = "trou"; repo = "rsbkb"; rev = "release-${version}"; - hash = "sha256-Y6YTjEbefNUPcl6rNYWVZLGZYTUPr5pvfLabS+zDWqA="; + hash = "sha256-+plf7BoYpEFPRsGKNrvLF8TAU3Z7nyx6Td6uRBoNGiE="; }; - cargoHash = "sha256-RMX+ZdPaqtqRJvhHFJJrPZnBGwQwZSCXNg1oNo+v2+8="; + cargoHash = "sha256-HyosR/5tZCRU2CNnnGITEuESW30Zq3s33UFNcLmEWIA="; # Setup symlinks for all the utilities, # busybox style From 6da0ccfd1f67aa386bb759c7b0d051678236dfb9 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 18 Oct 2023 22:55:28 -0500 Subject: [PATCH 047/216] dooit: 2.0.1 -> 2.0.2 --- pkgs/tools/misc/dooit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/dooit/default.nix b/pkgs/tools/misc/dooit/default.nix index ab7db4a2cb7c..50e66b882530 100644 --- a/pkgs/tools/misc/dooit/default.nix +++ b/pkgs/tools/misc/dooit/default.nix @@ -7,14 +7,14 @@ python3.pkgs.buildPythonApplication rec { pname = "dooit"; - version = "2.0.1"; + version = "2.0.2"; format = "pyproject"; src = fetchFromGitHub { owner = "kraanzu"; repo = "dooit"; rev = "v${version}"; - hash = "sha256-iQAGD6zrBBd4fJONaB7to1OJpAJUO0zeA1xhVQZBkMc="; + hash = "sha256-9Cyt38/tg611t/uODQjVAS/Ea2tUWTBmDqJehUpZJmU="; }; nativeBuildInputs = with python3.pkgs; [ From e55fb26e217fc8bd4a8896a093063216e61c561d Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 18 Oct 2023 23:36:03 -0500 Subject: [PATCH 048/216] dooit: 2.0.2 -> 2.1.0 --- pkgs/tools/misc/dooit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/dooit/default.nix b/pkgs/tools/misc/dooit/default.nix index 50e66b882530..b8aa6c8809ff 100644 --- a/pkgs/tools/misc/dooit/default.nix +++ b/pkgs/tools/misc/dooit/default.nix @@ -7,14 +7,14 @@ python3.pkgs.buildPythonApplication rec { pname = "dooit"; - version = "2.0.2"; + version = "2.1.0"; format = "pyproject"; src = fetchFromGitHub { owner = "kraanzu"; repo = "dooit"; rev = "v${version}"; - hash = "sha256-9Cyt38/tg611t/uODQjVAS/Ea2tUWTBmDqJehUpZJmU="; + hash = "sha256-ZCEBpaQHaFb09MUlN6acYB3LrfX456uRbhVh9YPz7NU="; }; nativeBuildInputs = with python3.pkgs; [ From 648bef4bc6f3425243e0749c696d8f21cf170c8f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 19 Oct 2023 07:01:36 +0200 Subject: [PATCH 049/216] =?UTF-8?q?cgal=5F5:=205.5.2=20=E2=86=92=205.5.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/CGAL/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/CGAL/default.nix b/pkgs/development/libraries/CGAL/default.nix index 9d9233aad20e..672facdc230c 100644 --- a/pkgs/development/libraries/CGAL/default.nix +++ b/pkgs/development/libraries/CGAL/default.nix @@ -1,5 +1,5 @@ { lib, stdenv -, fetchFromGitHub +, fetchurl , cmake , boost , gmp @@ -8,13 +8,11 @@ stdenv.mkDerivation rec { pname = "cgal"; - version = "5.5.2"; + version = "5.5.3"; - src = fetchFromGitHub { - owner = "CGAL"; - repo = "releases"; - rev = "CGAL-${version}"; - sha256 = "sha256-olMPT/8Q0bf+rooJoNc0k8NrO//O7z0yqBoP8KX39yQ="; + src = fetchurl { + url = "https://github.com/CGAL/cgal/releases/download/v${version}/CGAL-${version}.tar.xz"; + hash = "sha256-CgT2YmkyVjKLBbq/q7XjpbfbL1pY1S48Ug350IKN3XM="; }; # note: optional component libCGAL_ImageIO would need zlib and opengl; From 97e3336a5b3690c915981f3cfad34d1c9061eb5d Mon Sep 17 00:00:00 2001 From: r-vdp Date: Thu, 19 Oct 2023 08:40:56 +0200 Subject: [PATCH 050/216] fish: use the subcommand style for the status command The flag style has been deprecated and will eventually be removed. --- nixos/modules/programs/fish.nix | 4 ++-- pkgs/shells/fish/default.nix | 2 +- pkgs/shells/fish/wrapper.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix index b500b8f24b2c..e6ac6e9957ba 100644 --- a/nixos/modules/programs/fish.nix +++ b/nixos/modules/programs/fish.nix @@ -208,7 +208,7 @@ in end # if we haven't sourced the login config, do it - status --is-login; and not set -q __fish_nixos_login_config_sourced + status is-login; and not set -q __fish_nixos_login_config_sourced and begin ${sourceEnv "loginShellInit"} @@ -220,7 +220,7 @@ in end # if we haven't sourced the interactive config, do it - status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced + status is-interactive; and not set -q __fish_nixos_interactive_config_sourced and begin ${fishAbbrs} ${fishAliases} diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 4df95a9ca6fe..bd816f9a8991 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -79,7 +79,7 @@ let # note that this is required: # 1. For all shells, not just login shells (mosh needs this as do some other command-line utilities) # 2. Before the shell is initialized, so that config snippets can find the commands they use on the PATH - builtin status --is-login + builtin status is-login or test -z "$__fish_nixos_env_preinit_sourced" -a -z "$ETC_PROFILE_SOURCED" -a -z "$ETC_ZSHENV_SOURCED" ${if fishEnvPreInit != null then '' and begin diff --git a/pkgs/shells/fish/wrapper.nix b/pkgs/shells/fish/wrapper.nix index 75213809821f..62ae03ec9ef9 100644 --- a/pkgs/shells/fish/wrapper.nix +++ b/pkgs/shells/fish/wrapper.nix @@ -18,7 +18,7 @@ let name = "wrapfish.aliases.fish"; destination = "/share/fish/vendor_conf.d/aliases.fish"; text = '' - status --is-interactive; and begin + status is-interactive; and begin # Aliases ${aliasesStr} end From fe01240ca329f41d5a739f83430c52c12aa40da1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 06:41:01 +0000 Subject: [PATCH 051/216] kaniko: 1.16.0 -> 1.17.0 --- pkgs/applications/networking/cluster/kaniko/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/kaniko/default.nix b/pkgs/applications/networking/cluster/kaniko/default.nix index 7639c95a971f..13ccf5599ce7 100644 --- a/pkgs/applications/networking/cluster/kaniko/default.nix +++ b/pkgs/applications/networking/cluster/kaniko/default.nix @@ -9,13 +9,13 @@ buildGoModule rec { pname = "kaniko"; - version = "1.16.0"; + version = "1.17.0"; src = fetchFromGitHub { owner = "GoogleContainerTools"; repo = "kaniko"; rev = "v${version}"; - hash = "sha256-PTcPlYJ0IHWNQKBJcMiotGp6GPH3qY3f6sJKgUVSTZU="; + hash = "sha256-O4FPz62QnvG+Q2l4Gr/O0XFpkXE2G4RO/G6KNDdanzk="; }; vendorHash = null; From b5bafbed03c45977c495a579e3c3317fd45f5ba7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Oct 2023 06:47:03 +0000 Subject: [PATCH 052/216] kubernetes: 1.28.2 -> 1.28.3 --- pkgs/applications/networking/cluster/kubernetes/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix index 97d3a3140209..ac142ca3597e 100644 --- a/pkgs/applications/networking/cluster/kubernetes/default.nix +++ b/pkgs/applications/networking/cluster/kubernetes/default.nix @@ -20,13 +20,13 @@ buildGoModule rec { pname = "kubernetes"; - version = "1.28.2"; + version = "1.28.3"; src = fetchFromGitHub { owner = "kubernetes"; repo = "kubernetes"; rev = "v${version}"; - hash = "sha256-7juoX4nFvQbIIbhTlnIYVUEYUJGwu+aKrpw4ltujjXI="; + hash = "sha256-lb9FAk3b6J92viyHzLCzbYRxhQS94/FQvDr1m1kdTq8="; }; vendorHash = null; From a20c614010580dfb6ac182bdb3661777bbe50955 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Wed, 18 Oct 2023 09:59:02 +0200 Subject: [PATCH 053/216] fzf: fix fish integration Since fzf 0.43.0, the fzf_key_bindings function is only defined when fish is running interactively, see [1]. This caused errors when entering non-interactive fish shells since we called fzf_key_bindings during startup. [1]: https://github.com/junegunn/fzf/commit/7e89458a3b58c047c10494a5cb53d921fb08b4f3 --- pkgs/tools/misc/fzf/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index 29f87b4ffdd0..be7992f94af5 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -79,7 +79,10 @@ buildGoModule rec { install -D shell/* -t $out/share/fzf/ install -D shell/key-bindings.fish $out/share/fish/vendor_functions.d/fzf_key_bindings.fish mkdir -p $out/share/fish/vendor_conf.d - echo fzf_key_bindings > $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish + cat << EOF > $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish + status is-interactive; or exit 0 + fzf_key_bindings + EOF cat <