From cf5ab0191d8582c77a8062646afe6fa09b7d4748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Tue, 13 Dec 2022 17:16:30 +0100 Subject: [PATCH 01/58] nixos/nix-daemon: remove nixbld users if auto-allocating UIDs https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-auto-allocate-uids --- nixos/modules/services/misc/nix-daemon.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index c88fceb9a92c..5937ed0219dc 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -792,7 +792,10 @@ in fi ''; - nix.nrBuildUsers = mkDefault (max 32 (if cfg.settings.max-jobs == "auto" then 0 else cfg.settings.max-jobs)); + nix.nrBuildUsers = mkDefault ( + if cfg.settings.auto-allocate-uids or false then 0 + else max 32 (if cfg.settings.max-jobs == "auto" then 0 else cfg.settings.max-jobs) + ); users.users = nixbldUsers; From 8d6499746489f84b073e1525cbd7603400fa04bb Mon Sep 17 00:00:00 2001 From: Monson Shao Date: Thu, 15 Dec 2022 16:14:44 +0800 Subject: [PATCH 02/58] dufs: skip checkPhase on darwin --- pkgs/servers/http/dufs/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/http/dufs/default.nix b/pkgs/servers/http/dufs/default.nix index af02b7199610..e7229a3d3a67 100644 --- a/pkgs/servers/http/dufs/default.nix +++ b/pkgs/servers/http/dufs/default.nix @@ -23,6 +23,9 @@ rustPlatform.buildRustPackage rec { Security ]; + # FIXME: checkPhase on darwin will leave some zombie spawn processes + # see https://github.com/NixOS/nixpkgs/issues/205620 + doCheck = !stdenv.isDarwin; checkFlags = [ # tests depend on network interface, may fail with virtual IPs. "--skip=validate_printed_urls" From 422674866c40470b9af91fe438f982f7577f2667 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Dec 2022 16:28:36 +0000 Subject: [PATCH 03/58] firefox_decrypt: unstable-2021-12-29 -> unstable-2022-12-21 --- pkgs/tools/security/firefox_decrypt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/firefox_decrypt/default.nix b/pkgs/tools/security/firefox_decrypt/default.nix index 86bfb5f72242..aa9edc2bc5db 100644 --- a/pkgs/tools/security/firefox_decrypt/default.nix +++ b/pkgs/tools/security/firefox_decrypt/default.nix @@ -8,13 +8,13 @@ stdenvNoCC.mkDerivation rec { pname = "firefox_decrypt"; - version = "unstable-2021-12-29"; + version = "unstable-2022-12-21"; src = fetchFromGitHub { owner = "unode"; repo = pname; - rev = "a3daadc09603a6cf8c4b7e49a59776340bc885e7"; - sha256 = "0g219zqbdnhh9j09d9a0b81vr6j44zzk13ckl5fzkr10gqndiscc"; + rev = "84bb368cc2f8d2055a8374ab1a40c403e0486859"; + sha256 = "sha256-dyQTf6fgsQEmp++DeXl85nvyezm0Lq9onyfIdhQoGgI="; }; nativeBuildInputs = [ wrapPython ]; From dc1e00bd8bcf7040573a3a6721fd264d900d13d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 14 Oct 2022 10:32:02 +0200 Subject: [PATCH 04/58] nixos/wg-quick: use `networking.firewall.package` Use `nftables` if available. --- nixos/modules/services/networking/wg-quick.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/wg-quick.nix b/nixos/modules/services/networking/wg-quick.nix index a678d743bb77..34210580f538 100644 --- a/nixos/modules/services/networking/wg-quick.nix +++ b/nixos/modules/services/networking/wg-quick.nix @@ -273,7 +273,11 @@ let after = [ "network.target" "network-online.target" ]; wantedBy = optional values.autostart "multi-user.target"; environment.DEVICE = name; - path = [ pkgs.kmod pkgs.wireguard-tools config.networking.resolvconf.package ]; + path = [ + pkgs.wireguard-tools + config.networking.firewall.package # iptables or nftables + config.networking.resolvconf.package # openresolv or systemd + ]; serviceConfig = { Type = "oneshot"; @@ -281,7 +285,7 @@ let }; script = '' - ${optionalString (!config.boot.isContainer) "modprobe wireguard"} + ${optionalString (!config.boot.isContainer) "${pkgs.kmod}/bin/modprobe wireguard"} ${optionalString (values.configFile != null) '' cp ${values.configFile} ${configPath} ''} From c4bd20a68602c22ef8a872c7c14ad69c13d4f503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 26 Dec 2022 12:26:20 +0100 Subject: [PATCH 05/58] nixos/wg-quick: add nftables test --- nixos/tests/wireguard/basic.nix | 3 +- nixos/tests/wireguard/default.nix | 3 +- nixos/tests/wireguard/generated.nix | 3 +- nixos/tests/wireguard/namespaces.nix | 4 +- nixos/tests/wireguard/wg-quick.nix | 74 +++++++++++++++------------- 5 files changed, 46 insertions(+), 41 deletions(-) diff --git a/nixos/tests/wireguard/basic.nix b/nixos/tests/wireguard/basic.nix index 36ab226cde0e..96b0a681c364 100644 --- a/nixos/tests/wireguard/basic.nix +++ b/nixos/tests/wireguard/basic.nix @@ -1,5 +1,4 @@ -{ kernelPackages ? null }: -import ../make-test-python.nix ({ pkgs, lib, ...} : +import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, ...} : let wg-snakeoil-keys = import ./snakeoil-keys.nix; peer = (import ./make-peer.nix) { inherit lib; }; diff --git a/nixos/tests/wireguard/default.nix b/nixos/tests/wireguard/default.nix index dedb321ff2ef..c30f1b74770b 100644 --- a/nixos/tests/wireguard/default.nix +++ b/nixos/tests/wireguard/default.nix @@ -7,10 +7,11 @@ with pkgs.lib; let - tests = let callTest = p: flip (import p) { inherit system pkgs; }; in { + tests = let callTest = p: args: import p ({ inherit system pkgs; } // args); in { basic = callTest ./basic.nix; namespaces = callTest ./namespaces.nix; wg-quick = callTest ./wg-quick.nix; + wg-quick-nftables = args: callTest ./wg-quick.nix ({ nftables = true; } // args); generated = callTest ./generated.nix; }; in diff --git a/nixos/tests/wireguard/generated.nix b/nixos/tests/wireguard/generated.nix index 84a35d29b453..c58f7a75071e 100644 --- a/nixos/tests/wireguard/generated.nix +++ b/nixos/tests/wireguard/generated.nix @@ -1,5 +1,4 @@ -{ kernelPackages ? null }: -import ../make-test-python.nix ({ pkgs, lib, ... } : { +import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, ... } : { name = "wireguard-generated"; meta = with pkgs.lib.maintainers; { maintainers = [ ma27 grahamc ]; diff --git a/nixos/tests/wireguard/namespaces.nix b/nixos/tests/wireguard/namespaces.nix index 93dc84a8768e..1790c45bb1f6 100644 --- a/nixos/tests/wireguard/namespaces.nix +++ b/nixos/tests/wireguard/namespaces.nix @@ -1,5 +1,3 @@ -{ kernelPackages ? null }: - let listenPort = 12345; socketNamespace = "foo"; @@ -15,7 +13,7 @@ let in -import ../make-test-python.nix ({ pkgs, lib, ... } : { +import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, ... } : { name = "wireguard-with-namespaces"; meta = with pkgs.lib.maintainers; { maintainers = [ asymmetric ]; diff --git a/nixos/tests/wireguard/wg-quick.nix b/nixos/tests/wireguard/wg-quick.nix index bc2cba911888..ec2b8d7f2d9d 100644 --- a/nixos/tests/wireguard/wg-quick.nix +++ b/nixos/tests/wireguard/wg-quick.nix @@ -1,9 +1,13 @@ -{ kernelPackages ? null }: - -import ../make-test-python.nix ({ pkgs, lib, ... }: +import ../make-test-python.nix ({ pkgs, lib, kernelPackages ? null, nftables ? false, ... }: let wg-snakeoil-keys = import ./snakeoil-keys.nix; - peer = (import ./make-peer.nix) { inherit lib; }; + peer = import ./make-peer.nix { inherit lib; }; + commonConfig = { + boot.kernelPackages = lib.mkIf (kernelPackages != null) kernelPackages; + networking.nftables.enable = nftables; + # Make sure iptables doesn't work with nftables enabled + boot.blacklistedKernelModules = lib.mkIf nftables [ "nft_compat" ]; + }; in { name = "wg-quick"; @@ -15,47 +19,51 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: peer0 = peer { ip4 = "192.168.0.1"; ip6 = "fd00::1"; - extraConfig = { - boot = lib.mkIf (kernelPackages != null) { inherit kernelPackages; }; - networking.firewall.allowedUDPPorts = [ 23542 ]; - networking.wg-quick.interfaces.wg0 = { - address = [ "10.23.42.1/32" "fc00::1/128" ]; - listenPort = 23542; + extraConfig = lib.mkMerge [ + commonConfig + { + networking.firewall.allowedUDPPorts = [ 23542 ]; + networking.wg-quick.interfaces.wg0 = { + address = [ "10.23.42.1/32" "fc00::1/128" ]; + listenPort = 23542; - inherit (wg-snakeoil-keys.peer0) privateKey; + inherit (wg-snakeoil-keys.peer0) privateKey; - peers = lib.singleton { - allowedIPs = [ "10.23.42.2/32" "fc00::2/128" ]; + peers = lib.singleton { + allowedIPs = [ "10.23.42.2/32" "fc00::2/128" ]; - inherit (wg-snakeoil-keys.peer1) publicKey; + inherit (wg-snakeoil-keys.peer1) publicKey; + }; + + dns = [ "10.23.42.2" "fc00::2" "wg0" ]; }; - - dns = [ "10.23.42.2" "fc00::2" "wg0" ]; - }; - }; + } + ]; }; peer1 = peer { ip4 = "192.168.0.2"; ip6 = "fd00::2"; - extraConfig = { - boot = lib.mkIf (kernelPackages != null) { inherit kernelPackages; }; - networking.useNetworkd = true; - networking.wg-quick.interfaces.wg0 = { - address = [ "10.23.42.2/32" "fc00::2/128" ]; - inherit (wg-snakeoil-keys.peer1) privateKey; + extraConfig = lib.mkMerge [ + commonConfig + { + networking.useNetworkd = true; + networking.wg-quick.interfaces.wg0 = { + address = [ "10.23.42.2/32" "fc00::2/128" ]; + inherit (wg-snakeoil-keys.peer1) privateKey; - peers = lib.singleton { - allowedIPs = [ "0.0.0.0/0" "::/0" ]; - endpoint = "192.168.0.1:23542"; - persistentKeepalive = 25; + peers = lib.singleton { + allowedIPs = [ "0.0.0.0/0" "::/0" ]; + endpoint = "192.168.0.1:23542"; + persistentKeepalive = 25; - inherit (wg-snakeoil-keys.peer0) publicKey; + inherit (wg-snakeoil-keys.peer0) publicKey; + }; + + dns = [ "10.23.42.1" "fc00::1" "wg0" ]; }; - - dns = [ "10.23.42.1" "fc00::1" "wg0" ]; - }; - }; + } + ]; }; }; From 138d4389cc1e2e22637ced70cf3a45c3eaa4f8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 26 Dec 2022 13:00:47 +0100 Subject: [PATCH 06/58] wireguard-tools: move `iptables` to PATH suffix The firewall package in the environment should take precedence. --- pkgs/tools/networking/wireguard-tools/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index 6430eeeb0b75..b0bc3346526c 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -37,10 +37,11 @@ stdenv.mkDerivation rec { --replace /usr/bin $out/bin '' + lib.optionalString stdenv.isLinux '' for f in $out/bin/*; do - # allow users to provide their own resolvconf implementation, e.g. the one provided by systemd-resolved + # Which firewall and resolvconf implementations to use should be determined by the + # environment, we provide the "default" ones as fallback. wrapProgram $f \ - --prefix PATH : ${lib.makeBinPath [ procps iproute2 iptables ]} \ - --suffix PATH : ${lib.makeBinPath [ openresolv ]} + --prefix PATH : ${lib.makeBinPath [ procps iproute2 ]} \ + --suffix PATH : ${lib.makeBinPath [ iptables openresolv ]} done ''; From e98047818ecfa327aebc82733fd96800b0d344cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 29 Dec 2022 01:30:25 +0100 Subject: [PATCH 07/58] .editorconfig: disallow trailing whitespace for markdown again Although trailing whitespace is significant, there's no good reason to use that feature. --- .editorconfig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index a4f216d71a22..3ff05f9a7fa0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -55,10 +55,13 @@ trim_trailing_whitespace = unset [*.lock] indent_size = unset -# trailing whitespace is an actual syntax element of classic Markdown/ -# CommonMark to enforce a line break +# Although Markdown/CommonMark allows using two trailing spaces to denote +# a hard line break, we do not use that feature in nixpkgs since +# it forces the surrounding paragraph to become a which +# does not wrap reasonably. +# Instead of a hard line break, start a new paragraph by inserting a blank line. [*.md] -trim_trailing_whitespace = unset +trim_trailing_whitespace = true # binaries [*.nib] From 22ea90a4d87b33101a72c2eff633472fb2e59171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 29 Dec 2022 01:40:50 +0100 Subject: [PATCH 08/58] .editorconfig: apply trailing whitespace removal editorconfig-checker -disable-indent-size **/*.md --- doc/builders/images/makediskimage.section.md | 2 +- doc/builders/testers.chapter.md | 2 +- doc/languages-frameworks/go.section.md | 3 ++- .../from_md/release-notes/rl-2205.section.xml | 16 +++++++++++-- .../manual/release-notes/rl-2205.section.md | 24 +++++++++---------- .../manual/release-notes/rl-2305.section.md | 2 +- pkgs/servers/nextcloud/packages/README.md | 4 ++-- .../web-apps/wordpress/packages/README.md | 6 ++--- 8 files changed, 36 insertions(+), 23 deletions(-) diff --git a/doc/builders/images/makediskimage.section.md b/doc/builders/images/makediskimage.section.md index 9798a0be4d46..833a6461e57b 100644 --- a/doc/builders/images/makediskimage.section.md +++ b/doc/builders/images/makediskimage.section.md @@ -20,7 +20,7 @@ Features are separated in various sections depending on if you opt for a Nix-sto ### Common - arbitrary NixOS configuration -- automatic or bound disk size: `diskSize` parameter, `additionalSpace` can be set when `diskSize` is `auto` to add a constant of disk space +- automatic or bound disk size: `diskSize` parameter, `additionalSpace` can be set when `diskSize` is `auto` to add a constant of disk space - multiple partition table layouts: EFI, legacy, legacy + GPT, hybrid, none through `partitionTableType` parameter - OVMF or EFI firmwares and variables templates can be customized - root filesystem `fsType` can be customized to whatever `mkfs.${fsType}` exist during operations diff --git a/doc/builders/testers.chapter.md b/doc/builders/testers.chapter.md index 342887da566c..3d91f096051e 100644 --- a/doc/builders/testers.chapter.md +++ b/doc/builders/testers.chapter.md @@ -62,7 +62,7 @@ runCommand "example" { ''; ``` -While `testBuildFailure` is designed to keep changes to the original builder's +While `testBuildFailure` is designed to keep changes to the original builder's environment to a minimum, some small changes are inevitable. - The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted. diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 523f5b26ec7f..cefdd68c3520 100644 --- a/doc/languages-frameworks/go.section.md +++ b/doc/languages-frameworks/go.section.md @@ -16,7 +16,8 @@ In the following is an example expression using `buildGoModule`, the following a `vendorHash` can also be set to `null`. In that case, rather than fetching the dependencies and vendoring them, the dependencies vendored in the source repo will be used. - To avoid updating this field when dependencies change, run `go mod vendor` in your source repo and set `vendorHash = null;` + To avoid updating this field when dependencies change, run `go mod vendor` in your source repo and set `vendorHash = null;` + To obtain the actual hash, set `vendorHash = lib.fakeSha256;` and run the build ([more details here](#sec-source-hashes)). - `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorHash` checksums. diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 457bb46137f5..64217c53c3b8 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -16,8 +16,20 @@ -Nix has been updated from 2.3 to 2.8. This mainly brings experimental support for Flakes, but also marks the nix command as experimental which now has to be enabled via the configuration explicitly. For more information and instructions for upgrades, see the relase notes for nix-2.4, -nix-2.5, nix-2.6, nix-2.7 and nix-2.8 + + Nix has been updated from 2.3 to 2.8. This mainly brings + experimental support for Flakes, but also marks the + nix command as experimental which now has + to be enabled via the configuration explicitly. For more + information and instructions for upgrades, see the relase + notes for + nix-2.4, + nix-2.5, + nix-2.6, + nix-2.7 + and + nix-2.8 + diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 7cc0c308ee65..24f73dc3f00b 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -9,8 +9,8 @@ In addition to numerous new and upgraded packages, this release has the followin - Nix has been updated from 2.3 to 2.8. This mainly brings experimental support for Flakes, but also marks the `nix` command as experimental which now has to be enabled via the configuration explicitly. For more information and - instructions for upgrades, see the - relase notes for [nix-2.4](https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html), + instructions for upgrades, see the + relase notes for [nix-2.4](https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html), [nix-2.5](https://nixos.org/manual/nix/stable/release-notes/rl-2.5.html), [nix-2.6](https://nixos.org/manual/nix/stable/release-notes/rl-2.6.html), [nix-2.7](https://nixos.org/manual/nix/stable/release-notes/rl-2.7.html) and @@ -30,7 +30,7 @@ In addition to numerous new and upgraded packages, this release has the followin - Systemd has been upgraded to the version 250. -- Pulseaudio has been updated to version 15.0 and now optionally +- Pulseaudio has been updated to version 15.0 and now optionally [supports additional Bluetooth audio codecs](https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/#supportforldacandaptxbluetoothcodecsplussbcxqsbcwithhigher-qualityparameters) such as aptX or LDAC, with codec switching available in `pavucontrol`. This feature is disabled by default, but can be enabled with the option @@ -50,7 +50,7 @@ In addition to numerous new and upgraded packages, this release has the followin settings for many certificates at once. This also opens up the option to use DNS-01 validation when using `enableACME` web server virtual hosts (e.g. `services.nginx.virtualHosts.*.enableACME`). - + ## New Services {#sec-release-22.05-new-services} - [1password](https://1password.com/), command-lines and graphic interface for 1Password. Available as [programs._1password](#opt-programs._1password.enable) and [programs._1password-gui](#opt-programs._1password.enable). @@ -743,11 +743,11 @@ In addition to numerous new and upgraded packages, this release has the followin - The configuration portion of the `nix-daemon` module has been reworked and exposed as [nix.settings](options.html#opt-nix-settings): * Legacy options have been mapped to the corresponding options under under [nix.settings](options.html#opt-nix.settings) and will be deprecated when NixOS 21.11 reaches end of life. * [nix.buildMachines.publicHostKey](options.html#opt-nix.buildMachines.publicHostKey) has been added. - + - [`kops`](https://kops.sigs.k8s.io) defaults to 1.23.2, which will enable [Instance Metadata Service Version 2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) and require tokens on new clusters with Kubernetes >= 1.22. This will increase security by default, but may break some types of workloads. The default behaviour for `spec.kubeDNS.nodeLocalDNS.forwardToKubeDNS` has changed from `true` to `false`. Cilium now has `disable-cnp-status-updates: true` by default. Set this to false if you rely on the CiliumNetworkPolicy status fields. Support for Kubernetes 1.17, the Lyft CNI, Weave CNI on Kubernetes >= 1.23, CentOS 7 and 8, Debian 9, RHEL 7, and Ubuntu 16.05 (Xenial) has been removed. See the [1.22 release notes](https://kops.sigs.k8s.io/releases/1.22-notes/) and [1.23 release notes](https://kops.sigs.k8s.io/releases/1.23-notes/) for more details, including other significant changes. - Mattermost has been upgraded to extended support version 6.3 as the previously - packaged extended support version 5.37 is [reaching end of life](https://docs.mattermost.com/upgrade/extended-support-release.html). + packaged extended support version 5.37 is [reaching end of life](https://docs.mattermost.com/upgrade/extended-support-release.html). Migration may take some time, see the [changelog](https://docs.mattermost.com/install/self-managed-changelog.html#release-v6-3-extended-support-release) and [important upgrade notes](https://docs.mattermost.com/upgrade/important-upgrade-notes.html). @@ -762,14 +762,14 @@ In addition to numerous new and upgraded packages, this release has the followin By default auto-upgrade will now run immediately if it would have been triggered at least once during the time when the timer was inactive. -- Mastodon now uses `services.redis.servers` to start a new redis server, instead of using a global redis server. +- Mastodon now uses `services.redis.servers` to start a new redis server, instead of using a global redis server. This improves compatibility with other services that use redis. - - Note that this will recreate the redis database, although according to the [Mastodon docs](https://docs.joinmastodon.org/admin/backups/), + + Note that this will recreate the redis database, although according to the [Mastodon docs](https://docs.joinmastodon.org/admin/backups/), this is almost harmless: - > Losing the Redis database is almost harmless: The only irrecoverable data will be the contents of the Sidekiq queues and scheduled retries of previously failed jobs. + > Losing the Redis database is almost harmless: The only irrecoverable data will be the contents of the Sidekiq queues and scheduled retries of previously failed jobs. > The home and list feeds are stored in Redis, but can be regenerated with tootctl. - + If you do want to save the redis database, you can use the following commands: ```bash redis-cli save @@ -980,7 +980,7 @@ In addition to numerous new and upgraded packages, this release has the followin or `wl*` with priority 99 (which means that it doesn't have any effect if such an interface is matched by a `.network-`unit with a lower priority). In case of scripted networking, no behavior was changed. - + - The new [`postgresqlTestHook`](https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook) runs a PostgreSQL server for the duration of package checks. - `zfs` was updated from 2.1.4 to 2.1.5, enabling it to be used with Linux kernel 5.18. diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 630157901674..8fb6cd9b80a1 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -34,7 +34,7 @@ In addition to numerous new and upgraded packages, this release has the followin - `carnix` and `cratesIO` has been removed due to being unmaintained, use alternatives such as [naersk](https://github.com/nix-community/naersk) and [crate2nix](https://github.com/kolloch/crate2nix) instead. -- `borgbackup` module now has an option for inhibiting system sleep while backups are running, defaulting to off (not inhibiting sleep), available as [`services.borgbackup.jobs..inhibitsSleep`](#opt-services.borgbackup.jobs._name_.inhibitsSleep). +- `borgbackup` module now has an option for inhibiting system sleep while backups are running, defaulting to off (not inhibiting sleep), available as [`services.borgbackup.jobs..inhibitsSleep`](#opt-services.borgbackup.jobs._name_.inhibitsSleep). - The EC2 image module no longer fetches instance metadata in stage-1. This results in a significantly smaller initramfs, since network drivers no longer need to be included, and faster boots, since metadata fetching can happen in parallel with startup of other services. This breaks services which rely on metadata being present by the time stage-2 is entered. Anything which reads EC2 metadata from `/etc/ec2-metadata` should now have an `after` dependency on `fetch-ec2-metadata.service` diff --git a/pkgs/servers/nextcloud/packages/README.md b/pkgs/servers/nextcloud/packages/README.md index 412fddf3f6a9..452dc4c62ae2 100644 --- a/pkgs/servers/nextcloud/packages/README.md +++ b/pkgs/servers/nextcloud/packages/README.md @@ -13,9 +13,9 @@ for example `breezedark` for the app with the url To regenerate the nixpkgs nextcloudPackages set, run: -``` +``` ./generate.sh -``` +``` After that you can commit and submit the changes. diff --git a/pkgs/servers/web-apps/wordpress/packages/README.md b/pkgs/servers/web-apps/wordpress/packages/README.md index bb9dc033f3b3..6ca50e1d9c4a 100644 --- a/pkgs/servers/web-apps/wordpress/packages/README.md +++ b/pkgs/servers/web-apps/wordpress/packages/README.md @@ -18,9 +18,9 @@ For available translations and language codes see [upstream translation reposito To regenerate the nixpkgs wordpressPackages set, run: -``` +``` ./generate.sh -``` +``` After that you can commit and submit the changes. @@ -29,7 +29,7 @@ After that you can commit and submit the changes. The plugins will be available in the namespace `wordpressPackages.plugins`. Using it together with the Wordpress module could look like this: -``` +``` services.wordpress = { sites."blog.${config.networking.domain}" = { plugins = with pkgs.wordpressPackages.plugins; [ From 79e3c9f6157b70eb3f900d95ae2e249c07796032 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 30 Dec 2022 16:59:02 -0500 Subject: [PATCH 09/58] cargo-tally: 1.0.19 -> 1.0.20 --- pkgs/development/tools/rust/cargo-tally/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-tally/default.nix b/pkgs/development/tools/rust/cargo-tally/default.nix index 8fa00e11ef76..b17d36f00d4c 100644 --- a/pkgs/development/tools/rust/cargo-tally/default.nix +++ b/pkgs/development/tools/rust/cargo-tally/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "cargo-tally"; - version = "1.0.19"; + version = "1.0.20"; src = fetchCrate { inherit pname version; - sha256 = "sha256-TlHb974Dtmz5qW+4L3BE6GQ3SbkwtIrZxE6FpJrgNdY="; + sha256 = "sha256-fhZR8bP8hSCkghRL0uOR0GBeIQtDa2+vzpsjgZq7yio="; }; - cargoSha256 = "sha256-np1rln9tD+J4s410/Pv4/eKAxyzK8qtLoON86JR1T94="; + cargoSha256 = "sha256-7446cO7DkHy2PAPQg+nlwrHxBQhQh5AUOu+jXLKo61U="; buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ DiskArbitration From 67cfc7a8f68776cbd7cf73e3c79b4cdd3ea102c4 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:10:44 +0100 Subject: [PATCH 10/58] lib.strings: Add isSimpleCoercibleToString --- lib/strings.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/strings.nix b/lib/strings.nix index 20f6db08cebc..039a9ed1db1c 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -805,6 +805,17 @@ rec { x ? outPath || x ? __toString; + /* Check whether a value can be coerced to a string, + The value must be a string, path, or attribute set. + + This follows Nix's internal coerceToString(coerceMore = false) logic, + except for external types, for which we return false. + */ + isSimpleCoercibleToString = x: + elem (typeOf x) [ "path" "string" ] || + x ? outPath || + x ? __toString; + /* Check whether a value is a store path. Example: From 2b4a8db032643ae61a3b05c24d121e124e0f8414 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:17:29 +0100 Subject: [PATCH 11/58] lib.strings.isStorePath: Use isSimpleCoercibleToString Expecting no change in behavior. --- lib/strings.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index 039a9ed1db1c..5fba13822e3f 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -829,7 +829,7 @@ rec { => false */ isStorePath = x: - if !(isList x) && isCoercibleToString x then + if isSimpleCoercibleToString x then let str = toString x; in substring 0 1 str == "/" && dirOf str == storeDir From 03063f65a5d58fc0a72648d475101d86752725ba Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:40:08 +0100 Subject: [PATCH 12/58] lib.strings.toShellVar: Use isSimpleCoercibleString Expecting no change in behavior. --- lib/strings.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index 5fba13822e3f..edc31b4e9e36 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -395,7 +395,7 @@ rec { */ toShellVar = name: value: lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" ( - if isAttrs value && ! isCoercibleToString value then + if isAttrs value && ! isSimpleCoercibleToString value then "declare -A ${name}=(${ concatStringsSep " " (lib.mapAttrsToList (n: v: "[${escapeShellArg n}]=${escapeShellArg v}" From 3a4c9bdbe619ed235aab005c5f162879c2ed6039 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:18:29 +0100 Subject: [PATCH 13/58] lib.types.anything: Use isSimpleCoercibleToString Expecting no change in behavior. --- lib/types.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/types.nix b/lib/types.nix index e741bec6c29d..a99872d2f96b 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -55,6 +55,7 @@ let escapeNixString hasInfix isCoercibleToString + isSimpleCoercibleToString ; inherit (lib.trivial) boolToString @@ -227,7 +228,7 @@ rec { merge = loc: defs: let getType = value: - if isAttrs value && isCoercibleToString value + if isAttrs value && isSimpleCoercibleToString value then "stringCoercibleSet" else builtins.typeOf value; From 68b6443ed635a3e87a62a5a8dcfd05e952c93192 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:34:15 +0100 Subject: [PATCH 14/58] lib.strings: Rename isCoercibleToString -> isMoreCoercibleToString --- lib/strings.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index edc31b4e9e36..897fa3e3a204 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -798,8 +798,17 @@ rec { in lib.warnIf (!precise) "Imprecise conversion from float to string ${result}" result; - /* Check whether a value can be coerced to a string */ - isCoercibleToString = x: + /* Soft-deprecated name for isMoreCoercibleToString */ + isCoercibleToString = lib.warnIf (lib.isInOldestRelease 2305) + "lib.strings.isCoercibleToString is deprecated in favor of either isSimpleCoercibleToString or isMoreCoercibleString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." + isMoreCoercibleToString; + + /* Check whether a list or other value can be passed to toString. + + Many types of value are coercible to string this way, including int, float, + null, bool, list of similarly coercible values. + */ + isMoreCoercibleToString = x: elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] || (isList x && lib.all isCoercibleToString x) || x ? outPath || From fed5dc66f80ae3a159a2449904ae067f60a04a67 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:38:06 +0100 Subject: [PATCH 15/58] treewide: isCoercibleToString -> isMoreCoercibleToString No change in behavior. --- lib/strings.nix | 2 +- lib/types.nix | 4 ++-- nixos/modules/services/misc/nix-daemon.nix | 2 +- nixos/modules/services/system/self-deploy.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index 897fa3e3a204..6d2462d03b2a 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -810,7 +810,7 @@ rec { */ isMoreCoercibleToString = x: elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] || - (isList x && lib.all isCoercibleToString x) || + (isList x && lib.all isMoreCoercibleToString x) || x ? outPath || x ? __toString; diff --git a/lib/types.nix b/lib/types.nix index a99872d2f96b..b5ac0369c539 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -54,7 +54,7 @@ let concatStringsSep escapeNixString hasInfix - isCoercibleToString + isMoreCoercibleToString isSimpleCoercibleToString ; inherit (lib.trivial) @@ -480,7 +480,7 @@ rec { path = mkOptionType { name = "path"; descriptionClass = "noun"; - check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + check = x: isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; merge = mergeEqualOption; }; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 10db7cdfb33c..98d5150f2436 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -42,7 +42,7 @@ let else if isDerivation v then toString v else if builtins.isPath v then toString v else if isString v then v - else if strings.isCoercibleToString v then toString v + else if strings.isMoreCoercibleToString v then toString v else abort "The nix conf value: ${toPretty {} v} can not be encoded"; mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}"; diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 9b1ebfd37522..9f5f39970f26 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -18,7 +18,7 @@ let in lib.concatStrings (lib.mapAttrsToList toArg args); - isPathType = x: lib.strings.isCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + isPathType = x: lib.strings.isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; in { From 29efb2c438ba2dd04d545c67a22d1e64576de9f4 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:42:27 +0100 Subject: [PATCH 16/58] lib.types.path: Do not allow lists of strings --- lib/types.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index b5ac0369c539..deeff36b4a4a 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -54,7 +54,6 @@ let concatStringsSep escapeNixString hasInfix - isMoreCoercibleToString isSimpleCoercibleToString ; inherit (lib.trivial) @@ -480,7 +479,7 @@ rec { path = mkOptionType { name = "path"; descriptionClass = "noun"; - check = x: isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + check = x: isSimpleCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; merge = mergeEqualOption; }; From 5b8de3d9d85c121fd027608fe0c049356c6eea30 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Dec 2022 23:47:51 +0100 Subject: [PATCH 17/58] nixos/self-deploy: Cleanup after types.path is not allowed to be a list anymore --- nixos/modules/services/system/self-deploy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 9f5f39970f26..16a793a42253 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -18,7 +18,7 @@ let in lib.concatStrings (lib.mapAttrsToList toArg args); - isPathType = x: lib.strings.isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + isPathType = x: lib.types.path.check x; in { From 872a24ebbc8056142f7930cc0f775237c4ca83f7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 00:38:16 +0100 Subject: [PATCH 18/58] lib.strings: isSimpleCoercibleString -> isStringLike --- lib/strings.nix | 14 +++++++------- lib/types.nix | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index 6d2462d03b2a..0130ea37fb1b 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -395,7 +395,7 @@ rec { */ toShellVar = name: value: lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" ( - if isAttrs value && ! isSimpleCoercibleToString value then + if isAttrs value && ! isStringLike value then "declare -A ${name}=(${ concatStringsSep " " (lib.mapAttrsToList (n: v: "[${escapeShellArg n}]=${escapeShellArg v}" @@ -800,7 +800,7 @@ rec { /* Soft-deprecated name for isMoreCoercibleToString */ isCoercibleToString = lib.warnIf (lib.isInOldestRelease 2305) - "lib.strings.isCoercibleToString is deprecated in favor of either isSimpleCoercibleToString or isMoreCoercibleString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." + "lib.strings.isCoercibleToString is deprecated in favor of either isStringLike or isMoreCoercibleString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." isMoreCoercibleToString; /* Check whether a list or other value can be passed to toString. @@ -814,13 +814,13 @@ rec { x ? outPath || x ? __toString; - /* Check whether a value can be coerced to a string, + /* Check whether a value can be coerced to a string. The value must be a string, path, or attribute set. - This follows Nix's internal coerceToString(coerceMore = false) logic, - except for external types, for which we return false. + String-like values can be used without explicit conversion in + string interpolations and in most functions that expect a string. */ - isSimpleCoercibleToString = x: + isStringLike = x: elem (typeOf x) [ "path" "string" ] || x ? outPath || x ? __toString; @@ -838,7 +838,7 @@ rec { => false */ isStorePath = x: - if isSimpleCoercibleToString x then + if isStringLike x then let str = toString x; in substring 0 1 str == "/" && dirOf str == storeDir diff --git a/lib/types.nix b/lib/types.nix index deeff36b4a4a..666e6502d161 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -54,7 +54,7 @@ let concatStringsSep escapeNixString hasInfix - isSimpleCoercibleToString + isStringLike ; inherit (lib.trivial) boolToString @@ -227,7 +227,7 @@ rec { merge = loc: defs: let getType = value: - if isAttrs value && isSimpleCoercibleToString value + if isAttrs value && isStringLike value then "stringCoercibleSet" else builtins.typeOf value; @@ -479,7 +479,7 @@ rec { path = mkOptionType { name = "path"; descriptionClass = "noun"; - check = x: isSimpleCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/"; merge = mergeEqualOption; }; From 834f0d660a79e8f08c108237d76fc1b42024289b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 00:42:22 +0100 Subject: [PATCH 19/58] lib.strings: isMoreCoercibleString -> isConvertibleWithToString Yes, this function name is inconveniently long, but it is important for the name to explicitly reference the function and not be mistaken for the implicit string conversions, which only happen for a smaller set of values. --- lib/strings.nix | 11 ++++++----- nixos/modules/services/misc/nix-daemon.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index 0130ea37fb1b..89574bc8367c 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -798,19 +798,20 @@ rec { in lib.warnIf (!precise) "Imprecise conversion from float to string ${result}" result; - /* Soft-deprecated name for isMoreCoercibleToString */ + /* Soft-deprecated function. While the original implementation is available as + isConvertibleWithToString, consider using isStringLike instead, if suitable. */ isCoercibleToString = lib.warnIf (lib.isInOldestRelease 2305) - "lib.strings.isCoercibleToString is deprecated in favor of either isStringLike or isMoreCoercibleString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." - isMoreCoercibleToString; + "lib.strings.isCoercibleToString is deprecated in favor of either isStringLike or isConvertibleWithToString. Only use the latter if it needs to return true for null, numbers, booleans and list of similarly coercibles." + isConvertibleWithToString; /* Check whether a list or other value can be passed to toString. Many types of value are coercible to string this way, including int, float, null, bool, list of similarly coercible values. */ - isMoreCoercibleToString = x: + isConvertibleWithToString = x: elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] || - (isList x && lib.all isMoreCoercibleToString x) || + (isList x && lib.all isConvertibleWithToString x) || x ? outPath || x ? __toString; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 98d5150f2436..9863cc8e574c 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -42,7 +42,7 @@ let else if isDerivation v then toString v else if builtins.isPath v then toString v else if isString v then v - else if strings.isMoreCoercibleToString v then toString v + else if strings.isConvertibleWithToString v then toString v else abort "The nix conf value: ${toPretty {} v} can not be encoded"; mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}"; From 23c25d5231856e8cfd60049582c865da97bc5d44 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 00:49:04 +0100 Subject: [PATCH 20/58] lib.strings.isConvertibleWithToString: Refactor to reuse isStringLike --- lib/strings.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index 89574bc8367c..db89f60c480c 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -810,10 +810,9 @@ rec { null, bool, list of similarly coercible values. */ isConvertibleWithToString = x: - elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] || - (isList x && lib.all isConvertibleWithToString x) || - x ? outPath || - x ? __toString; + isStringLike x || + elem (typeOf x) [ "null" "int" "float" "bool" ] || + (isList x && lib.all isConvertibleWithToString x); /* Check whether a value can be coerced to a string. The value must be a string, path, or attribute set. From d0d0f7d0aaf1ea29f6fe269340186de12d697dea Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 00:53:24 +0100 Subject: [PATCH 21/58] lib: Add isPath Available since Nix 2.3, which is the Nixpkgs minimum version. Thanks zimbatm! --- lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index 68e5b8dea1eb..a6da4f4bda0f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -63,7 +63,7 @@ let inherit (builtins) add addErrorContext attrNames concatLists deepSeq elem elemAt filter genericClosure genList getAttr - hasAttr head isAttrs isBool isInt isList isString length + hasAttr head isAttrs isBool isInt isList isPath isString length lessThan listToAttrs pathExists readFile replaceStrings seq stringLength sub substring tail trace; inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor From d103811173b7b608b2639af61d422736bf715a8e Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 00:58:34 +0100 Subject: [PATCH 22/58] lib.isStringLike: Remove use of list In the current implementation of Nix, this list would be allocated over and over. Iirc pennae tried to optimize static list allocation, but gained no significant performance improvement. --- lib/strings.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index db89f60c480c..2188fcb1dbfd 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -18,6 +18,7 @@ rec { isInt isList isAttrs + isPath isString match parseDrvName @@ -821,7 +822,8 @@ rec { string interpolations and in most functions that expect a string. */ isStringLike = x: - elem (typeOf x) [ "path" "string" ] || + isString x || + isPath x || x ? outPath || x ? __toString; From cb98e26aaff781ed48a1885e7a6423708fb564b8 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 31 Dec 2022 01:47:28 +0100 Subject: [PATCH 23/58] lib: Add isStringLike --- lib/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index a6da4f4bda0f..f0f136adbc41 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -96,14 +96,16 @@ let concatImapStringsSep makeSearchPath makeSearchPathOutput makeLibraryPath makeBinPath optionalString hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape - escapeShellArg escapeShellArgs isValidPosixName toShellVar toShellVars + escapeShellArg escapeShellArgs + isStorePath isStringLike + isValidPosixName toShellVar toShellVars escapeRegex escapeXML replaceChars lowerChars upperChars toLower toUpper addContextFrom splitString removePrefix removeSuffix versionOlder versionAtLeast getName getVersion mesonOption mesonBool mesonEnable nameFromURL enableFeature enableFeatureAs withFeature - withFeatureAs fixedWidthString fixedWidthNumber isStorePath + withFeatureAs fixedWidthString fixedWidthNumber toInt toIntBase10 readPathsFromFile fileContents; inherit (self.stringsWithDeps) textClosureList textClosureMap noDepEntry fullDepEntry packEntry stringAfter; From e2d79ecb3077db28812b2b8c41dc79ae954f6a07 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 30 Dec 2022 23:38:55 -0500 Subject: [PATCH 24/58] cargo-tally: 1.0.20 -> 1.0.21 --- pkgs/development/tools/rust/cargo-tally/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-tally/default.nix b/pkgs/development/tools/rust/cargo-tally/default.nix index b17d36f00d4c..e2fde75ba829 100644 --- a/pkgs/development/tools/rust/cargo-tally/default.nix +++ b/pkgs/development/tools/rust/cargo-tally/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "cargo-tally"; - version = "1.0.20"; + version = "1.0.21"; src = fetchCrate { inherit pname version; - sha256 = "sha256-fhZR8bP8hSCkghRL0uOR0GBeIQtDa2+vzpsjgZq7yio="; + sha256 = "sha256-YEsgXIZ4R2w0HOkTV8LOGi2g32nHRs63nhk9yVR4vak="; }; - cargoSha256 = "sha256-7446cO7DkHy2PAPQg+nlwrHxBQhQh5AUOu+jXLKo61U="; + cargoSha256 = "sha256-jLbYC862fZONvMHh0CLsiuUmn/hmAF6sRLuav3P+bck="; buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ DiskArbitration From 6fdbfe5abe0e53f54631a489f4b927579d4a7d5c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 31 Dec 2022 13:56:10 +0000 Subject: [PATCH 25/58] eartag: 0.2.1 -> 0.3.1 --- pkgs/applications/audio/eartag/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/eartag/default.nix b/pkgs/applications/audio/eartag/default.nix index aad765041e4b..0db9da5d2161 100644 --- a/pkgs/applications/audio/eartag/default.nix +++ b/pkgs/applications/audio/eartag/default.nix @@ -18,14 +18,14 @@ python3Packages.buildPythonApplication rec { pname = "eartag"; - version = "0.2.1"; + version = "0.3.1"; format = "other"; src = fetchFromGitHub { owner = "knuxify"; repo = pname; - rev = version; - sha256 = "sha256-TlY2F2y7ZZ9f+vkYYkES5zoIGcuTWP1+rOJI62wc4SU="; + rev = "refs/tags/${version}"; + sha256 = "sha256-gN3V5ZHlhHp52Jg/i+hDLEDpSvP8yFngujyw5ZncQQg="; }; postPatch = '' From e85943f32e72a94fe88bdaaa9801fa56eed53c22 Mon Sep 17 00:00:00 2001 From: Moritz 'e1mo' Fromm Date: Sat, 31 Dec 2022 15:53:30 +0100 Subject: [PATCH 26/58] prometheus-xmpp-alerts: Fix broken binary The binary was broken after the update to 0.5.6 (#205559) due to a regression in upstream (the module name was changed but not updated in the appropriate entrypoint). A patch is applied until fixed in upstream. A very simple test should detect future regressions like this and prevent breaking the package and associated module. --- .../monitoring/prometheus/xmpp-alerts.nix | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix b/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix index af5f631a8d78..2a1368bfcbea 100644 --- a/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix +++ b/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix @@ -2,6 +2,9 @@ , fetchFromGitHub , python3Packages , prometheus-alertmanager +, fetchpatch +, runCommand +, prometheus-xmpp-alerts }: python3Packages.buildPythonApplication rec { @@ -15,6 +18,16 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-PwShGS1rbfZCK5OS6Cnn+mduOpWAD4fC69mcGB5GB1c="; }; + patches = [ + # Required until https://github.com/jelmer/prometheus-xmpp-alerts/pull/33 is merged + # and contained in a release + (fetchpatch { + name = "Fix-outdated-entrypoint-definiton.patch"; + url = "https://github.com/jelmer/prometheus-xmpp-alerts/commit/c41dd41dbd3c781b874bcf0708f6976e6252b621.patch"; + hash = "sha256-G7fRLSXbkI5EDgGf4n9xSVs54IPD0ev8rTEFffRvLY0="; + }) + ]; + postPatch = '' substituteInPlace setup.cfg \ --replace "bs4" "beautifulsoup4" @@ -39,6 +52,14 @@ python3Packages.buildPythonApplication rec { pythonImportsCheck = [ "prometheus_xmpp" ]; + passthru.tests = { + binaryWorks = runCommand "${pname}-binary-test" {} '' + # Running with --help to avoid it erroring due to a missing config file + ${prometheus-xmpp-alerts}/bin/prometheus-xmpp-alerts --help | tee $out + grep "usage: prometheus-xmpp-alerts" $out + ''; + }; + meta = { description = "XMPP Web hook for Prometheus"; homepage = "https://github.com/jelmer/prometheus-xmpp-alerts"; From bab5a9ca87e0fbbb8a44378ca12b678655273848 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 30 Dec 2022 14:42:29 +0100 Subject: [PATCH 27/58] xnec2c: init at 4.4.12 --- .../science/physics/xnec2c/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/applications/science/physics/xnec2c/default.nix diff --git a/pkgs/applications/science/physics/xnec2c/default.nix b/pkgs/applications/science/physics/xnec2c/default.nix new file mode 100644 index 000000000000..47fb7cf61df9 --- /dev/null +++ b/pkgs/applications/science/physics/xnec2c/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchurl +, autoreconfHook +, pkg-config +, which +, gtk3 +, blas +, lapack +}: + +assert (!blas.isILP64) && (!lapack.isILP64); + +stdenv.mkDerivation rec { + pname = "xnec2c"; + version = "4.4.12"; + + src = fetchurl { + url = "https://www.xnec2c.org/releases/${pname}-v${version}.tar.gz"; + hash = "sha256-6Yrx6LkJjfnMA/kJUDWLhGzGopZeecARSrcR++UScsU="; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config which ]; + buildInputs = [ gtk3 blas lapack ]; + + meta = with lib; { + homepage = "https://www.xnec2c.org/"; + description = "Graphical antenna simulation"; + license = licenses.gpl3; + maintainers = with maintainers; [ mvs ]; + platforms = platforms.unix; + + # Darwin support likely to be fixed upstream in the next release + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e2a6a76198c..f71dc2e4ec81 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36027,6 +36027,8 @@ with pkgs; xflr5 = libsForQt5.callPackage ../applications/science/physics/xflr5 { }; + xnec2c = callPackage ../applications/science/physics/xnec2c { }; + ### SCIENCE/PROGRAMMING dafny = dotnetPackages.Dafny; From b75e7815790b383fccdfca4ba703b16cd0467cf3 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 31 Dec 2022 23:40:37 +0100 Subject: [PATCH 28/58] furnace: 0.6pre2 -> 0.6pre3 --- pkgs/applications/audio/furnace/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index 31defdeb2f5e..0f15775b38d5 100644 --- a/pkgs/applications/audio/furnace/default.nix +++ b/pkgs/applications/audio/furnace/default.nix @@ -21,14 +21,14 @@ stdenv.mkDerivation rec { pname = "furnace"; - version = "0.6pre2"; + version = "0.6pre3"; src = fetchFromGitHub { owner = "tildearrow"; repo = "furnace"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "sha256-ydywnlZ6HEcTiBIB92yduCzPsOljvypP1KpCVjETzBc="; + sha256 = "sha256-bHVeTw69k6LLcrfkmGxvjlFfR/hWiCfm/P3utknid1o="; }; nativeBuildInputs = [ From 1d63f8c009883643630ef9f3a7986fae721ab201 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 31 Dec 2022 23:58:39 +0000 Subject: [PATCH 29/58] litefs: 0.2.0 -> 0.3.0 --- pkgs/development/tools/database/litefs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/database/litefs/default.nix b/pkgs/development/tools/database/litefs/default.nix index 4589ab21ef80..481ee47c7246 100644 --- a/pkgs/development/tools/database/litefs/default.nix +++ b/pkgs/development/tools/database/litefs/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "litefs"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "superfly"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Gh1GcIsRNfAwQ2HJq82IlyUHPyaDpA3CpBe4glBbU/I="; + sha256 = "sha256-fNZ0PtgMgCGB1b1HLJsmbm/I8wa3auHimL1ktf6wA9M="; }; - vendorSha256 = "sha256-dXCyBY4k9Gxsy/7UwkWFTxihZnFkZGrZKgw9pHD8jco="; + vendorSha256 = "sha256-w77JQNk1QZFJVrn9yuvKOemggV9e0FuqhVWK3d4umuY="; subPackages = [ "cmd/litefs" ]; From 51b1d853951e21200ec6ed5d7dd969cbaf25c0bc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 00:29:15 +0000 Subject: [PATCH 30/58] tflint: 0.43.0 -> 0.44.1 --- pkgs/development/tools/analysis/tflint/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/analysis/tflint/default.nix b/pkgs/development/tools/analysis/tflint/default.nix index 4531a1661afe..bb3d37f4f876 100644 --- a/pkgs/development/tools/analysis/tflint/default.nix +++ b/pkgs/development/tools/analysis/tflint/default.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "tflint"; - version = "0.43.0"; + version = "0.44.1"; src = fetchFromGitHub { owner = "terraform-linters"; repo = pname; rev = "v${version}"; - sha256 = "sha256-a5rTG+4qObdmInVZH8QkMdWmRrDA9ZUl2NL5p53D2MY="; + sha256 = "sha256-O758CU70NqRFlbtiy5cmfIHiHdQLxH88BHNZLQVvZ+M="; }; - vendorSha256 = "sha256-hdevIQ0Ugn7+MtvNbF+HjJAMyBtGYuJPCFFcxS8p35E="; + vendorSha256 = "sha256-4ODf6Er7V5KsVUdWjqjv+dfH84PPR+5T29V1AJluoJA="; doCheck = false; From 82319d48dbcbba3648b153842e3119d9fcbf523a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 01:10:39 +0000 Subject: [PATCH 31/58] whois: 5.5.14 -> 5.5.15 --- pkgs/tools/networking/whois/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix index b1ce1a7b7f6a..e05768eeeb6e 100644 --- a/pkgs/tools/networking/whois/default.nix +++ b/pkgs/tools/networking/whois/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, perl, gettext, pkg-config, libidn2, libiconv }: stdenv.mkDerivation rec { - version = "5.5.14"; + version = "5.5.15"; pname = "whois"; src = fetchFromGitHub { owner = "rfc1036"; repo = "whois"; rev = "v${version}"; - sha256 = "sha256-UTUsuu/CGWhx9zYr7ppnJd7pumb6nGEyVwtJwC0loZ0="; + sha256 = "sha256-kx9Rl4w44zNDSfCMn5PEmQ1jP0Zxa/fYPlZPQnAp4xI="; }; nativeBuildInputs = [ perl gettext pkg-config ]; From 49647234f03b3c5d7b5eeefb534bfe61ceb1c74e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 04:57:00 +0000 Subject: [PATCH 32/58] python39Packages.schema-salad: 8.3.20220913105718 -> 8.3.20221209165047 --- pkgs/development/python-modules/schema-salad/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/schema-salad/default.nix b/pkgs/development/python-modules/schema-salad/default.nix index ae1627f888f3..f537c3a287a8 100644 --- a/pkgs/development/python-modules/schema-salad/default.nix +++ b/pkgs/development/python-modules/schema-salad/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "schema-salad"; - version = "8.3.20220913105718"; + version = "8.3.20221209165047"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-18/xLIq1+yM8iQBIeXvRIO4A5GqZS/3qOKXmi439+sQ="; + hash = "sha256-2XzJpNfEJV64AAvOuqisDR0xgBySH9QROrMFHB4ybHw="; }; nativeBuildInputs = [ From ee8eebcbe4e0a0f7f5b03e1432b53b09f9632355 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 05:29:01 +0000 Subject: [PATCH 33/58] python310Packages.beancount-parser: 0.1.21 -> 0.1.23 --- .../development/python-modules/beancount-parser/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/beancount-parser/default.nix b/pkgs/development/python-modules/beancount-parser/default.nix index 743fcec49f93..7edee9070a68 100644 --- a/pkgs/development/python-modules/beancount-parser/default.nix +++ b/pkgs/development/python-modules/beancount-parser/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "beancount-parser"; - version = "0.1.21"; + version = "0.1.23"; disabled = pythonOlder "3.9"; format = "pyproject"; @@ -17,8 +17,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "LaunchPlatform"; repo = "beancount-parser"; - rev = version; - sha256 = "sha256-0uhH75OEjC9iA0XD0VX7CGoRIP/hpM4y+53JnyXgZpA="; + rev = "refs/tags/${version}"; + sha256 = "sha256-3pO1HvH3R2RpNFtplWyaXxqZy0caAoAxlmfSKmjkvKQ="; }; buildInputs = [ From 90bd77b1df27a238b2d8f862197d26b683d665c9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 06:22:46 +0000 Subject: [PATCH 34/58] python310Packages.hcloud: 1.18.1 -> 1.18.2 --- pkgs/development/python-modules/hcloud/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hcloud/default.nix b/pkgs/development/python-modules/hcloud/default.nix index c7ded7a7e0a1..d1039bb472de 100644 --- a/pkgs/development/python-modules/hcloud/default.nix +++ b/pkgs/development/python-modules/hcloud/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "hcloud"; - version = "1.18.1"; + version = "1.18.2"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-nhz9fJEcYyt7rhIe0AkYPgG/mV0r87KUj/mM2A70rPE="; + hash = "sha256-N71bpWOH48SRxbq9PgirkdXwOQzV6IDk3+oZ4haBvJ4="; }; propagatedBuildInputs = [ From a52297f256151c9a1334f77eee804b4829378f1b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 07:17:43 +0000 Subject: [PATCH 35/58] moar: 1.11.1 -> 1.11.2 --- pkgs/tools/misc/moar/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/moar/default.nix b/pkgs/tools/misc/moar/default.nix index 24e64db8dd90..50c2a1f4fdc4 100644 --- a/pkgs/tools/misc/moar/default.nix +++ b/pkgs/tools/misc/moar/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "moar"; - version = "1.11.1"; + version = "1.11.2"; src = fetchFromGitHub { owner = "walles"; repo = pname; rev = "v${version}"; - sha256 = "sha256-jIxZAslqkQU51O9ZSvlVZ3sCZpFYQTtuPpS2tEXXLzo="; + sha256 = "sha256-UzgGJrnckiuUT4JYSTQ4TargO4B2sjVMMOYygg7wGps="; }; - vendorSha256 = "sha256-RfkY66879Us0UudplMzW8xEC1zs+2OXwyB+nBim3I0I="; + vendorSha256 = "sha256-XexIBg49gK+b2Zef5eR7NfqFZHPp5DXhlcC3Loh6PfI="; nativeBuildInputs = [ installShellFiles ]; From 7cead1ff76606c66fb9e2108a66b21adede23b44 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 07:43:46 +0000 Subject: [PATCH 36/58] sleuthkit: 4.11.1 -> 4.12.0 --- pkgs/tools/system/sleuthkit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/sleuthkit/default.nix b/pkgs/tools/system/sleuthkit/default.nix index 49fabf2856de..4283c281b0b6 100644 --- a/pkgs/tools/system/sleuthkit/default.nix +++ b/pkgs/tools/system/sleuthkit/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, libewf, afflib, openssl, zlib, openjdk, perl, ant }: stdenv.mkDerivation rec { - version = "4.11.1"; + version = "4.12.0"; pname = "sleuthkit"; sleuthsrc = fetchFromGitHub { owner = "sleuthkit"; repo = "sleuthkit"; rev = "${pname}-${version}"; - sha256 = "sha256-TM8My4dAZigukwMUNDnP3aVCQ8JDdVv/KNkchDvCl9I="; + sha256 = "sha256-NX7LNtor7UQJ6HCDz9wGpxbqrLQTTH9+543hOaQOAz4="; }; # Fetch libraries using a fixed output derivation From 3296813f01a3464420f716c829d96ed5303ebf71 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 09:45:50 +0000 Subject: [PATCH 37/58] python310Packages.pdf2image: 1.16.0 -> 1.16.2 --- pkgs/development/python-modules/pdf2image/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pdf2image/default.nix b/pkgs/development/python-modules/pdf2image/default.nix index f2ed6e7a297c..c2340b27d1c4 100644 --- a/pkgs/development/python-modules/pdf2image/default.nix +++ b/pkgs/development/python-modules/pdf2image/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "pdf2image"; - version = "1.16.0"; + version = "1.16.2"; propagatedBuildInputs = [ pillow ]; src = fetchPypi { inherit pname version; - sha256 = "d58ed94d978a70c73c2bb7fdf8acbaf2a7089c29ff8141be5f45433c0c4293bb"; + sha256 = "sha256-hnYQke7jX0ZB6pjf3bJUJUNh0Bi+aYoZmv98HTczGAM="; }; postPatch = '' From cd3f53759d2a4fd72d3c620b1e1764fe27aef98c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 10:27:37 +0000 Subject: [PATCH 38/58] python310Packages.pysmbc: 1.0.23 -> 1.0.24 --- pkgs/development/python-modules/pysmbc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysmbc/default.nix b/pkgs/development/python-modules/pysmbc/default.nix index 93aa6606c7d5..49222cbaf308 100644 --- a/pkgs/development/python-modules/pysmbc/default.nix +++ b/pkgs/development/python-modules/pysmbc/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "pysmbc"; - version = "1.0.23"; + version = "1.0.24"; src = fetchPypi { inherit pname version; - sha256 = "1y0n1n6jkzf4mr5lqfc73l2m0qp56gvxwfjnx2vj8c0hh5i1gnq8"; + sha256 = "sha256-zq3o1hHmPXKnXSYrNCptyDa2+AqzjqX9WtRD4ve+LO0="; }; nativeBuildInputs = [ pkg-config ]; From faf1736dc409d24016968dd5f7763fa8292ce88f Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Sun, 1 Jan 2023 13:23:08 +0200 Subject: [PATCH 39/58] COPYING: 2022 -> 2023 --- COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYING b/COPYING index 65ac1feaf010..93cbc590f450 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2003-2022 Eelco Dolstra and the Nixpkgs/NixOS contributors +Copyright (c) 2003-2023 Eelco Dolstra and the Nixpkgs/NixOS contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From acee67447e13badbe75a796b0fa7a5040028d9dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 13:36:57 +0100 Subject: [PATCH 40/58] python310Packages.pysmbc: disable on unsupported Python releases --- .../python-modules/pysmbc/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pysmbc/default.nix b/pkgs/development/python-modules/pysmbc/default.nix index 49222cbaf308..f2c1c8dc285d 100644 --- a/pkgs/development/python-modules/pysmbc/default.nix +++ b/pkgs/development/python-modules/pysmbc/default.nix @@ -8,19 +8,29 @@ buildPythonPackage rec { pname = "pysmbc"; version = "1.0.24"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-zq3o1hHmPXKnXSYrNCptyDa2+AqzjqX9WtRD4ve+LO0="; + hash = "sha256-zq3o1hHmPXKnXSYrNCptyDa2+AqzjqX9WtRD4ve+LO0="; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ]; - buildInputs = [ samba ]; + buildInputs = [ + samba + ]; # Tests would require a local SMB server doCheck = false; - pythonImportsCheck = [ "smbc" ]; + + pythonImportsCheck = [ + "smbc" + ]; meta = with lib; { description = "libsmbclient binding for Python"; From 7e7a2856a2527b53edb0adedf1e4849568708e2e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 13:46:55 +0100 Subject: [PATCH 41/58] python310Packages.pysmbc: add missing input --- pkgs/development/python-modules/pysmbc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/pysmbc/default.nix b/pkgs/development/python-modules/pysmbc/default.nix index f2c1c8dc285d..eace43f38d1b 100644 --- a/pkgs/development/python-modules/pysmbc/default.nix +++ b/pkgs/development/python-modules/pysmbc/default.nix @@ -3,6 +3,7 @@ , fetchPypi , samba , pkg-config +, pythonOlder }: buildPythonPackage rec { From 2c83122c1877b20728c8ae97faddbf2166f105cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Tue, 6 Dec 2022 18:15:20 +0100 Subject: [PATCH 42/58] treewide: fix broken `meta` attributes --- pkgs/applications/misc/keepass-plugins/otpkeyprov/default.nix | 2 +- pkgs/games/quake3/quake3e/default.nix | 2 +- pkgs/os-specific/linux/kernel/linux-rpi.nix | 4 ++-- pkgs/tools/security/onlykey-agent/default.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/keepass-plugins/otpkeyprov/default.nix b/pkgs/applications/misc/keepass-plugins/otpkeyprov/default.nix index 780de142c5fd..abed55d91593 100644 --- a/pkgs/applications/misc/keepass-plugins/otpkeyprov/default.nix +++ b/pkgs/applications/misc/keepass-plugins/otpkeyprov/default.nix @@ -17,7 +17,7 @@ let homepage = "https://keepass.info/plugins.html#otpkeyprov"; platforms = with lib.platforms; linux; license = lib.licenses.gpl2; - maintainers = [ lib.maintainers.ente ]; + maintainers = [ lib.maintainers.Enteee ]; }; pluginFilename = "OtpKeyProv.plgx"; diff --git a/pkgs/games/quake3/quake3e/default.nix b/pkgs/games/quake3/quake3e/default.nix index 5303d679be17..0c57c97bbe90 100644 --- a/pkgs/games/quake3/quake3e/default.nix +++ b/pkgs/games/quake3/quake3e/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ pmiddend ]; - badPlatforms = [ platforms.aarch64 ]; + badPlatforms = platforms.aarch64; # never built on aarch64-linux since first introduction in nixpkgs broken = stdenv.isLinux && stdenv.isAarch64; }; diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index ef742be0de84..cd0db1f1eff2 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -41,10 +41,10 @@ lib.overrideDerivation (buildLinux (args // { ''; extraMeta = if (rpiVersion < 3) then { - platforms = with lib.platforms; [ arm ]; + platforms = with lib.platforms; arm; hydraPlatforms = []; } else { - platforms = with lib.platforms; [ arm aarch64 ]; + platforms = with lib.platforms; arm ++ aarch64; hydraPlatforms = [ "aarch64-linux" ]; }; } // (args.argsOverride or {}))) (oldAttrs: { diff --git a/pkgs/tools/security/onlykey-agent/default.nix b/pkgs/tools/security/onlykey-agent/default.nix index 8be0971f964e..86095191973f 100644 --- a/pkgs/tools/security/onlykey-agent/default.nix +++ b/pkgs/tools/security/onlykey-agent/default.nix @@ -38,7 +38,7 @@ let meta = oa.meta // { description = "Using OnlyKey as hardware SSH and GPG agent"; homepage = "https://github.com/trustcrypto/onlykey-agent/tree/ledger"; - maintainers = with maintainers; [ kalbasit ]; + maintainers = with lib.maintainers; [ kalbasit ]; }; }); in From 4df10debe79feba975631347b25f8699b7cd3554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Tue, 6 Dec 2022 18:51:29 +0100 Subject: [PATCH 43/58] lib/customisation.overrideDerivation: propagate evaluation condition The new derivation should evaluate only if the old derivation does. Sadly this means that the old derivation cannot depend on the new one any more, which was used by xorgserver on Darwin. But this is not a problem as `overrideAttrs` can (and should) usually be used instead. This change allowed catching an invalid `meta.platforms` in the linux_rpi kernels, which use `overrideDerivation`. --- doc/using/overrides.chapter.md | 2 +- lib/customisation.nix | 10 +++++++++- pkgs/servers/x11/xorg/overrides.nix | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/using/overrides.chapter.md b/doc/using/overrides.chapter.md index 1c51d27ecedc..198b4504197d 100644 --- a/doc/using/overrides.chapter.md +++ b/doc/using/overrides.chapter.md @@ -63,7 +63,7 @@ You should prefer `overrideAttrs` in almost all cases, see its documentation for ::: ::: {.warning} -Do not use this function in Nixpkgs as it evaluates a Derivation before modifying it, which breaks package abstraction and removes error-checking of function arguments. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`. +Do not use this function in Nixpkgs as it evaluates a derivation before modifying it, which breaks package abstraction. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`. ::: The function `overrideDerivation` creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the `makeOverridable` function. Most standard derivation-producing functions, such as `stdenv.mkDerivation`, are defined using this function, which means most packages in the nixpkgs expression, `pkgs`, have this function. diff --git a/lib/customisation.nix b/lib/customisation.nix index bd7ee3c83b8c..7ba8ed06180b 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -27,11 +27,19 @@ rec { For another application, see build-support/vm, where this function is used to build arbitrary derivations inside a QEMU virtual machine. + + Note that in order to preserve evaluation errors, the new derivation's + outPath depends on the old one's, which means that this function cannot + be used in circular situations when the old derivation also depends on the + new one. + + You should in general prefer `drv.overrideAttrs` over this function; + see the nixpkgs manual for more information on overriding. */ overrideDerivation = drv: f: let newDrv = derivation (drv.drvAttrs // (f drv)); - in lib.flip (extendDerivation true) newDrv ( + in lib.flip (extendDerivation (builtins.seq drv.drvPath true)) newDrv ( { meta = drv.meta or {}; passthru = if drv ? passthru then drv.passthru else {}; } diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index ddd5acad7a1a..8b3129f5ae21 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -11,7 +11,6 @@ let inherit (stdenv) isDarwin; - inherit (lib) overrideDerivation; malloc0ReturnsNullCrossFlag = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) @@ -761,7 +760,7 @@ self: super: ]; # XQuartz requires two compilations: the first to get X / XQuartz, # and the second to get Xvfb, Xnest, etc. - darwinOtherX = overrideDerivation xorgserver (oldAttrs: { + darwinOtherX = xorgserver.overrideAttrs (oldAttrs: { configureFlags = oldAttrs.configureFlags ++ [ "--disable-xquartz" "--enable-xorg" From 4af22aab8e239b1ca28da851755c6da1a35fc91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sun, 18 Dec 2022 12:42:43 +0100 Subject: [PATCH 44/58] stdenv/check-meta: do deep type checks Use a wrapper around `mergeDefinitions` to type-check values deeply, so that e.g. `maintainers = [ 42 ];` is an error. --- lib/generators.nix | 6 ++-- pkgs/stdenv/generic/check-meta.nix | 56 ++++++++++++++++-------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/lib/generators.nix b/lib/generators.nix index 4c9c2d1e9869..968331a0ebde 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -289,7 +289,9 @@ rec { (This means fn is type Val -> String.) */ allowPrettyValues ? false, /* If this option is true, the output is indented with newlines for attribute sets and lists */ - multiline ? true + multiline ? true, + /* Initial indentation level */ + indent ? "" }: let go = indent: v: with builtins; @@ -348,7 +350,7 @@ rec { };") v) + outroSpace + "}" else abort "generators.toPretty: should never happen (v = ${v})"; - in go ""; + in go indent; # PLIST handling toPlist = {}: v: let diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 56390dc3627b..83557f995af3 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -247,16 +247,16 @@ let isEnabled = lib.findFirst (x: x == reason) null showWarnings; in if isEnabled != null then builtins.trace msg true else true; + # Deep type-checking. Note that calling `type.check` is not enough: see `lib.mkOptionType`'s documentation. + # We don't include this in lib for now because this function is flawed: it accepts things like `mkIf true 42`. + typeCheck = type: value: let + merged = lib.mergeDefinitions [ ] type [ + { file = lib.unknownModule; inherit value; } + ]; + eval = builtins.tryEval (builtins.deepSeq merged.mergedValue null); + in eval.success; - # A shallow type check. We are using NixOS' - # option types here, which however have the major drawback - # of not providing full type checking (part of the type check is - # done by the module evaluation itself). Therefore, the checks - # will not recurse into attributes. - # We still provide the full type for documentation - # purposes and in the hope that they will be used eventually. - # See https://github.com/NixOS/nixpkgs/pull/191171 for an attempt - # to fix this, or mkOptionType in lib/types.nix for more information. + # TODO make this into a proper module and use the generic option documentation generation? metaTypes = with lib.types; rec { # These keys are documented description = str; @@ -266,9 +266,11 @@ let homepage = either (listOf str) str; downloadPage = str; changelog = either (listOf str) str; - license = either (listOf lib.types.attrs) (either lib.types.attrs str); - sourceProvenance = either (listOf lib.types.attrs) lib.types.attrs; - maintainers = listOf (attrsOf str); + license = let + licenseType = either (attrsOf anything) str; # TODO disallow `str` licenses, use a module + in either licenseType (listOf licenseType); + sourceProvenance = either (listOf (attrsOf anything)) (attrsOf anything); + maintainers = listOf (attrsOf anything); # TODO use the maintainer type from lib/tests/maintainer-module.nix priority = int; platforms = listOf str; hydraPlatforms = listOf str; @@ -310,16 +312,16 @@ let badPlatforms = platforms; }; - # WARNING: this does not check inner values of the attribute, like list elements or nested attributes. - # See metaTypes above and mkOptionType in lib/types.nix for more information checkMetaAttr = k: v: if metaTypes?${k} then - if metaTypes.${k}.check v then + if typeCheck metaTypes.${k} v then null else - "key 'meta.${k}' has a value of invalid type ${builtins.typeOf v}; expected ${metaTypes.${k}.description}" + "key 'meta.${k}' has invalid value; expected ${metaTypes.${k}.description}, got\n ${ + lib.generators.toPretty { indent = " "; } v + }" else - "key 'meta.${k}' is unrecognized; expected one of: \n\t [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]"; + "key 'meta.${k}' is unrecognized; expected one of: \n [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]"; checkMeta = meta: if config.checkMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else []; checkOutputsToInstall = attrs: let @@ -333,25 +335,27 @@ let # Check if a derivation is valid, that is whether it passes checks for # e.g brokenness or license. # - # Return { valid: Bool } and additionally + # Return { valid: "yes", "warn" or "no" } and additionally # { reason: String; errormsg: String } if it is not valid, where # reason is one of "unfree", "blocklisted", "broken", "insecure", ... + # !!! reason strings are hardcoded into OfBorg, make sure to keep them in sync # Along with a boolean flag for each reason checkValidity = attrs: - { + # Check meta attribute types first, to make sure it is always called even when there are other issues + # Note that this is not a full type check and functions below still need to by careful about their inputs! + let res = checkMeta (attrs.meta or {}); in if res != [] then + { valid = "no"; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n - " + x) res}\n"; + unfree = false; nonSource = false; broken = false; unsupported = false; insecure = false; + } + else { unfree = hasUnfreeLicense attrs; nonSource = hasNonSourceProvenance attrs; broken = isMarkedBroken attrs; unsupported = hasUnsupportedPlatform attrs; insecure = isMarkedInsecure attrs; - } - // ( - # Check meta attribute types first, to make sure it is always called even when there are other issues - # Note that this is not a full type check and functions below still need to by careful about their inputs! - let res = checkMeta (attrs.meta or {}); in if res != [] then - { valid = "no"; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n\t - " + x) res}"; } + } // ( # --- Put checks that cannot be ignored here --- - else if checkOutputsToInstall attrs then + if checkOutputsToInstall attrs then { valid = "no"; reason = "broken-outputs"; errormsg = "has invalid meta.outputsToInstall"; } # --- Put checks that can be ignored here --- From 91e936ef2e5cf4268b2c2a8cf432fedb95ff04e2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 12:49:30 +0000 Subject: [PATCH 45/58] pwntools: 4.8.0 -> 4.9.0 --- pkgs/development/python-modules/pwntools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 35ad60317ad4..a9b5b7f0ae6d 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -28,12 +28,12 @@ let debuggerName = lib.strings.getName debugger; in buildPythonPackage rec { - version = "4.8.0"; + version = "4.9.0"; pname = "pwntools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-QgUuLYg3EOTh2gQekWdabXGftOXvLdJFyyhT2hEmkpA="; + sha256 = "sha256-7qZ9GC+RcEiDkpmNmy8d67dYiTgFBVAfB3B2RfrH5xI="; }; postPatch = '' From 13d44488ec55a536934d05632ce20732e9ffdf9e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 14:54:30 +0100 Subject: [PATCH 46/58] python310Packages.hcloud: add changelog to meta --- pkgs/development/python-modules/hcloud/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/hcloud/default.nix b/pkgs/development/python-modules/hcloud/default.nix index d1039bb472de..e8bcfe0ec77b 100644 --- a/pkgs/development/python-modules/hcloud/default.nix +++ b/pkgs/development/python-modules/hcloud/default.nix @@ -39,6 +39,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library for the Hetzner Cloud API"; homepage = "https://github.com/hetznercloud/hcloud-python"; + changelog = "https://github.com/hetznercloud/hcloud-python/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ liff ]; }; From 4e6337bdce10d6912ae031747fdce493399ea5a4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 1 Jan 2023 14:55:34 +0100 Subject: [PATCH 47/58] workflows/periodic-merge: Remove 22.05 jobs --- .github/workflows/periodic-merge-24h.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/periodic-merge-24h.yml b/.github/workflows/periodic-merge-24h.yml index 44892f926eb7..6d6bbb7e1499 100644 --- a/.github/workflows/periodic-merge-24h.yml +++ b/.github/workflows/periodic-merge-24h.yml @@ -38,10 +38,6 @@ jobs: into: staging-next-22.11 - from: staging-next-22.11 into: staging-22.11 - - from: release-22.05 - into: staging-next-22.05 - - from: staging-next-22.05 - into: staging-22.05 name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }} steps: - uses: actions/checkout@v3 From 50281bc4c399f9b8b99e11beb3901031b0c3e7bb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 14:55:45 +0100 Subject: [PATCH 48/58] python310Packages.beancount-parser: add changelog to emta --- pkgs/development/python-modules/beancount-parser/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/beancount-parser/default.nix b/pkgs/development/python-modules/beancount-parser/default.nix index 7edee9070a68..f437c4f1d9fd 100644 --- a/pkgs/development/python-modules/beancount-parser/default.nix +++ b/pkgs/development/python-modules/beancount-parser/default.nix @@ -10,15 +10,15 @@ buildPythonPackage rec { pname = "beancount-parser"; version = "0.1.23"; + format = "pyproject"; disabled = pythonOlder "3.9"; - format = "pyproject"; src = fetchFromGitHub { owner = "LaunchPlatform"; repo = "beancount-parser"; rev = "refs/tags/${version}"; - sha256 = "sha256-3pO1HvH3R2RpNFtplWyaXxqZy0caAoAxlmfSKmjkvKQ="; + hash = "sha256-3pO1HvH3R2RpNFtplWyaXxqZy0caAoAxlmfSKmjkvKQ="; }; buildInputs = [ @@ -40,6 +40,7 @@ buildPythonPackage rec { meta = with lib; { description = "Standalone Lark based Beancount syntax parser"; homepage = "https://github.com/LaunchPlatform/beancount-parser/"; + changelog = "https://github.com/LaunchPlatform/beancount-parser/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ ambroisie ]; }; From 192f844477576976f737fad3ace1c9d555d360b9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 1 Jan 2023 14:57:25 +0100 Subject: [PATCH 49/58] lib/trival: Bump oldestSupportedRelease to 2211 --- lib/trivial.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/trivial.nix b/lib/trivial.nix index 881974a15e05..17e83d58b7d7 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -179,7 +179,7 @@ rec { they take effect as soon as the oldest release reaches end of life. */ oldestSupportedRelease = # Update on master only. Do not backport. - 2205; + 2211; /* Whether a feature is supported in all supported releases (at the time of release branch-off, if applicable). See `oldestSupportedRelease`. */ From 809a6c151e57c48a003e02cff9a1fa0480c04846 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 14:59:44 +0100 Subject: [PATCH 50/58] python39Packages.schema-salad: add changelog to meta - mistune support was fixed --- pkgs/development/python-modules/schema-salad/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/schema-salad/default.nix b/pkgs/development/python-modules/schema-salad/default.nix index f537c3a287a8..bfc37e7667e2 100644 --- a/pkgs/development/python-modules/schema-salad/default.nix +++ b/pkgs/development/python-modules/schema-salad/default.nix @@ -57,13 +57,15 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - pycodegen = [ black ]; + pycodegen = [ + black + ]; }; meta = with lib; { - broken = true; # disables on outdated version of mistune description = "Semantic Annotations for Linked Avro Data"; homepage = "https://github.com/common-workflow-language/schema_salad"; + changelog = "https://github.com/common-workflow-language/schema_salad/releases/tag/${version}"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ veprbl ]; }; From 545e4f3375b04313b5f280ce4daf0a5e83d9c2ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 15:06:11 +0100 Subject: [PATCH 51/58] python310Packages.pdf2image: add changelog to meta - add pythonImportsCheck --- .../python-modules/pdf2image/default.nix | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pdf2image/default.nix b/pkgs/development/python-modules/pdf2image/default.nix index c2340b27d1c4..14f82b6ce3a9 100644 --- a/pkgs/development/python-modules/pdf2image/default.nix +++ b/pkgs/development/python-modules/pdf2image/default.nix @@ -1,14 +1,21 @@ -{ lib, buildPythonPackage, fetchPypi, pillow, poppler_utils }: +{ lib +, buildPythonPackage +, fetchPypi +, pillow +, poppler_utils +, pythonOlder +}: buildPythonPackage rec { pname = "pdf2image"; version = "1.16.2"; + format = "setuptools"; - propagatedBuildInputs = [ pillow ]; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-hnYQke7jX0ZB6pjf3bJUJUNh0Bi+aYoZmv98HTczGAM="; + hash = "sha256-hnYQke7jX0ZB6pjf3bJUJUNh0Bi+aYoZmv98HTczGAM="; }; postPatch = '' @@ -16,9 +23,18 @@ buildPythonPackage rec { sed -i '0,/poppler_path=None/s||poppler_path="${poppler_utils}/bin"|' pdf2image/pdf2image.py ''; + propagatedBuildInputs = [ + pillow + ]; + + pythonImportsCheck = [ + "pdf2image" + ]; + meta = with lib; { - description = "A python module that wraps the pdftoppm utility to convert PDF to PIL Image object"; + description = "Module that wraps the pdftoppm utility to convert PDF to PIL Image object"; homepage = "https://github.com/Belval/pdf2image"; + changelog = "https://github.com/Belval/pdf2image/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ gerschtli ]; platforms = platforms.all; From 5a485131fce1c7ab42cc43c3ae8ff8600c710883 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Jan 2023 15:10:38 +0100 Subject: [PATCH 52/58] sleuthkit: add changelog to meta --- pkgs/tools/system/sleuthkit/default.nix | 37 +++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/system/sleuthkit/default.nix b/pkgs/tools/system/sleuthkit/default.nix index 4283c281b0b6..0acc0e601699 100644 --- a/pkgs/tools/system/sleuthkit/default.nix +++ b/pkgs/tools/system/sleuthkit/default.nix @@ -1,4 +1,15 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, libewf, afflib, openssl, zlib, openjdk, perl, ant }: +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, libewf +, afflib +, openssl +, zlib +, openjdk +, perl +, ant +}: stdenv.mkDerivation rec { version = "4.12.0"; @@ -8,7 +19,7 @@ stdenv.mkDerivation rec { owner = "sleuthkit"; repo = "sleuthkit"; rev = "${pname}-${version}"; - sha256 = "sha256-NX7LNtor7UQJ6HCDz9wGpxbqrLQTTH9+543hOaQOAz4="; + hash = "sha256-NX7LNtor7UQJ6HCDz9wGpxbqrLQTTH9+543hOaQOAz4="; }; # Fetch libraries using a fixed output derivation @@ -16,7 +27,10 @@ stdenv.mkDerivation rec { version = "1.0"; pname = "sleuthkit-deps"; - nativeBuildInputs = [ openjdk ant ]; + nativeBuildInputs = [ + openjdk + ant + ]; src = sleuthsrc; @@ -56,8 +70,20 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ autoreconfHook openjdk perl ant rdeps ]; - buildInputs = [ libewf afflib openssl zlib ]; + nativeBuildInputs = [ + autoreconfHook + openjdk + perl + ant + rdeps + ]; + + buildInputs = [ + libewf + afflib + openssl + zlib + ]; # Hack to fix the RPATH preFixup = '' @@ -82,6 +108,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A forensic/data recovery tool"; homepage = "https://www.sleuthkit.org/"; + changelog = "https://github.com/sleuthkit/sleuthkit/releases/tag/sleuthkit-${version}"; maintainers = with maintainers; [ raskin gfrascadorio ]; platforms = platforms.linux; sourceProvenance = with sourceTypes; [ From bd000ffb9dec2933a59a8a9563b7d172441de07b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Jan 2023 14:14:31 +0000 Subject: [PATCH 53/58] svg2pdf: 0.4.0 -> 0.4.1 --- pkgs/tools/graphics/svg2pdf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/graphics/svg2pdf/default.nix b/pkgs/tools/graphics/svg2pdf/default.nix index fb6903a20cfe..02c3a203b707 100644 --- a/pkgs/tools/graphics/svg2pdf/default.nix +++ b/pkgs/tools/graphics/svg2pdf/default.nix @@ -6,14 +6,14 @@ rustPlatform.buildRustPackage rec { pname = "svg2pdf"; - version = "0.4.0"; + version = "0.4.1"; # This cargo package is usually a library, hence it does not track a # Cargo.lock by default so we use fetchCrate src = fetchCrate { inherit version pname; - sha256 = "2Aw8VYFVw0rKeaDUTsYTHcHBDP1jLm4tVGfi6+RNK9E="; + sha256 = "sha256-0sjJIHD+x9P7FPLNwTXYcetbU4Ck5K4pFGF5cMI3+rk="; }; - cargoSha256 = "KADfBOnkY1T1xy4Oj7s85SXcDhjRhQQ2hWGWinMXux8="; + cargoSha256 = "sha256-vjDV604HDwlaxwq5iQbGOKXmLTRgx1oZ824HXBSiouw="; buildFeatures = [ "cli" ]; doCheck = true; From 4c24f62648ae848e7d14d3e6ddfc41daff3550d0 Mon Sep 17 00:00:00 2001 From: s1341 Date: Thu, 29 Dec 2022 13:35:29 +0200 Subject: [PATCH 54/58] python3Packages.scim2-filter-parser: init at 0.4.0 --- .../scim2-filter-parser/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/scim2-filter-parser/default.nix diff --git a/pkgs/development/python-modules/scim2-filter-parser/default.nix b/pkgs/development/python-modules/scim2-filter-parser/default.nix new file mode 100644 index 000000000000..34dfecd2ebbb --- /dev/null +++ b/pkgs/development/python-modules/scim2-filter-parser/default.nix @@ -0,0 +1,38 @@ +{ stdenv, lib, fetchFromGitHub, buildPythonPackage, unittestCheckHook +, pytest-runner, django +, sly }: + +buildPythonPackage rec { + pname = "scim2-filter-parser"; + version = "0.4.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "15five"; + repo = pname; + # gets rarely updated, we can then just replace the hash + rev = "refs/tags/${version}"; + hash = "sha256-ZemR5tn+T9WWgNB1FYrPJO6zh8g9zjobFZemi+MHkEE="; + }; + + propagatedBuildInputs = [ + sly + ]; + + pythonImportsCheck = [ + "scim2_filter_parser" + ]; + + checkInputs = [ + django + pytest-runner + unittestCheckHook + ]; + + meta = with lib; { + description = "A customizable parser/transpiler for SCIM2.0 filters"; + homepage = "https://github.com/15five/scim2-filter-parser"; + license = licenses.mit; + maintainers = with maintainers; [ s1341 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ca17accf532..6f6b7ffd490f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10091,6 +10091,8 @@ self: super: with self; { schwifty = callPackage ../development/python-modules/schwifty { }; + scim2-filter-parser = callPackage ../development/python-modules/scim2-filter-parser { }; + scikit-bio = callPackage ../development/python-modules/scikit-bio { }; scikit-build = callPackage ../development/python-modules/scikit-build { }; From 6a31f1b36c468e81eb23a60619b63308642594a1 Mon Sep 17 00:00:00 2001 From: s1341 Date: Sun, 1 Jan 2023 14:43:39 +0200 Subject: [PATCH 55/58] python3Packages.django-scim2: init at 0.17.3 --- .../python-modules/django-scim2/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/django-scim2/default.nix diff --git a/pkgs/development/python-modules/django-scim2/default.nix b/pkgs/development/python-modules/django-scim2/default.nix new file mode 100644 index 000000000000..041030a23259 --- /dev/null +++ b/pkgs/development/python-modules/django-scim2/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub + +# propagates +, django +, dateutil +, scim2-filter-parser +, gssapi +, ldap +, sssd + +# tests +, mock +}: + +buildPythonPackage rec { + pname = "django-scim2"; + version = "0.17.3"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "15five"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-5zdGPpjooiFoj+2OoglXhhKsPFB/KOHvrZWZd+1nZqU="; + }; + + propagatedBuildInputs = [ + django + dateutil + scim2-filter-parser + gssapi + ldap + sssd + ]; + + pythonImportsCheck = [ + "django_scim" + ]; + + checkInputs = [ + mock + ]; + + meta = with lib; { + description = "A SCIM 2.0 Service Provider Implementation (for Django)"; + homepage = "https://github.com/15five/django-scim2"; + license = licenses.mit; + maintainers = with maintainers; [ s1341 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6f6b7ffd490f..2729d2aa908e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2594,6 +2594,8 @@ self: super: with self; { django-scopes = callPackage ../development/python-modules/django-scopes { }; + django-scim2 = callPackage ../development/python-modules/django-scim2 { }; + djangoql = callPackage ../development/python-modules/djangoql { }; django-ranged-response = callPackage ../development/python-modules/django-ranged-response { }; From 26969c3a819dd44cd15812fb50af8127ce15675a Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sun, 20 Nov 2022 18:14:09 -0500 Subject: [PATCH 56/58] pkgsStatic.lm_sensors: fix build --- pkgs/os-specific/linux/lm-sensors/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/os-specific/linux/lm-sensors/default.nix b/pkgs/os-specific/linux/lm-sensors/default.nix index c40a37940543..895e84f827b4 100644 --- a/pkgs/os-specific/linux/lm-sensors/default.nix +++ b/pkgs/os-specific/linux/lm-sensors/default.nix @@ -24,6 +24,13 @@ stdenv.mkDerivation rec { hash = "sha256-9lfHCcODlS7sZMjQhK0yQcCBEoGyZOChx/oM0CU37sY="; }; + # Upstream build system have knob to enable and disable building of static + # library, shared library is built unconditionally. + postPatch = lib.optionalString stdenv.hostPlatform.isStatic '' + sed -i 'lib/Module.mk' -e '/LIBTARGETS :=/,+1d; /-m 755/ d' + substituteInPlace prog/sensors/Module.mk --replace 'lib/$(LIBSHBASENAME)' "" + ''; + nativeBuildInputs = [ bison flex which ]; # bash is required for correctly replacing the shebangs in all tools for cross-compilation. buildInputs = [ bash perl ] @@ -39,6 +46,12 @@ stdenv.mkDerivation rec { "ETCDIR=${placeholder "out"}/etc" ]; + # Making regexp to patch-out installing of .so symlinks from Makefile is + # complicated, it is easier to remove them post-install. + postInstall = lib.optionalString stdenv.hostPlatform.isStatic '' + rm $out/lib/*.so* + ''; + meta = with lib; { homepage = "https://hwmon.wiki.kernel.org/lm_sensors"; changelog = "https://raw.githubusercontent.com/lm-sensors/lm-sensors/V${dashedVersion}/CHANGES"; From b7431c54ac3181d602137f677ac89deca5d93ab9 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sun, 1 Jan 2023 17:55:55 +0100 Subject: [PATCH 57/58] chromiumDev: 110.0.5464.2 -> 110.0.5478.4 --- .../networking/browsers/chromium/upstream-info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index c9399336bdd1..7e13b02619ce 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -32,15 +32,15 @@ } }, "dev": { - "version": "110.0.5464.2", - "sha256": "18k4rrwszk4xz416xi6li9b5pdajlscfgg4cyv67y10z7f28qwby", - "sha256bin64": "0hzv55bba4041400zjysgzz1n8svzvi156xyrayfr5ynapf7g2rd", + "version": "110.0.5478.4", + "sha256": "0sn07gk53mc6xcmbq1jrxwf4lp2hmw6k9rmhsw36qf5alcdkx94h", + "sha256bin64": "0r63qj6gc74vrjp7fyygzf49prsyim03s3cv43fm85lnab9m4x6i", "deps": { "gn": { - "version": "2022-11-29", + "version": "2022-12-12", "url": "https://gn.googlesource.com/gn", - "rev": "70d6c60823c0233a0f35eccc25b2b640d2980bdc", - "sha256": "04md36i6l07c1bq8mqghrnbf308j9avmqkwqjqm8gciclnrnlsii" + "rev": "5e19d2fb166fbd4f6f32147fbb2f497091a54ad8", + "sha256": "1b5fwldfmkkbpp5x63n1dxv0nc965hphc8rm8ah7zg44zscm9z30" } } }, From c9ca13ce9abb2f872c1a24f49fcc027343146a98 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sun, 1 Jan 2023 17:58:56 +0100 Subject: [PATCH 58/58] chromium: Drop passthru.updateScript The update script for Chromium does not behave like other update scripts, e.g., it updates all channels and ungoogled-chromium (not just a single package). This causes issues when r-ryantm (the bot that runs nixpkgs-update) tries to update chromium and ungoogled-chromium (which it started to do recently): - https://github.com/NixOS/nixpkgs/pull/207185 - https://github.com/NixOS/nixpkgs/pull/207482 - https://github.com/NixOS/nixpkgs/pull/207596 - https://github.com/NixOS/nixpkgs/pull/208048 - https://github.com/NixOS/nixpkgs/pull/208287 We could make the update script work as expected by other tooling but Chromium requires special attention anyway so it might also be for the best to do it manually for now (at least someone needs to ensure that the correct labels are set and that security fixes (~ all updates) are backported). --- pkgs/applications/networking/browsers/chromium/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 34c6f773046a..1511459058d7 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -231,6 +231,5 @@ in stdenv.mkDerivation { inherit (chromium) upstream-info browser; mkDerivation = chromium.mkChromiumDerivation; inherit chromeSrc sandboxExecutableName; - updateScript = ./update.py; }; }