From d3f25d54bbe94e8ce370df707dcfb9e909af80ed Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sun, 12 Mar 2023 01:49:43 -0500 Subject: [PATCH 1/9] svix-cli: init at 0.21.1 --- pkgs/by-name/sv/svix-cli/package.nix | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/sv/svix-cli/package.nix diff --git a/pkgs/by-name/sv/svix-cli/package.nix b/pkgs/by-name/sv/svix-cli/package.nix new file mode 100644 index 000000000000..8cefce2bffeb --- /dev/null +++ b/pkgs/by-name/sv/svix-cli/package.nix @@ -0,0 +1,39 @@ +{ lib, fetchFromGitHub, fetchpatch, buildGoModule }: + +buildGoModule rec { + version = "0.21.1"; + pname = "svix-cli"; + revision = "v${version}"; + + src = fetchFromGitHub { + owner = "svix"; + repo = pname; + rev = revision; + hash = "sha256-bHcxhJs4Nu/hdiftQFZMx4M5iqFtpOzrsvXOgo9NlDc="; + }; + + vendorHash = "sha256-qSzEpxktdAV+mHa+586mKvpclCpXR6sE7HNcPZywd4s="; + + # Increase minimum go version to 1.17 as the build fails with 1.16 + # due to modules requiring code that was introduced in 1.17 + # PR submitted upstream: https://github.com/svix/svix-cli/pull/103 + patches = [ + (fetchpatch { + name = "increase-minimum-go.patch"; + url = "https://github.com/svix/svix-cli/commit/3c6fc06f72bd7e43165c31019b206ebad175d758.patch"; + hash = "sha256-OwiyBZ3IZGkvo6zEZY1+XYFrqT+RseqTJ5xwCl3LtVg="; + }) + ]; + + subPackages = [ "." ]; + + ldflags = + [ "-s" "-w" "-X github.com/svix/svix-cli/version.Version=v${version}" ]; + + meta = with lib; { + description = "A CLI for interacting with the Svix API"; + homepage = "https://github.com/svix/svix-cli/"; + license = licenses.gpl3; + maintainers = with maintainers; [ techknowlogick ]; + }; +} From a5a093288ed7a8cda825912dbbc99f26609d59ed Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Tue, 11 Jun 2024 20:36:24 +0200 Subject: [PATCH 2/9] androidndkPkgs: remove code duplication --- pkgs/development/androidndk-pkgs/default.nix | 124 +++++-------------- 1 file changed, 34 insertions(+), 90 deletions(-) diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix index 8aa7eefe4215..3e90aefc31f1 100644 --- a/pkgs/development/androidndk-pkgs/default.nix +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -1,95 +1,39 @@ { lib, androidenv, buildPackages, pkgs, targetPackages }: +let + makeNdkPkgs = ndkVersion: + let + buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages { + includeNDK = true; + inherit ndkVersion; + }; + + androidComposition = androidenv.composeAndroidPackages { + includeNDK = true; + inherit ndkVersion; + }; + majorVersion = lib.versions.major ndkVersion; + in + import ./androidndk-pkgs.nix { + inherit lib; + inherit (buildPackages) + makeWrapper autoPatchelfHook; + inherit (pkgs) + stdenv + runCommand wrapBintoolsWith wrapCCWith; + # buildPackages.foo rather than buildPackages.buildPackages.foo would work, + # but for splicing messing up on infinite recursion for the variants we + # *dont't* use. Using this workaround, but also making a test to ensure + # these two really are the same. + buildAndroidndk = buildAndroidComposition.ndk-bundle; + androidndk = androidComposition.ndk-bundle; + targetAndroidndkPkgs = if targetPackages ? "androidndkPkgs_${majorVersion}" then targetPackages."androidndkPkgs_${majorVersion}" else throw "androidndkPkgs_${majorVersion}: no targetPackages, use `buildPackages.androidndkPkgs_${majorVersion}"; + }; +in + { - "21" = - let - ndkVersion = "21.0.6113669"; - - buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - - androidComposition = androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - in - import ./androidndk-pkgs.nix { - inherit lib; - inherit (buildPackages) - makeWrapper autoPatchelfHook; - inherit (pkgs) - stdenv - runCommand wrapBintoolsWith wrapCCWith; - # buildPackages.foo rather than buildPackages.buildPackages.foo would work, - # but for splicing messing up on infinite recursion for the variants we - # *dont't* use. Using this workaround, but also making a test to ensure - # these two really are the same. - buildAndroidndk = buildAndroidComposition.ndk-bundle; - androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_21 then targetPackages.androidndkPkgs_21 else throw "androidndkPkgs_21: no targetPackages, use `buildPackages.androidndkPkgs_21"; - }; - - "23b" = - let - ndkVersion = "23.1.7779620"; - - buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - - androidComposition = androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - in - import ./androidndk-pkgs.nix { - inherit lib; - inherit (buildPackages) - makeWrapper autoPatchelfHook; - inherit (pkgs) - stdenv - runCommand wrapBintoolsWith wrapCCWith; - # buildPackages.foo rather than buildPackages.buildPackages.foo would work, - # but for splicing messing up on infinite recursion for the variants we - # *dont't* use. Using this workaround, but also making a test to ensure - # these two really are the same. - buildAndroidndk = buildAndroidComposition.ndk-bundle; - androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_23b then targetPackages.androidndkPkgs_23b else throw "androidndkPkgs_23b: no targetPackages, use `buildPackages.androidndkPkgs_23b"; - }; - - "24" = - let - ndkVersion = "24.0.8215888"; - - buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - - androidComposition = androidenv.composeAndroidPackages { - includeNDK = true; - inherit ndkVersion; - }; - in - import ./androidndk-pkgs.nix { - inherit lib; - inherit (buildPackages) - makeWrapper autoPatchelfHook; - inherit (pkgs) - stdenv - runCommand wrapBintoolsWith wrapCCWith; - # buildPackages.foo rather than buildPackages.buildPackages.foo would work, - # but for splicing messing up on infinite recursion for the variants we - # *dont't* use. Using this workaround, but also making a test to ensure - # these two really are the same. - buildAndroidndk = buildAndroidComposition.ndk-bundle; - androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_24 then targetPackages.androidndkPkgs_24 else throw "androidndkPkgs_24: no targetPackages, use `buildPackages.androidndkPkgs_24"; - }; - + "21" = makeNdkPkgs "21.0.6113669"; + "23b" = makeNdkPkgs "23.1.7779620"; + "24" = makeNdkPkgs "24.0.8215888"; } From 561bc6622a5e3951adad63bc92fa81951022f850 Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Tue, 11 Jun 2024 20:49:50 +0200 Subject: [PATCH 3/9] androidndkPkgs_25: init at 25.2.9519653 --- pkgs/development/androidndk-pkgs/default.nix | 1 + pkgs/top-level/all-packages.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix index 3e90aefc31f1..796aa614eabf 100644 --- a/pkgs/development/androidndk-pkgs/default.nix +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -36,4 +36,5 @@ in "21" = makeNdkPkgs "21.0.6113669"; "23b" = makeNdkPkgs "23.1.7779620"; "24" = makeNdkPkgs "24.0.8215888"; + "25" = makeNdkPkgs "25.2.9519653"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38c65b8f36c0..30734bc3534f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4083,6 +4083,7 @@ with pkgs; androidndkPkgs_21 = (callPackage ../development/androidndk-pkgs {})."21"; androidndkPkgs_23b = (callPackage ../development/androidndk-pkgs {})."23b"; androidndkPkgs_24 = (callPackage ../development/androidndk-pkgs {})."24"; + androidndkPkgs_25 = (callPackage ../development/androidndk-pkgs {})."25"; androidsdk = androidenv.androidPkgs.androidsdk; From 13effc435c549edd3cee59ac0c8a97679ce8f4e6 Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Tue, 11 Jun 2024 20:49:50 +0200 Subject: [PATCH 4/9] androidndkPkgs_26: init at 26.3.11579264 --- pkgs/development/androidndk-pkgs/default.nix | 1 + pkgs/top-level/all-packages.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix index 796aa614eabf..b11776acebf5 100644 --- a/pkgs/development/androidndk-pkgs/default.nix +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -37,4 +37,5 @@ in "23b" = makeNdkPkgs "23.1.7779620"; "24" = makeNdkPkgs "24.0.8215888"; "25" = makeNdkPkgs "25.2.9519653"; + "26" = makeNdkPkgs "26.3.11579264"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30734bc3534f..bd01ab46f128 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4084,6 +4084,7 @@ with pkgs; androidndkPkgs_23b = (callPackage ../development/androidndk-pkgs {})."23b"; androidndkPkgs_24 = (callPackage ../development/androidndk-pkgs {})."24"; androidndkPkgs_25 = (callPackage ../development/androidndk-pkgs {})."25"; + androidndkPkgs_26 = (callPackage ../development/androidndk-pkgs {})."26"; androidsdk = androidenv.androidPkgs.androidsdk; From 56d1e7a41bbbd1ce45bb088306c65d6395e552f0 Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Tue, 11 Jun 2024 22:18:26 +0200 Subject: [PATCH 5/9] lib.systems.examples: update default android sdk to 33, ndk to 26 --- lib/systems/examples.nix | 12 ++++++------ nixos/doc/manual/release-notes/rl-2411.section.md | 4 ++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 6a9427b2d9de..7e5026674843 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -60,23 +60,23 @@ rec { armv7a-android-prebuilt = { config = "armv7a-unknown-linux-androideabi"; rust.rustcTarget = "armv7-linux-androideabi"; - sdkVer = "28"; - ndkVer = "24"; + sdkVer = "33"; + ndkVer = "26"; useAndroidPrebuilt = true; } // platforms.armv7a-android; aarch64-android-prebuilt = { config = "aarch64-unknown-linux-android"; rust.rustcTarget = "aarch64-linux-android"; - sdkVer = "28"; - ndkVer = "24"; + sdkVer = "33"; + ndkVer = "26"; useAndroidPrebuilt = true; }; aarch64-android = { config = "aarch64-unknown-linux-android"; - sdkVer = "30"; - ndkVer = "24"; + sdkVer = "33"; + ndkVer = "26"; libc = "bionic"; useAndroidPrebuilt = false; useLLVM = true; diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 889d39974932..95984e46013a 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -49,6 +49,10 @@ before changing the package to `pkgs.stalwart-mail` in [`services.stalwart-mail.package`](#opt-services.stalwart-mail.package). +- `androidndkPkgs` has been updated to `androidndkPkgs_26`. + +- Android NDK version 26 and SDK version 33 are now the default versions used for cross compilation to android. + - `haskell.lib.compose.justStaticExecutables` now disallows references to GHC in the output by default, to alert users to closure size issues caused by [#164630](https://github.com/NixOS/nixpkgs/issues/164630). See ["Packaging diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd01ab46f128..d1567dade65d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4079,7 +4079,7 @@ with pkgs; androidenv = callPackage ../development/mobile/androidenv { }; - androidndkPkgs = androidndkPkgs_21; + androidndkPkgs = androidndkPkgs_26; androidndkPkgs_21 = (callPackage ../development/androidndk-pkgs {})."21"; androidndkPkgs_23b = (callPackage ../development/androidndk-pkgs {})."23b"; androidndkPkgs_24 = (callPackage ../development/androidndk-pkgs {})."24"; From a754cd2effd6b7f1aa41bf168cc4fb95bf117add Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 22 Jun 2024 10:56:11 +0200 Subject: [PATCH 6/9] nixVersions.nix_2_18: 2.18.2 -> 2.18.3 It's a small round of various fixes for the default version of Nix. Diff: https://github.com/NixOS/nix/compare/2.18.2...2.18.3 --- nixos/modules/installer/tools/nix-fallback-paths.nix | 10 +++++----- pkgs/tools/package-management/nix/default.nix | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/modules/installer/tools/nix-fallback-paths.nix b/nixos/modules/installer/tools/nix-fallback-paths.nix index e4241e965403..9669ec5e37f3 100644 --- a/nixos/modules/installer/tools/nix-fallback-paths.nix +++ b/nixos/modules/installer/tools/nix-fallback-paths.nix @@ -1,7 +1,7 @@ { - x86_64-linux = "/nix/store/azvn85cras6xv4z5j85fiy406f24r1q0-nix-2.18.1"; - i686-linux = "/nix/store/9bnwy7f9h0kzdzmcnjjsjg0aak5waj40-nix-2.18.1"; - aarch64-linux = "/nix/store/hh65xwqm9s040s3cgn9vzcmrxj0sf5ij-nix-2.18.1"; - x86_64-darwin = "/nix/store/6zi5fqzn9n17wrk8r41rhdw4j7jqqsi3-nix-2.18.1"; - aarch64-darwin = "/nix/store/0pbq6wzr2f1jgpn5212knyxpwmkjgjah-nix-2.18.1"; + x86_64-linux = "/nix/store/yrsmzlw2lgbknzwic1gy1gmv3l2w1ax8-nix-2.18.3"; + i686-linux = "/nix/store/ds9381l9mlwfaclvqnkzn3jl4qb8m3y1-nix-2.18.3"; + aarch64-linux = "/nix/store/hw1zny3f8520zyskmp1qaybv1ir5ilxh-nix-2.18.3"; + x86_64-darwin = "/nix/store/z08yc4sl1fr65q53wz6pw30h67qafaln-nix-2.18.3"; + aarch64-darwin = "/nix/store/p57m7m0wrz8sqxiwinzpwzqzak82zn75-nix-2.18.3"; } diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 5f2a9dadfd6b..f5a351ed35aa 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -147,8 +147,8 @@ in lib.makeExtensible (self: ({ }; nix_2_18 = common { - version = "2.18.2"; - hash = "sha256-8gNJlBlv2bnffRg0CejiBXc6U/S6YeCLAdHrYvTPyoY="; + version = "2.18.3"; + hash = "sha256-430V4oN1Pid0h3J1yucrik6lbDh5D+pHI455bzLPEDY="; self_attribute_name = "nix_2_18"; }; From ab9b8f8cf4165e8fdd7d2b50b459832ec0069b4d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 22 Jun 2024 18:38:04 +0200 Subject: [PATCH 7/9] nixos/nextcloud: `services.nextcloud.occ` is not internal This option is actually useful when having a systemd unit invoking `nextcloud-occ`, then you want to do something like path = [ config.services.nextcloud.occ ] This is possible today, but not documented (and the option completion from nil doesn't pick it up as a result). --- nixos/modules/services/web-apps/nextcloud.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index d7eb2c6cb734..a7a3d01f1f45 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -642,7 +642,6 @@ in { type = types.package; default = occ; defaultText = literalMD "generated script"; - internal = true; description = '' The nextcloud-occ program preconfigured to target this Nextcloud instance. ''; From 50d5306e7c28085420cde8c533464ea8921e0e37 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 22 Jun 2024 18:39:08 +0200 Subject: [PATCH 8/9] nixos/nextcloud: use dedicated memory limit for the entire CLI Originally, I wanted to execute `nextcloud-occ` with a higher memory limit because I needed to trigger an expensive operation by hand, regenerating a bunch of previews. While doing so, I realized how painful it is to put an invocation of nextcloud-occ together for that, especially when you need to put it into another systemd unit in Nix code. That's why I decided to use the memory limit now for every CLI invocation just in case. The stuff you do in those units (e.g. running background jobs) is something you can also do by hand with `nextcloud-occ` and you'll most likely want to have the same memory limit there. --- nixos/modules/services/web-apps/nextcloud.nix | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index a7a3d01f1f45..8d18c8e97391 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -80,6 +80,12 @@ let mkKeyValue = generators.mkKeyValueDefault {} " = "; }; + phpCli = concatStringsSep " " ([ + "${getExe phpPackage}" + ] ++ optionals (cfg.cli.memoryLimit != null) [ + "-dmemory_limit=${cfg.cli.memoryLimit}" + ]); + occ = pkgs.writeScriptBin "nextcloud-occ" '' #! ${pkgs.runtimeShell} cd ${webroot} @@ -89,7 +95,7 @@ let fi export NEXTCLOUD_CONFIG_DIR="${datadir}/config" $sudo \ - ${phpPackage}/bin/php \ + ${phpCli} \ occ "$@" ''; @@ -196,6 +202,9 @@ let in { imports = [ + (mkRenamedOptionModule + [ "services" "nextcloud" "cron" "memoryLimit" ] + [ "services" "nextcloud" "cli" "memoryLimit" ]) (mkRemovedOptionModule [ "services" "nextcloud" "enableBrokenCiphersForSSE" ] '' This option has no effect since there's no supported Nextcloud version packaged here using OpenSSL for RC4 SSE. @@ -793,7 +802,7 @@ in { }; }; - cron.memoryLimit = mkOption { + cli.memoryLimit = mkOption { type = types.nullOr types.str; default = null; example = "1G"; @@ -1009,14 +1018,8 @@ in { serviceConfig = { Type = "exec"; User = "nextcloud"; - ExecCondition = "${lib.getExe phpPackage} -f ${webroot}/occ status -e"; - ExecStart = lib.concatStringsSep " " ([ - (lib.getExe phpPackage) - ] ++ optional (cfg.cron.memoryLimit != null) "-dmemory_limit=${cfg.cron.memoryLimit}" - ++ [ - "-f" - "${webroot}/cron.php" - ]); + ExecCondition = "${phpCli} -f ${webroot}/occ status -e"; + ExecStart = "${phpCli} -f ${webroot}/cron.php"; KillMode = "process"; }; }; @@ -1040,7 +1043,7 @@ in { serviceConfig = { Type = "exec"; User = "nextcloud"; - ExecCondition = "${lib.getExe phpPackage} -f ${webroot}/occ status -e"; + ExecCondition = "${phpCli} -f ${webroot}/occ status -e"; }; }; }; From ba901e926340da4cd7a684c4efcb75349fd3e09b Mon Sep 17 00:00:00 2001 From: Yaya Date: Sun, 23 Jun 2024 12:35:30 +0200 Subject: [PATCH 9/9] pymilter: 1.0.5 -> 1.0.6; replace bsddb3 with berkleydb --- .../python-modules/pymilter/default.nix | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/pymilter/default.nix b/pkgs/development/python-modules/pymilter/default.nix index 32b7cfcc9bbc..6f0c4291d4d5 100644 --- a/pkgs/development/python-modules/pymilter/default.nix +++ b/pkgs/development/python-modules/pymilter/default.nix @@ -1,42 +1,37 @@ { lib, - python, buildPythonPackage, fetchFromGitHub, - fetchpatch, libmilter, - bsddb3, + berkeleydb, pydns, iana-etc, libredirect, pyasyncore, + setuptools, }: buildPythonPackage rec { pname = "pymilter"; - version = "1.0.5"; - format = "setuptools"; + version = "1.0.6"; + pyproject = true; src = fetchFromGitHub { owner = "sdgathman"; - repo = pname; - rev = "${pname}-${version}"; - hash = "sha256-gZUWEDVZfDRiOOdG3lpiQldHxm/93l8qYVOHOEpHhzQ="; + repo = "pymilter"; + rev = "refs/tags/pymilter-${version}"; + hash = "sha256-plaWXwDAIsVzEtrabZuZj7T4WNfz2ntQHgcMCVf5S70="; }; + build-system = [ + setuptools + ]; buildInputs = [ libmilter ]; nativeCheckInputs = [ pyasyncore ]; - propagatedBuildInputs = [ - bsddb3 + dependencies = [ + berkeleydb pydns ]; - patches = [ - (fetchpatch { # https://github.com/sdgathman/pymilter/pull/57 - name = "Remove-calls-to-the-deprecated-method-assertEquals"; - url = "https://github.com/sdgathman/pymilter/commit/1ead9028fc63ae3ec6ea3b0c438e6ed088a2b20e.patch"; - hash = "sha256-/5LlDR15nMR3l7rkVjT3w4FbDTFAAgNdERWlPNL2TVg="; - }) - ]; preBuild = '' sed -i 's/import thread/import _thread as thread/' Milter/greylist.py