From 972976d903bbb9bcc5d406397b11e5cf284139c0 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Thu, 22 Aug 2024 21:49:03 +0200 Subject: [PATCH 01/48] nixos/pam: add pam_rssh support --- nixos/modules/security/pam.nix | 83 ++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 2ff08cbfde81..acd0673877b8 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -287,6 +287,18 @@ let ''; }; + rssh = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + If set, the calling user's SSH agent is used to authenticate + against the configured keys. This module works in a manner + similar to pam_ssh_agent_auth, but supports a wider range + of SSH key types, including those protected by security + keys (FIDO2). + ''; + }; + duoSecurity = { enable = lib.mkOption { default = false; @@ -673,6 +685,7 @@ let { name = "ssh_agent_auth"; enable = config.security.pam.sshAgentAuth.enable && cfg.sshAgentAuth; control = "sufficient"; modulePath = "${pkgs.pam_ssh_agent_auth}/libexec/pam_ssh_agent_auth.so"; settings = { file = lib.concatStringsSep ":" config.security.pam.sshAgentAuth.authorizedKeysFiles; }; } + (let inherit (config.security.pam) rssh; in { name = "rssh"; enable = rssh.enable && cfg.rssh; control = "sufficient"; modulePath = "${pkgs.pam_rssh}/lib/libpam_rssh.so"; inherit (rssh) settings; }) (let p11 = config.security.pam.p11; in { name = "p11"; enable = cfg.p11Auth; control = p11.control; modulePath = "${pkgs.pam_p11}/lib/security/pam_p11.so"; args = [ "${pkgs.opensc}/lib/opensc-pkcs11.so" ]; }) @@ -950,8 +963,9 @@ let value.source = pkgs.writeText "${name}.pam" service.text; }; - optionalSudoConfigForSSHAgentAuth = lib.optionalString config.security.pam.sshAgentAuth.enable '' - # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic. + optionalSudoConfigForSSHAgentAuth = lib.optionalString + (config.security.pam.sshAgentAuth.enable || config.security.pam.rssh.enable) '' + # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so and libpam_rssh.so can do their magic. Defaults env_keep+=SSH_AUTH_SOCK ''; @@ -1068,6 +1082,55 @@ in }; }; + security.pam.rssh = { + enable = lib.mkEnableOption "authenticating using a signature performed by the ssh-agent"; + + settings = lib.mkOption { + type = lib.types.submodule { + freeformType = moduleSettingsType; + options = { + auth_key_file = lib.mkOption { + type = with lib.types; nullOr nonEmptyStr; + description = '' + Path to file with trusted public keys in OpenSSH's `authorized_keys` format. The following + variables are expanded to the respective PAM items: + + - `service`: `PAM_SERVICE`, the service name, + - `user`: `PAM_USER`, the username of the entity under whose identity service will be given, + - `tty`: `PAM_TTY`, the terminal name, + - `rhost`: `PAM_RHOST`, the requesting hostname, and + - `ruser`: `PAM_RUSER`, the requesting entity. + + These PAM items are explained in {manpage}`pam_get_item(3)`. + + Variables may be specified as `$var`, `''${var}` or `''${var:defaultValue}`. + + ::: {.note} + Specifying user-writeable files here results in an insecure configuration: a malicious process + can then edit such an `authorized_keys` file and bypass the ssh-agent-based authentication. + + This option is ignored if {option}`security.pam.rssh.settings.authorized_keys_command` is set. + + If both this option and {option}`security.pam.rssh.settings.authorized_keys_command` are unset, + the keys will be read from `''${HOME}/.ssh/authorized_keys`, which should be considered + insecure. + ''; + default = "/etc/ssh/authorized_keys.d/$ruser"; + }; + }; + }; + + default = { }; + description = '' + Options to pass to the pam_rssh module. Refer to + + for supported values. + + ${moduleSettingsDescription} + ''; + }; + }; + security.pam.enableOTPW = lib.mkEnableOption "the OTPW (one-time password) PAM module"; security.pam.dp9ik = { @@ -1512,16 +1575,30 @@ in Did you forget to set `services.openssh.enable` ? ''; } + { + assertion = with config.security.pam.rssh; + enable -> (settings.auth_key_file or null != null || settings.authorized_keys_command or null != null); + message = '' + security.pam.rssh.enable requires either security.pam.rssh.settings.auth_key_file or + security.pam.rssh.settings.authorized_keys_command to be set. + ''; + } ]; warnings = lib.optional - (with lib; with config.security.pam.sshAgentAuth; + (with config.security.pam.sshAgentAuth; enable && lib.any (s: lib.hasPrefix "%h" s || lib.hasPrefix "~" s) authorizedKeysFiles) ''config.security.pam.sshAgentAuth.authorizedKeysFiles contains files in the user's home directory. Specifying user-writeable files there result in an insecure configuration: a malicious process can then edit such an authorized_keys file and bypass the ssh-agent-based authentication. See https://github.com/NixOS/nixpkgs/issues/31611 + '' ++ lib.optional + (with config.security.pam.rssh; + enable && settings.auth_key_file or null != null && settings.authorized_keys_command or null != null) '' + security.pam.rssh.settings.auth_key_file will be ignored as + security.pam.rssh.settings.authorized_keys_command has been specified. + Explictly set the former to null to silence this warning. ''; environment.systemPackages = From 3baaaaccee260cd3a7f41664a1fc803ff00c6d51 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 28 Sep 2024 21:56:17 +0000 Subject: [PATCH 02/48] level-zero: 1.17.42 -> 1.17.45 --- pkgs/development/libraries/level-zero/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/level-zero/default.nix b/pkgs/development/libraries/level-zero/default.nix index 8b87f0af9f9b..e0d130d80f44 100644 --- a/pkgs/development/libraries/level-zero/default.nix +++ b/pkgs/development/libraries/level-zero/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "level-zero"; - version = "1.17.42"; + version = "1.17.45"; src = fetchFromGitHub { owner = "oneapi-src"; repo = "level-zero"; rev = "refs/tags/v${version}"; - hash = "sha256-IjYRzjC7CUPDdVBVoWSZtUQaY7QtSfS/Nej/2BdVziY="; + hash = "sha256-2uWZsy8aIV/ToDVuVxpyXoI1GbwZ9IxeLh+1hgjlfEM="; }; nativeBuildInputs = [ cmake addDriverRunpath ]; From d0c00c62cc4f99604bebd9c9b21a9a18ca730595 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Thu, 3 Oct 2024 21:40:40 +0200 Subject: [PATCH 03/48] netdata: 1.47.1 -> 1.47.3 --- pkgs/tools/system/netdata/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index b8746229d81e..7c55378664a8 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -53,7 +53,7 @@ let stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { - version = "1.47.1"; + version = "1.47.3"; pname = "netdata"; src = fetchFromGitHub { @@ -62,10 +62,10 @@ stdenv'.mkDerivation (finalAttrs: { rev = "v${finalAttrs.version}"; hash = if withCloudUi then - "sha256-/iXmIjWpZ0s/LELZM7rYYQ9cjLNdfdisyOvDyLddSY4=" + "sha256-rua4wDkTEQbH5fS6gVDF0y3QsQ+eG8Eki4JFxmiRN5k=" # we delete the v2 GUI after fetching else - "sha256-pAqxxsWYgqbmF6wFBfTCYYc3x/Ufyz2Xs4bwB1ToHjo="; + "sha256-IR54OgYiOAmDgysm+3MLeMkxyNWkJe3BLKL9gaFHdvo="; fetchSubmodules = true; # Remove v2 dashboard distributed under NCUL1. Make sure an empty From 3f773d25eb83d2e48ad39503ee5aee2dbb80ea2e Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Thu, 3 Oct 2024 14:03:36 -0700 Subject: [PATCH 04/48] home-assistant-custom-components.miele: 2024.3.0 -> 2024.8.1 https://github.com/astrandb/miele/compare/v2024.3.0...v2024.8.1 --- .../home-assistant/custom-components/miele/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/miele/default.nix b/pkgs/servers/home-assistant/custom-components/miele/default.nix index 408530620548..3b05b714a891 100644 --- a/pkgs/servers/home-assistant/custom-components/miele/default.nix +++ b/pkgs/servers/home-assistant/custom-components/miele/default.nix @@ -8,13 +8,13 @@ buildHomeAssistantComponent rec { owner = "astrandb"; domain = "miele"; - version = "2024.3.0"; + version = "2024.8.1"; src = fetchFromGitHub { inherit owner; repo = domain; rev = "refs/tags/v${version}"; - hash = "sha256-J9n4PFcd87L301B2YktrLcxp5Vu1HwDeCYnrMEJ0+TA="; + hash = "sha256-XwaOQJvosCUXMZYrKX7sMWJIrMx36RhuVYUq163vvNg="; }; propagatedBuildInputs = [ From 69cc4afbcfa48bd9c5fb3a78779415ab422a031b Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Thu, 3 Oct 2024 14:16:04 -0700 Subject: [PATCH 05/48] home-assistant-custom-components.nest_protect: init at 0.3.12 --- .../custom-components/default.nix | 2 ++ .../nest_protect/default.nix | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-components/nest_protect/default.nix diff --git a/pkgs/servers/home-assistant/custom-components/default.nix b/pkgs/servers/home-assistant/custom-components/default.nix index bd819ad0c36b..5f068c137ed0 100644 --- a/pkgs/servers/home-assistant/custom-components/default.nix +++ b/pkgs/servers/home-assistant/custom-components/default.nix @@ -46,6 +46,8 @@ moonraker = callPackage ./moonraker {}; + nest_protect = callPackage ./nest_protect {}; + ntfy = callPackage ./ntfy {}; omnik_inverter = callPackage ./omnik_inverter {}; diff --git a/pkgs/servers/home-assistant/custom-components/nest_protect/default.nix b/pkgs/servers/home-assistant/custom-components/nest_protect/default.nix new file mode 100644 index 000000000000..b19ee4f99fb5 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/nest_protect/default.nix @@ -0,0 +1,30 @@ +{ + lib, + fetchFromGitHub, + buildHomeAssistantComponent, +}: +buildHomeAssistantComponent rec { + owner = "iMicknl"; + domain = "nest_protect"; + version = "0.3.12"; + + src = fetchFromGitHub { + inherit owner; + repo = "ha-nest-protect"; + rev = "refs/tags/v${version}"; + hash = "sha256-IiHndx+mQVfpMLisiRwSEhrFJ3mJ4qaWTxZrubowkQs="; + }; + + dontBuild = true; + + # AttributeError: 'async_generator' object has no attribute 'data' + doCheck = false; + + meta = with lib; { + changelog = "https://github.com/iMicknl/ha-nest-protect/releases/tag/v${version}"; + description = "Nest Protect integration for Home Assistant"; + homepage = "https://github.com/iMicknl/ha-nest-protect"; + maintainers = with maintainers; [ jamiemagee ]; + license = licenses.mit; + }; +} From 58e9015726d4a802d2c06c352e72a1e81b2125b9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 5 Oct 2024 14:32:39 +0000 Subject: [PATCH 06/48] biglybt: 3.6.0.0 -> 3.7.0.0 --- pkgs/by-name/bi/biglybt/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/bi/biglybt/package.nix b/pkgs/by-name/bi/biglybt/package.nix index 81c2fa31f9c3..4f11683dd18f 100644 --- a/pkgs/by-name/bi/biglybt/package.nix +++ b/pkgs/by-name/bi/biglybt/package.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { pname = "biglybt"; - version = "3.6.0.0"; + version = "3.7.0.0"; src = fetchurl { url = "https://github.com/BiglySoftware/BiglyBT/releases/download/v${version}/GitHub_BiglyBT_unix.tar.gz"; - hash = "sha256-a7g9sB3orO2m0X7qNwQ1dDygYPhs/b6kX0RDSG8Wq2U="; + hash = "sha256-CfLKoX77yCanSzHq+Fy3jRqQAC2GeUo2SO9x0mk2Tf4="; }; nativeBuildInputs = [ wrapGAppsHook3 ]; From ff473790a4b076efcd04e601ca601f127c318880 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Wed, 21 Aug 2024 20:10:53 -0700 Subject: [PATCH 07/48] pkgs/top-level/aliases.nix: add clang19Stdenv and clang-tools_19 --- pkgs/top-level/aliases.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 9884796a343e..31b468ae9902 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -297,6 +297,7 @@ mapAliases { clang16Stdenv = lowPrio llvmPackages_16.stdenv; clang17Stdenv = lowPrio llvmPackages_17.stdenv; clang18Stdenv = lowPrio llvmPackages_18.stdenv; + clang19Stdenv = lowPrio llvmPackages_19.stdenv; clang-tools_6 = throw "clang-tools_6 has been removed from nixpkgs"; # Added 2024-01-08 clang-tools_7 = throw "clang-tools_7 has been removed from nixpkgs"; # Added 2023-11-19 @@ -318,6 +319,7 @@ mapAliases { clang-tools_16 = llvmPackages_16.clang-tools; # Added 2024-04-22 clang-tools_17 = llvmPackages_17.clang-tools; # Added 2024-04-22 clang-tools_18 = llvmPackages_18.clang-tools; # Added 2024-04-22 + clang-tools_19 = llvmPackages_19.clang-tools; # Added 2024-08-21 cq-editor = throw "cq-editor has been removed, as it use a dependency that was disabled since python 3.8 and was last updated in 2021"; # Added 2024-05-13 From 8bad5091362f68b1cb952cbe87c90419cad1c543 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Wed, 21 Aug 2024 20:46:07 -0700 Subject: [PATCH 08/48] spirv-llvm-translator: fix building with llvm 19 --- .../compilers/spirv-llvm-translator/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index 89e4452e7d4b..8a4cc9c62d64 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -15,7 +15,11 @@ let # ROCm, if actively updated will always be at the latest version branch = - if llvmMajor == "18" then rec { + if llvmMajor == "19" then rec { + version = "19.1.0"; + rev = "dad1f0eaab8047a4f73c50ed5f3d1694b78aae97"; + hash = "sha256-mUvDF5y+cBnqUaHjyiiE8cJGH5MfQMqGFy6bYv9vCVY="; + } else if llvmMajor == "18" then rec { version = "18.1.0"; rev = "v${version}"; hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k="; @@ -96,7 +100,8 @@ stdenv.mkDerivation { "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ "-DCMAKE_SKIP_BUILD_RPATH=ON" - ] ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}"; + ] ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}" + ++ lib.optional (llvmMajor == "19") "-DBASE_LLVM_VERSION=${lib.versions.majorMinor llvm.version}.0"; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false; From db45f307513c1a7c049652f1b284614199f1aee7 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 6 Oct 2024 09:24:48 -0700 Subject: [PATCH 09/48] spirv-llvm-translator: fix formatting --- .../spirv-llvm-translator/default.nix | 210 ++++++++++-------- 1 file changed, 121 insertions(+), 89 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index 8a4cc9c62d64..dd4bb0b76627 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv -, fetchFromGitHub -, fetchpatch -, cmake -, pkg-config -, lit -, llvm -, spirv-headers -, spirv-tools +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cmake, + pkg-config, + lit, + llvm, + spirv-headers, + spirv-tools, }: let @@ -15,35 +17,50 @@ let # ROCm, if actively updated will always be at the latest version branch = - if llvmMajor == "19" then rec { - version = "19.1.0"; - rev = "dad1f0eaab8047a4f73c50ed5f3d1694b78aae97"; - hash = "sha256-mUvDF5y+cBnqUaHjyiiE8cJGH5MfQMqGFy6bYv9vCVY="; - } else if llvmMajor == "18" then rec { - version = "18.1.0"; - rev = "v${version}"; - hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k="; - } else if llvmMajor == "17" || isROCm then rec { - version = "17.0.0"; - rev = "v${version}"; - hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM="; - } else if llvmMajor == "16" then rec { - version = "16.0.0"; - rev = "v${version}"; - hash = "sha256-EUabcYqSjXshbPmcs1DRLvCSL1nd9rEdpqELBrItCW8="; - } else if llvmMajor == "15" then rec { - version = "15.0.0"; - rev = "v${version}"; - hash = "sha256-OsDohXRxovtEXaWiRGp8gJ0dXmoALyO+ZimeSO8aPVI="; - } else if llvmMajor == "14" then { - version = "14.0.0+unstable-2024-07-15"; - rev = "2823e7052b7999c10fff63bc8089e5aa205716f4"; - hash = "sha256-8/4B74hYge6WiH7PzRGEgE3W7f9IkQ4VMmfkWKYA/l4="; - } else if llvmMajor == "11" then { - version = "11.0.0+unstable-2022-05-04"; - rev = "4ef524240833abfeee1c5b9fff6b1bd53f4806b3"; # 267 commits ahead of v11.0.0 - hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s="; - } else throw "Incompatible LLVM version."; + if llvmMajor == "19" then + rec { + version = "19.1.0"; + rev = "dad1f0eaab8047a4f73c50ed5f3d1694b78aae97"; + hash = "sha256-mUvDF5y+cBnqUaHjyiiE8cJGH5MfQMqGFy6bYv9vCVY="; + } + else if llvmMajor == "18" then + rec { + version = "18.1.0"; + rev = "v${version}"; + hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k="; + } + else if llvmMajor == "17" || isROCm then + rec { + version = "17.0.0"; + rev = "v${version}"; + hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM="; + } + else if llvmMajor == "16" then + rec { + version = "16.0.0"; + rev = "v${version}"; + hash = "sha256-EUabcYqSjXshbPmcs1DRLvCSL1nd9rEdpqELBrItCW8="; + } + else if llvmMajor == "15" then + rec { + version = "15.0.0"; + rev = "v${version}"; + hash = "sha256-OsDohXRxovtEXaWiRGp8gJ0dXmoALyO+ZimeSO8aPVI="; + } + else if llvmMajor == "14" then + { + version = "14.0.0+unstable-2024-07-15"; + rev = "2823e7052b7999c10fff63bc8089e5aa205716f4"; + hash = "sha256-8/4B74hYge6WiH7PzRGEgE3W7f9IkQ4VMmfkWKYA/l4="; + } + else if llvmMajor == "11" then + { + version = "11.0.0+unstable-2022-05-04"; + rev = "4ef524240833abfeee1c5b9fff6b1bd53f4806b3"; # 267 commits ahead of v11.0.0 + hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s="; + } + else + throw "Incompatible LLVM version."; in stdenv.mkDerivation { pname = "SPIRV-LLVM-Translator"; @@ -55,72 +72,87 @@ stdenv.mkDerivation { inherit (branch) rev hash; }; - patches = lib.optionals (llvmMajor == "18") [ - # Fixes build after SPV_INTEL_maximum_registers breaking change - # TODO: remove on next spirv-headers release - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/d970c9126c033ebcbb7187bc705eae2e54726b74.patch"; - revert = true; - hash = "sha256-71sJuGqVjTcB549eIiCO0LoqAgxkdEHCoxh8Pd/Qzz8="; - }) - ] ++ lib.optionals (lib.versionAtLeast llvmMajor "15" && lib.versionOlder llvmMajor "18") [ - # Fixes build after spirv-headers breaking change - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch"; - excludes = ["spirv-headers-tag.conf"]; - hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M="; - }) - ] ++ lib.optionals (llvmMajor == "16") [ - # Fixes builds that link against external LLVM dynamic library - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch"; - hash = "sha256-opDjyZcy7O4wcSfm/A51NCIiDyIvbcmbv9ns1njdJbc="; - }) - ] ++ lib.optionals (llvmMajor == "14") [ - (fetchpatch { - # tries to install llvm-spirv into llvm nix store path - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch"; - revert = true; - hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8="; - }) - ]; + patches = + lib.optionals (llvmMajor == "18") [ + # Fixes build after SPV_INTEL_maximum_registers breaking change + # TODO: remove on next spirv-headers release + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/d970c9126c033ebcbb7187bc705eae2e54726b74.patch"; + revert = true; + hash = "sha256-71sJuGqVjTcB549eIiCO0LoqAgxkdEHCoxh8Pd/Qzz8="; + }) + ] + ++ lib.optionals (lib.versionAtLeast llvmMajor "15" && lib.versionOlder llvmMajor "18") [ + # Fixes build after spirv-headers breaking change + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch"; + excludes = [ "spirv-headers-tag.conf" ]; + hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M="; + }) + ] + ++ lib.optionals (llvmMajor == "16") [ + # Fixes builds that link against external LLVM dynamic library + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch"; + hash = "sha256-opDjyZcy7O4wcSfm/A51NCIiDyIvbcmbv9ns1njdJbc="; + }) + ] + ++ lib.optionals (llvmMajor == "14") [ + (fetchpatch { + # tries to install llvm-spirv into llvm nix store path + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch"; + revert = true; + hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8="; + }) + ]; - nativeBuildInputs = [ pkg-config cmake ] - ++ (if isROCm then [ llvm ] else [ llvm.dev ]); + nativeBuildInputs = [ + pkg-config + cmake + ] ++ (if isROCm then [ llvm ] else [ llvm.dev ]); - buildInputs = [ spirv-headers spirv-tools ] - ++ lib.optionals (!isROCm) [ llvm ]; + buildInputs = [ + spirv-headers + spirv-tools + ] ++ lib.optionals (!isROCm) [ llvm ]; nativeCheckInputs = [ lit ]; - cmakeFlags = [ - "-DLLVM_INCLUDE_TESTS=ON" - "-DLLVM_DIR=${(if isROCm then llvm else llvm.dev)}" - "-DBUILD_SHARED_LIBS=YES" - "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" - # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ - "-DCMAKE_SKIP_BUILD_RPATH=ON" - ] ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}" + cmakeFlags = + [ + "-DLLVM_INCLUDE_TESTS=ON" + "-DLLVM_DIR=${(if isROCm then llvm else llvm.dev)}" + "-DBUILD_SHARED_LIBS=YES" + "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" + # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ] + ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}" ++ lib.optional (llvmMajor == "19") "-DBASE_LLVM_VERSION=${lib.versions.majorMinor llvm.version}.0"; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false; - makeFlags = [ "all" "llvm-spirv" ]; + makeFlags = [ + "all" + "llvm-spirv" + ]; - postInstall = '' - install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - install_name_tool $out/bin/llvm-spirv \ - -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib - ''; + postInstall = + '' + install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + install_name_tool $out/bin/llvm-spirv \ + -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib + ''; meta = with lib; { - homepage = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator"; + homepage = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator"; description = "Tool and a library for bi-directional translation between SPIR-V and LLVM IR"; mainProgram = "llvm-spirv"; - license = licenses.ncsa; - platforms = platforms.unix; + license = licenses.ncsa; + platforms = platforms.unix; maintainers = with maintainers; [ gloaming ]; }; } From a80f2c1e2dc724315f5a6e7824b2df82796265b1 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 24 Aug 2024 20:05:35 -0700 Subject: [PATCH 10/48] llvmPackages_19.libclc: fix building --- .../llvm/19/libclc/use-default-paths.patch | 31 +++++++++++++++++++ .../compilers/llvm/common/default.nix | 6 ++++ .../compilers/llvm/common/libclc.nix | 22 +++++++++---- 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch diff --git a/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch b/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch new file mode 100644 index 000000000000..09079242eeac --- /dev/null +++ b/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch @@ -0,0 +1,31 @@ +From e8b910246d0c7c3d9fff994f71c6f8a48ec09a50 Mon Sep 17 00:00:00 2001 +From: Tristan Ross +Date: Sat, 24 Aug 2024 19:56:24 -0700 +Subject: [PATCH] [libclc] use default paths with find_program when possible + +--- + libclc/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 02bb859ae8590b..6bcd8ae52a5794 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,7 +55,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI + # Import required tools + if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} ) + foreach( tool IN ITEMS clang llvm-as llvm-link opt ) +- find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH ) ++ find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} ) + set( ${tool}_exe ${LLVM_TOOL_${tool}} ) + set( ${tool}_target ) + endforeach() +@@ -104,7 +104,7 @@ foreach( tool IN ITEMS clang opt llvm-as llvm-link ) + endforeach() + + # llvm-spirv is an optional dependency, used to build spirv-* targets. +-find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH ) ++find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} ) + + if( LLVM_SPIRV ) + add_executable( libclc::llvm-spirv IMPORTED GLOBAL ) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index d5f7f0a8405a..d3430efb106f 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -279,6 +279,12 @@ let path = ../14; } ]; + "libclc/use-default-paths.patch" = [ + { + after = "19"; + path = ../19; + } + ]; }; constraints = patches."${p}" or null; diff --git a/pkgs/development/compilers/llvm/common/libclc.nix b/pkgs/development/compilers/llvm/common/libclc.nix index 4c2081e693c1..c2d25c3e53e9 100644 --- a/pkgs/development/compilers/llvm/common/libclc.nix +++ b/pkgs/development/compilers/llvm/common/libclc.nix @@ -1,5 +1,7 @@ -{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3 }: - +{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3, release_version, getVersionFile }: +let + spirv-llvm-translator = buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }; +in stdenv.mkDerivation rec { pname = "libclc"; inherit version; @@ -16,10 +18,14 @@ stdenv.mkDerivation rec { patches = [ ./libclc/libclc-gnu-install-dirs.patch - ]; + ] # LLVM 19 changes how host tools are looked up. + # Need to remove NO_DEFAULT_PATH and the PATHS arguments for find_program + # so CMake can actually find the tools in nativeBuildInputs. + # https://github.com/llvm/llvm-project/pull/105969 + ++ lib.optional (lib.versionAtLeast release_version "19") (getVersionFile "libclc/use-default-paths.patch"); # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch - postPatch = '' + postPatch = lib.optionalString (lib.versionOlder release_version "19") '' substituteInPlace CMakeLists.txt \ --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ @@ -30,13 +36,17 @@ stdenv.mkDerivation rec { --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }}/bin" NO_DEFAULT_PATH )' + 'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' substituteInPlace CMakeLists.txt \ --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins' ''; - nativeBuildInputs = [ cmake ninja python3 ]; + nativeBuildInputs = [ cmake ninja python3 ] ++ lib.optional (lib.versionAtLeast release_version "19") [ + buildLlvmTools.clang.cc + buildLlvmTools.llvm + spirv-llvm-translator + ]; buildInputs = [ llvm ]; strictDeps = true; From 6bb12aca3d853861f8a59fff336406a43c02a86f Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 15 Sep 2024 19:26:47 -0700 Subject: [PATCH 11/48] llvmPackages_19.libclc: fix formatting --- .../compilers/llvm/common/libclc.nix | 87 ++++++++++++------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/libclc.nix b/pkgs/development/compilers/llvm/common/libclc.nix index c2d25c3e53e9..299b27417b6a 100644 --- a/pkgs/development/compilers/llvm/common/libclc.nix +++ b/pkgs/development/compilers/llvm/common/libclc.nix @@ -1,12 +1,28 @@ -{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3, release_version, getVersionFile }: +{ + lib, + stdenv, + version, + runCommand, + monorepoSrc, + llvm, + buildPackages, + buildLlvmTools, + ninja, + cmake, + python3, + release_version, + getVersionFile, +}: let - spirv-llvm-translator = buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }; + spirv-llvm-translator = buildPackages.spirv-llvm-translator.override { + inherit (buildLlvmTools) llvm; + }; in stdenv.mkDerivation rec { pname = "libclc"; inherit version; - src = runCommand "${pname}-src-${version}" {} '' + src = runCommand "${pname}-src-${version}" { } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/${pname} "$out" @@ -14,39 +30,52 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/${pname}"; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; - patches = [ - ./libclc/libclc-gnu-install-dirs.patch - ] # LLVM 19 changes how host tools are looked up. + patches = + [ ./libclc/libclc-gnu-install-dirs.patch ] + # LLVM 19 changes how host tools are looked up. # Need to remove NO_DEFAULT_PATH and the PATHS arguments for find_program # so CMake can actually find the tools in nativeBuildInputs. # https://github.com/llvm/llvm-project/pull/105969 - ++ lib.optional (lib.versionAtLeast release_version "19") (getVersionFile "libclc/use-default-paths.patch"); + ++ lib.optional (lib.versionAtLeast release_version "19") ( + getVersionFile "libclc/use-default-paths.patch" + ); # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch - postPatch = lib.optionalString (lib.versionOlder release_version "19") '' - substituteInPlace CMakeLists.txt \ - --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' - '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' - substituteInPlace CMakeLists.txt \ - --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins' - ''; + postPatch = + lib.optionalString (lib.versionOlder release_version "19") '' + substituteInPlace CMakeLists.txt \ + --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' + '' + + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + substituteInPlace CMakeLists.txt \ + --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins' + ''; - nativeBuildInputs = [ cmake ninja python3 ] ++ lib.optional (lib.versionAtLeast release_version "19") [ - buildLlvmTools.clang.cc - buildLlvmTools.llvm - spirv-llvm-translator - ]; + nativeBuildInputs = + [ + cmake + ninja + python3 + ] + ++ lib.optional (lib.versionAtLeast release_version "19") [ + buildLlvmTools.clang.cc + buildLlvmTools.llvm + spirv-llvm-translator + ]; buildInputs = [ llvm ]; strictDeps = true; From 75cedf7fb09d720880e343ae1d8bc3a3cfef8fe7 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Mon, 20 May 2024 15:15:42 +0200 Subject: [PATCH 12/48] python312Packages.drf-extra-fields: init at 3.7.0 Co-authored-by: OTABI Tomoya Co-authored-by: Sandro --- .../drf-extra-fields/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/drf-extra-fields/default.nix diff --git a/pkgs/development/python-modules/drf-extra-fields/default.nix b/pkgs/development/python-modules/drf-extra-fields/default.nix new file mode 100644 index 000000000000..76966803cf29 --- /dev/null +++ b/pkgs/development/python-modules/drf-extra-fields/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + django, + djangorestframework, + filetype, + pillow, + psycopg2, + pytestCheckHook, + pytest-django, +}: + +buildPythonPackage rec { + pname = "drf-extra-fields"; + version = "3.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hipo"; + repo = "drf-extra-fields"; + rev = "v${version}"; + hash = "sha256-Ym4vnZ/t0ZdSxU53BC0ducJl1YiTygRSWql/35PNbOU"; + }; + + build-system = [ setuptools ]; + + dependencies = [ + django + djangorestframework + filetype + ]; + + optional-dependencies = { + Base64ImageField = [ pillow ]; + }; + + nativeCheckInputs = [ + (django.override { withGdal = true; }) + psycopg2 + pytestCheckHook + pytest-django + ] ++ optional-dependencies.Base64ImageField; + + pythonImportsCheck = [ "drf_extra_fields" ]; + + meta = { + description = "Extra Fields for Django Rest Framework"; + homepage = "https://github.com/Hipo/drf-extra-fields"; + changelog = "https://github.com/Hipo/drf-extra-fields/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9dcd98777484..d8eff943aa20 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3724,6 +3724,8 @@ self: super: with self; { dremel3dpy = callPackage ../development/python-modules/dremel3dpy { }; + drf-extra-fields = callPackage ../development/python-modules/drf-extra-fields { }; + drf-jwt = callPackage ../development/python-modules/drf-jwt { }; drf-nested-routers = callPackage ../development/python-modules/drf-nested-routers { }; From 7f233a76275ce88b5c18b1bb1f6e3cb17f23d532 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Sun, 19 May 2024 13:24:17 +0200 Subject: [PATCH 13/48] python312Packages.netbox-documents: init at 0.7.0 Co-authored-by: OTABI Tomoya Co-authored-by: Sandro --- .../netbox-documents/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/netbox-documents/default.nix diff --git a/pkgs/development/python-modules/netbox-documents/default.nix b/pkgs/development/python-modules/netbox-documents/default.nix new file mode 100644 index 000000000000..099911166d03 --- /dev/null +++ b/pkgs/development/python-modules/netbox-documents/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + drf-extra-fields, + python, + netbox, +}: + +buildPythonPackage rec { + pname = "netbox-documents"; + version = "0.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jasonyates"; + repo = "netbox-documents"; + rev = "v${version}"; + hash = "sha256-Uijdaicbx9A9fBgFx3zyhhFlokFdb9TSolnExbfkkc4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ drf-extra-fields ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + pythonImportsCheck = [ "netbox_documents" ]; + + meta = { + description = "Plugin designed to faciliate the storage of site, circuit, device type and device specific documents within NetBox"; + homepage = "https://github.com/jasonyates/netbox-documents"; + changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d8eff943aa20..a0458f2583b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8847,6 +8847,8 @@ self: super: with self; { netapp-ontap = callPackage ../development/python-modules/netapp-ontap { }; + netbox-documents = callPackage ../development/python-modules/netbox-documents { }; + netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { }; netcdf4 = callPackage ../development/python-modules/netcdf4 { }; From d6fe4764b1992cdd6eb60ff7d822ea28f8554797 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Mon, 7 Oct 2024 13:18:38 -0400 Subject: [PATCH 14/48] emacsPackages.lsp-bridge: 0-unstable-2024-10-04 -> 0-unstable-2024-10-07 --- .../elisp-packages/manual-packages/lsp-bridge/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix index 69c97d475dfa..76d974ee8a80 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix @@ -24,18 +24,19 @@ let setuptools sexpdata six + watchdog ] ); in melpaBuild { pname = "lsp-bridge"; - version = "0-unstable-2024-10-04"; + version = "0-unstable-2024-10-07"; src = fetchFromGitHub { owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "2d0cd0bea3bd503ca3bb7bcf4a6a78af091c7ecc"; - hash = "sha256-q6xIYUhXTqGeR9tnjd1xnCOnOeOMypJN6vfGjZDuIIM="; + rev = "f726a341c283a5b84d3587cf84e40817b8ec72c6"; + hash = "sha256-JL02pYjM5DyUt5wCNN0UnLVSXv9DCfSaSBGy5PzLvyA="; }; patches = [ From cdc8907a4add32846e543136d15e7ee6cc70a778 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Oct 2024 03:12:44 +0000 Subject: [PATCH 15/48] python312Packages.cgal: 5.6.1.post202403291426 -> 6.0.post202410011635 --- pkgs/development/python-modules/cgal/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cgal/default.nix b/pkgs/development/python-modules/cgal/default.nix index e66d56879f1a..0b461c3b803a 100644 --- a/pkgs/development/python-modules/cgal/default.nix +++ b/pkgs/development/python-modules/cgal/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "cgal"; - version = "5.6.1.post202403291426"; + version = "6.0.post202410011635"; pyproject = true; src = fetchFromGitHub { owner = "CGAL"; repo = "cgal-swig-bindings"; - rev = "v${version}"; - hash = "sha256-EcvS1TWL3uGCE1G8Lbfiu/AzifMdUSei+z91bzkiKes="; + rev = "refs/tags/v${version}"; + hash = "sha256-KXcXykL/m+A5dCDc+f8j7GgVeQahAOaZ/+LLKHyqbS4="; }; dontUseCmakeConfigure = true; From 6918b2f6f1607e38f61a5d4a15118b5f4b234e49 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 9 Oct 2024 08:34:47 +0000 Subject: [PATCH 16/48] python3Packages.opentelemetry-instrumentation-celery: init at 0.47b0 --- .../default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix new file mode 100644 index 000000000000..bb6c9e5716ef --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-semantic-conventions, + opentelemetry-test-utils, + billiard, + celery, + pytestCheckHook, +}: + +buildPythonPackage rec { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-celery"; + pyproject = true; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-celery"; + + build-system = [ hatchling ]; + + dependencies = [ + billiard + celery + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-semantic-conventions + ]; + + optional-dependencies = { + instruments = [ celery ]; + }; + + nativeCheckInputs = [ + opentelemetry-test-utils + pytestCheckHook + ]; + + pythonImportsCheck = [ "opentelemetry.instrumentation.celery" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-celery"; + description = "Celery instrumentation for OpenTelemetry"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 644b110716ed..afcaf22bdd44 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9387,6 +9387,8 @@ self: super: with self; { opentelemetry-instrumentation-asgi = callPackage ../development/python-modules/opentelemetry-instrumentation-asgi { }; + opentelemetry-instrumentation-celery = callPackage ../development/python-modules/opentelemetry-instrumentation-celery { }; + opentelemetry-instrumentation-dbapi = callPackage ../development/python-modules/opentelemetry-instrumentation-dbapi { }; opentelemetry-instrumentation-django = callPackage ../development/python-modules/opentelemetry-instrumentation-django { }; From ba4c27841c517a428f5111d6befef82cf3c9fda9 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 9 Oct 2024 18:54:01 +0200 Subject: [PATCH 17/48] exo: 0-unstable-2024-10-06 -> 0-unstable-2024-10-09 --- pkgs/by-name/ex/exo/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ex/exo/package.nix b/pkgs/by-name/ex/exo/package.nix index 1880b3386ea2..fb2bfbe7b18a 100644 --- a/pkgs/by-name/ex/exo/package.nix +++ b/pkgs/by-name/ex/exo/package.nix @@ -6,14 +6,14 @@ }: python3Packages.buildPythonApplication { pname = "exo"; - version = "0-unstable-2024-10-06"; + version = "0-unstable-2024-10-09"; pyproject = true; src = fetchFromGitHub { owner = "exo-explore"; repo = "exo"; - rev = "7b2a523fd1e5f1281d89bc1f664a29dc2003b787"; - hash = "sha256-o4tNbU9oa7WsAQ6eiTHqQVhliXbG/Y8d7PeH2TTWgGk="; + rev = "c1a26cd7fa447b2802a4bececfd7cb9d316c0600"; + hash = "sha256-jtcfGmk03Yf5IaswIvi6N9oMXzNPYlJBf4WMLkogUVo="; }; build-system = with python3Packages; [ setuptools ]; From 8aa196d3a3fa381d951200a0724a9903b22f67f5 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Wed, 9 Oct 2024 19:45:00 +0200 Subject: [PATCH 18/48] glab: move to by-name --- .../glab/default.nix => by-name/gl/glab/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/version-management/glab/default.nix => by-name/gl/glab/package.nix} (100%) diff --git a/pkgs/applications/version-management/glab/default.nix b/pkgs/by-name/gl/glab/package.nix similarity index 100% rename from pkgs/applications/version-management/glab/default.nix rename to pkgs/by-name/gl/glab/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11c6eeb65b4f..3207ea33d80a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2382,8 +2382,6 @@ with pkgs; gitweb = callPackage ../applications/version-management/gitweb { }; - glab = callPackage ../applications/version-management/glab { }; - glitter = callPackage ../applications/version-management/glitter { }; globalping-cli = callPackage ../tools/networking/globalping-cli { }; From 8b43f91fb477c994462c39b304c145152f7fa3f4 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Wed, 9 Oct 2024 19:45:00 +0200 Subject: [PATCH 19/48] glab: 1.45.0 -> 1.47.0 --- pkgs/by-name/gl/glab/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/gl/glab/package.nix b/pkgs/by-name/gl/glab/package.nix index 31af00105113..c0a321858f0e 100644 --- a/pkgs/by-name/gl/glab/package.nix +++ b/pkgs/by-name/gl/glab/package.nix @@ -1,17 +1,17 @@ -{ lib, buildGoModule, fetchFromGitLab, installShellFiles, stdenv }: +{ lib, buildGo123Module, fetchFromGitLab, installShellFiles, stdenv }: -buildGoModule rec { +buildGo123Module rec { pname = "glab"; - version = "1.45.0"; + version = "1.47.0"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "cli"; rev = "v${version}"; - hash = "sha256-jTpddpS+FYSQg2aRxQiVlG+bitiIqmZ4kxOJLPZkICo="; + hash = "sha256-mAM11nQ6YJJWNFOR9xQbgma7Plvo4MdcW2Syniw7o60="; }; - vendorHash = "sha256-o0sYObTeDgG+3X3YEnDbk1h4DkEiMwEgYMF7hGjCL3Q="; + vendorHash = "sha256-uwSVdebZtIpSol553gJC0ItkEqa6qXXOAVFvzjsHSSI="; ldflags = [ "-s" From 3059261b31c9bc21fc59125afe9e5c89cb1edd99 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Wed, 9 Oct 2024 20:35:39 +0200 Subject: [PATCH 20/48] python312Packages.plotly: disable checks on darwin, unbreak --- pkgs/development/python-modules/plotly/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix index 8bd265181aa1..bb44019609dd 100644 --- a/pkgs/development/python-modules/plotly/default.nix +++ b/pkgs/development/python-modules/plotly/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, setuptools, @@ -70,6 +71,9 @@ buildPythonPackage rec { scikit-image ]; + # the check inputs are broken on darwin + doCheck = !stdenv.hostPlatform.isDarwin; + disabledTests = [ # FAILED plotly/matplotlylib/mplexporter/tests/test_basic.py::test_legend_dots - AssertionError: assert '3' == '2' "test_legend_dots" From 31a40d3b346f2ed923610b8b44a0766459bfd984 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Wed, 9 Oct 2024 22:29:09 +0200 Subject: [PATCH 21/48] python312Packages.plotly: deselect 2 tests on linux, unbreak python3.11 --- pkgs/development/python-modules/plotly/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix index bb44019609dd..6a4bed2545ba 100644 --- a/pkgs/development/python-modules/plotly/default.nix +++ b/pkgs/development/python-modules/plotly/default.nix @@ -120,6 +120,9 @@ buildPythonPackage rec { "test_dependencies_not_imported" # FAILED test_init/test_lazy_imports.py::test_lazy_imports - AssertionError: assert 'plotly' not in {'IPython': Date: Thu, 10 Oct 2024 03:35:58 +0200 Subject: [PATCH 22/48] music-assistant: 2.2.6 -> 2.2.7 https://github.com/music-assistant/server/releases/tag/2.2.7 --- pkgs/by-name/mu/music-assistant/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/mu/music-assistant/package.nix b/pkgs/by-name/mu/music-assistant/package.nix index 654fdfedafe9..65f46c184a42 100644 --- a/pkgs/by-name/mu/music-assistant/package.nix +++ b/pkgs/by-name/mu/music-assistant/package.nix @@ -24,14 +24,14 @@ in python.pkgs.buildPythonApplication rec { pname = "music-assistant"; - version = "2.2.6"; + version = "2.2.7"; pyproject = true; src = fetchFromGitHub { owner = "music-assistant"; repo = "server"; rev = "refs/tags/${version}"; - hash = "sha256-BEbcIq+qtJ1OffT2we6qajzvDYDu09rMcmJF1F06xZQ="; + hash = "sha256-GMjeNX8C027F+Wl/HfluWap9pDOeQwlM9qOs0Sp5tTI="; }; patches = [ From 9691062fa9b1e6a261918d39e14621330271a89c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Oct 2024 05:04:41 +0000 Subject: [PATCH 23/48] python312Packages.beancount-black: 1.0.4 -> 1.0.5 --- pkgs/development/python-modules/beancount-black/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/beancount-black/default.nix b/pkgs/development/python-modules/beancount-black/default.nix index c229ec89cea2..4ee5b85f0091 100644 --- a/pkgs/development/python-modules/beancount-black/default.nix +++ b/pkgs/development/python-modules/beancount-black/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "beancount-black"; - version = "1.0.4"; + version = "1.0.5"; disabled = pythonOlder "3.9"; format = "pyproject"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "LaunchPlatform"; repo = "beancount-black"; rev = "refs/tags/${version}"; - hash = "sha256-GrdQCxVsAzCusxxfQHF48doWG8OVrqBayCFof9RHTkE="; + hash = "sha256-vo11mlgDhyc8YFnULJ4AFrANWmGpAMNX5jJ6QaUNqk0="; }; buildInputs = [ poetry-core ]; From 058eeb73aadf7ffff94260c9c9c82187a32e4295 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 10 Oct 2024 06:19:16 +0100 Subject: [PATCH 24/48] subversion: 1.14.3 -> 1.14.4 Changes: https://lists.apache.org/thread/glvmq598wv71thrd9vmbm0q5w6n3124w --- pkgs/applications/version-management/subversion/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 11d9c7fefdff..39966c8c7386 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -136,7 +136,7 @@ let in { subversion = common { - version = "1.14.3"; - sha256 = "sha256-lJ79RRoJQ19+hXNXTHHHtxsZTYRIkPpJzWHSJi6hpEA="; + version = "1.14.4"; + sha256 = "sha256-ROrRFucuSA8Q8SPJFLtvn4wEFxHAQe16v/G4Y0oZnjw="; }; } From 341a21d9413ed42e4252e3784f4a7785fc47b25f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 10 Oct 2024 06:32:54 +0100 Subject: [PATCH 25/48] mold: 2.34.0 -> 2.34.1 Changes: https://github.com/rui314/mold/releases/tag/v2.34.1 --- pkgs/by-name/mo/mold/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index b96a53f9749a..cb230726487f 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { pname = "mold"; - version = "2.34.0"; + version = "2.34.1"; src = fetchFromGitHub { owner = "rui314"; repo = "mold"; rev = "v${version}"; - hash = "sha256-QH9mtigVqt9ZrVBUyQcgUMW/8jtXHSYDWz6pprt6Hlk="; + hash = "sha256-x5fQ+dJFcxwENyTpZpQsMqTLtYQ8uuhUHV8jDpmltWg="; }; nativeBuildInputs = [ From 9ff53ad56be700394e56112d3cacb775f73cddb4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Oct 2024 07:33:18 +0000 Subject: [PATCH 26/48] python312Packages.labelbox: 5.1.0 -> 5.2.1 --- pkgs/development/python-modules/labelbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 09e7f9fa4845..060b8d94441e 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "labelbox"; - version = "5.1.0"; + version = "5.2.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "Labelbox"; repo = "labelbox-python"; rev = "refs/tags/v.${version}"; - hash = "sha256-M55cwT7BrY+8m9ec+2bKDCxGkHJp/c50Gzib4sEg7Bk="; + hash = "sha256-vfhlzkCTm1fhvCpzwAaXWPyXE8/2Yx63fTVHl5CWon4="; }; sourceRoot = "${src.name}/libs/labelbox"; From 1cd96350c6fb0678aff11be0d02f7d9006b0fc0c Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Thu, 10 Oct 2024 10:10:28 +0200 Subject: [PATCH 27/48] librewolf-bin: 129.0.2-1 -> 131.0.2-1 Signed-off-by: Sefa Eyeoglu --- pkgs/by-name/li/librewolf-bin/package.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/li/librewolf-bin/package.nix b/pkgs/by-name/li/librewolf-bin/package.nix index 221d8092ec6b..d6b0960df7c6 100644 --- a/pkgs/by-name/li/librewolf-bin/package.nix +++ b/pkgs/by-name/li/librewolf-bin/package.nix @@ -6,11 +6,11 @@ let pname = "librewolf-bin"; - upstreamVersion = "129.0.2-1"; + upstreamVersion = "131.0.2-1"; version = lib.replaceStrings [ "-" ] [ "." ] upstreamVersion; src = fetchurl { url = "https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/${upstreamVersion}/LibreWolf.x86_64.AppImage"; - hash = "sha256-h4SZnI2BwCSsLADYIxTXu82Jyst1hqYGHt54MnluLss="; + hash = "sha256-Sj3WkY3t8UHsh2v3xPaDb0IGp66YQIw9MKmmFFQCGvk="; }; appimageContents = appimageTools.extract { inherit pname version src; }; in @@ -31,8 +31,5 @@ appimageTools.wrapType2 { platforms = [ "x86_64-linux" ]; mainProgram = "librewolf"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - knownVulnerabilities = [ - "CVE-2024-9680" - ]; }; } From d2255aecf27c92381550f049db778ad25087294d Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 18:45:30 +0200 Subject: [PATCH 28/48] chrony: move to by-name --- ci/OWNERS | 2 +- pkgs/{tools/networking => by-name/ch}/chrony/makefile.patch | 0 .../chrony/default.nix => by-name/ch/chrony/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 1 insertion(+), 3 deletions(-) rename pkgs/{tools/networking => by-name/ch}/chrony/makefile.patch (100%) rename pkgs/{tools/networking/chrony/default.nix => by-name/ch/chrony/package.nix} (100%) diff --git a/ci/OWNERS b/ci/OWNERS index 7c775d469baa..a51ed3ce62db 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -228,7 +228,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt /pkgs/tools/misc/esphome @mweinelt # Network Time Daemons -/pkgs/tools/networking/chrony @thoughtpolice +/pkgs/by-name/ch/chrony @thoughtpolice /pkgs/tools/networking/ntp @thoughtpolice /pkgs/tools/networking/openntpd @thoughtpolice /nixos/modules/services/networking/ntp @thoughtpolice diff --git a/pkgs/tools/networking/chrony/makefile.patch b/pkgs/by-name/ch/chrony/makefile.patch similarity index 100% rename from pkgs/tools/networking/chrony/makefile.patch rename to pkgs/by-name/ch/chrony/makefile.patch diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/by-name/ch/chrony/package.nix similarity index 100% rename from pkgs/tools/networking/chrony/default.nix rename to pkgs/by-name/ch/chrony/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c58aaa8b0f2..f645c420fdee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6269,8 +6269,6 @@ with pkgs; chkrootkit = callPackage ../tools/security/chkrootkit { }; - chrony = callPackage ../tools/networking/chrony { }; - chunkfs = callPackage ../tools/filesystems/chunkfs { }; chunksync = callPackage ../tools/backup/chunksync { }; From c7b8243250984dc32ab038c9e00a7518aa4dc9be Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 18:47:37 +0200 Subject: [PATCH 29/48] chrony: run nixfmt-rfc-style --- pkgs/by-name/ch/chrony/package.nix | 55 +++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index b18cc5642285..39f957b27bb5 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -1,7 +1,18 @@ -{ lib, stdenv, fetchurl, pkg-config -, gnutls, libedit, nspr, nss, readline, texinfo -, libcap, libseccomp, pps-tools -, nixosTests +{ + lib, + stdenv, + fetchurl, + pkg-config, + gnutls, + libedit, + nspr, + nss, + readline, + texinfo, + libcap, + libseccomp, + pps-tools, + nixosTests, }: stdenv.mkDerivation rec { @@ -13,12 +24,27 @@ stdenv.mkDerivation rec { hash = "sha256-Gf4dn0Zk1EWmmpbHHo/bYLzY3yTHPROG4CKH9zZq1CI="; }; - outputs = [ "out" "man" ]; + outputs = [ + "out" + "man" + ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gnutls libedit nspr nss readline texinfo ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap libseccomp pps-tools ]; + buildInputs = + [ + gnutls + libedit + nspr + nss + readline + texinfo + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libcap + libseccomp + pps-tools + ]; configureFlags = [ "--enable-ntp-signd" @@ -37,14 +63,19 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - passthru.tests = { inherit (nixosTests) chrony chrony-ptp; }; + passthru.tests = { + inherit (nixosTests) chrony chrony-ptp; + }; - meta = with lib; { + meta = { description = "Sets your computer's clock from time servers on the Net"; homepage = "https://chrony.tuxfamily.org/"; - license = licenses.gpl2Only; - platforms = with platforms; linux ++ freebsd ++ openbsd; - maintainers = with maintainers; [ fpletz thoughtpolice ]; + license = lib.licenses.gpl2Only; + platforms = with lib.platforms; linux ++ freebsd ++ openbsd; + maintainers = with lib.maintainers; [ + fpletz + thoughtpolice + ]; longDescription = '' Chronyd is a daemon which runs in background on the system. It obtains From c2b47acbcde7962271a7ee6a3d9d52349420d6cb Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 18:52:13 +0200 Subject: [PATCH 30/48] chrony: add vifino to maintainers --- pkgs/by-name/ch/chrony/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index 39f957b27bb5..cf84ba21f9fb 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -75,6 +75,7 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ fpletz thoughtpolice + vifino ]; longDescription = '' From 0e4581a7b67d77ba94d7171ba8afba66fb7b0ecb Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 18:56:06 +0200 Subject: [PATCH 31/48] chrony: remove unnecessary dependencies --- pkgs/by-name/ch/chrony/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index cf84ba21f9fb..231695be6ebe 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -5,9 +5,6 @@ pkg-config, gnutls, libedit, - nspr, - nss, - readline, texinfo, libcap, libseccomp, @@ -35,9 +32,6 @@ stdenv.mkDerivation rec { [ gnutls libedit - nspr - nss - readline texinfo ] ++ lib.optionals stdenv.hostPlatform.isLinux [ From 8c67eec66808f992c264cd1eea0d111e5aa54867 Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 19:03:56 +0200 Subject: [PATCH 32/48] chrony: correct platform list; fix build on darwin --- pkgs/by-name/ch/chrony/package.nix | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index 231695be6ebe..8a0a47eaea88 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + overrideSDK, fetchurl, pkg-config, gnutls, @@ -12,7 +13,17 @@ nixosTests, }: -stdenv.mkDerivation rec { +let + stdenv' = + if stdenv.hostPlatform.isDarwin then + overrideSDK stdenv { + darwinSdkVersion = "11.0"; + darwinMinVersion = "10.13"; + } + else + stdenv; +in +stdenv'.mkDerivation rec { pname = "chrony"; version = "4.5"; @@ -55,7 +66,7 @@ stdenv.mkDerivation rec { patchShebangs test ''; - hardeningEnable = [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; passthru.tests = { inherit (nixosTests) chrony chrony-ptp; @@ -65,7 +76,15 @@ stdenv.mkDerivation rec { description = "Sets your computer's clock from time servers on the Net"; homepage = "https://chrony.tuxfamily.org/"; license = lib.licenses.gpl2Only; - platforms = with lib.platforms; linux ++ freebsd ++ openbsd; + platforms = + with lib.platforms; + builtins.concatLists [ + linux + freebsd + netbsd + darwin + illumos + ]; maintainers = with lib.maintainers; [ fpletz thoughtpolice From 345cfe4d738a1b3ec01400b00b465d3197a587ad Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 19:11:03 +0200 Subject: [PATCH 33/48] chrony: run unit tests; build in parallel --- pkgs/by-name/ch/chrony/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index 8a0a47eaea88..c4af70ae6298 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -64,8 +64,14 @@ stdenv'.mkDerivation rec { postPatch = '' patchShebangs test + + # nts_ke_session unit test fails, so drop it. + rm test/unit/nts_ke_session.c ''; + enableParallelBuilding = true; + doCheck = true; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; passthru.tests = { From a92e2bdc3dc20a09a766db85e4c71cff95f5e50b Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Wed, 9 Oct 2024 19:22:58 +0200 Subject: [PATCH 34/48] chrony: 4.5 -> 4.5.1 --- pkgs/by-name/ch/chrony/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix index c4af70ae6298..9cfdfd020c2e 100644 --- a/pkgs/by-name/ch/chrony/package.nix +++ b/pkgs/by-name/ch/chrony/package.nix @@ -25,11 +25,11 @@ let in stdenv'.mkDerivation rec { pname = "chrony"; - version = "4.5"; + version = "4.6.1"; src = fetchurl { - url = "https://download.tuxfamily.org/chrony/${pname}-${version}.tar.gz"; - hash = "sha256-Gf4dn0Zk1EWmmpbHHo/bYLzY3yTHPROG4CKH9zZq1CI="; + url = "https://chrony-project.org/releases/${pname}-${version}.tar.gz"; + hash = "sha256-Vx/3P78K4wl/BgTsouALHYuy6Rr/4aNJR4X/IdYZnFw="; }; outputs = [ @@ -66,6 +66,7 @@ stdenv'.mkDerivation rec { patchShebangs test # nts_ke_session unit test fails, so drop it. + # TODO: try again when updating? rm test/unit/nts_ke_session.c ''; @@ -80,7 +81,7 @@ stdenv'.mkDerivation rec { meta = { description = "Sets your computer's clock from time servers on the Net"; - homepage = "https://chrony.tuxfamily.org/"; + homepage = "https://chrony-project.org/"; license = lib.licenses.gpl2Only; platforms = with lib.platforms; From ac8c2c28b33be54b95c8ea288d046b3bee41156b Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Wed, 9 Oct 2024 20:10:54 +0100 Subject: [PATCH 35/48] ttop: 1.2.8 -> 1.5.2 --- pkgs/by-name/tt/ttop/lock.json | 22 +++++++++++----------- pkgs/by-name/tt/ttop/package.nix | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/tt/ttop/lock.json b/pkgs/by-name/tt/ttop/lock.json index 16c54d52f980..0b93ea7b4e43 100644 --- a/pkgs/by-name/tt/ttop/lock.json +++ b/pkgs/by-name/tt/ttop/lock.json @@ -10,19 +10,19 @@ "rev": "9f51fc4e94d0960ab63fa6ea274518159720aa69", "sha256": "1n8cx5vl26ppjsn889zmfpa37yhlxahy2va4bqp6q4v4r1dl1h14", "srcDir": "src", - "url": "https://github.com/Yardanico/asciigraph/archive/9f51fc4e94d0960ab63fa6ea274518159720aa69.tar.gz" + "url": "https://github.com/nimbackup/asciigraph/archive/9f51fc4e94d0960ab63fa6ea274518159720aa69.tar.gz" }, { "method": "fetchzip", "packages": [ "illwill" ], - "path": "/nix/store/3lmm3z36qn4gz7bfa209zv0pqrpm3di9-source", - "ref": "v0.3.2", - "rev": "1d12cb36ab7b76c31d2d25fa421013ecb382e625", - "sha256": "0f9yncl5gbdja18mrqf5ixrdgrh95k0khda923dm1jd1x1b7ar8z", + "path": "/nix/store/k3sxzm7qnkgnwkrfd8hc3gkwzbayb1h1-source", + "ref": "v0.4.1", + "rev": "2736d9e0eb6b2bf32cd2fdb8226407a388362cd1", + "sha256": "0hiic5yjsaw6sgl1jzmfpm5g6a5ckzmd29c3pzg30glchn2g94sk", "srcDir": "", - "url": "https://github.com/johnnovak/illwill/archive/1d12cb36ab7b76c31d2d25fa421013ecb382e625.tar.gz" + "url": "https://github.com/johnnovak/illwill/archive/99a120f7f69868b94f5d35ce7e21dd12535de70c.tar.gz" }, { "method": "fetchzip", @@ -52,12 +52,12 @@ "packages": [ "zippy" ], - "path": "/nix/store/dj520pi1q9xh5gplcjs0jsn5wgnaa0cr-source", - "ref": "0.10.11", - "rev": "9560f3d20479fb390c97f731ef8d100f1ed54e6c", - "sha256": "140r42kgynwsnrga4x2mildx9pflwniyhjjzmid2jvnl4i6jrsr4", + "path": "/nix/store/zcd2hmjxlkp1bpb7c9xrpg153ssj3w0b-source", + "ref": "0.10.16", + "rev": "a99f6a7d8a8e3e0213b3cad0daf0ea974bf58e3f", + "sha256": "16qdnyql8d7nm7nwwpq0maflm3p6cpbb2jfaqx6xkld9xkc9lsbv", "srcDir": "src", - "url": "https://github.com/guzba/zippy/archive/9560f3d20479fb390c97f731ef8d100f1ed54e6c.tar.gz" + "url": "https://github.com/guzba/zippy/archive/a99f6a7d8a8e3e0213b3cad0daf0ea974bf58e3f.tar.gz" } ] } diff --git a/pkgs/by-name/tt/ttop/package.nix b/pkgs/by-name/tt/ttop/package.nix index 013bac08fea2..041ecff72011 100644 --- a/pkgs/by-name/tt/ttop/package.nix +++ b/pkgs/by-name/tt/ttop/package.nix @@ -2,13 +2,13 @@ buildNimPackage (finalAttrs: { pname = "ttop"; - version = "1.2.8"; + version = "1.5.2"; src = fetchFromGitHub { owner = "inv2004"; repo = "ttop"; rev = "v${finalAttrs.version}"; - hash = "sha256-QMUrA3OjxlDa1OxptJL7T3SPDTzSwVz6zz+ueh9eovM="; + hash = "sha256-/rs5JjTXxptVHXL3fY8qP6Be3r5N871CEbUH7w6zx4A="; }; lockFile = ./lock.json; From d4fef60fed3eb99ff67f1bbff9c13ac453a7d097 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 10 Oct 2024 12:00:17 +0200 Subject: [PATCH 36/48] python312Packages.tokenizers: 0.20.0 -> 0.20.1 Diff: https://github.com/huggingface/tokenizers/compare/refs/tags/v0.20.0...v0.20.1 Changelog: https://github.com/huggingface/tokenizers/releases/tag/v0.20.1 --- .../python-modules/tokenizers/Cargo.lock | 120 ++++++++++-------- .../python-modules/tokenizers/default.nix | 7 +- 2 files changed, 70 insertions(+), 57 deletions(-) diff --git a/pkgs/development/python-modules/tokenizers/Cargo.lock b/pkgs/development/python-modules/tokenizers/Cargo.lock index aa12731f49c2..476c2cabfae1 100644 --- a/pkgs/development/python-modules/tokenizers/Cargo.lock +++ b/pkgs/development/python-modules/tokenizers/Cargo.lock @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64" @@ -92,9 +92,12 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.1.8" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -183,18 +186,18 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ "darling", "proc-macro2", @@ -204,9 +207,9 @@ dependencies = [ [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", "syn", @@ -268,9 +271,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fnv" @@ -373,9 +376,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "linux-raw-sys" @@ -540,9 +543,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "onig" @@ -597,15 +603,15 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "ppv-lite86" @@ -690,9 +696,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -766,18 +772,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -787,9 +793,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -798,9 +804,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rustc-hash" @@ -810,9 +816,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -835,18 +841,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -855,9 +861,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -865,6 +871,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "smallvec" version = "1.13.2" @@ -891,9 +903,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.72" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -908,9 +920,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -921,18 +933,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -941,7 +953,7 @@ dependencies = [ [[package]] name = "tokenizers" -version = "0.20.0-rc1" +version = "0.20.0-dev.0" dependencies = [ "aho-corasick", "derive_builder", @@ -971,7 +983,7 @@ dependencies = [ [[package]] name = "tokenizers-python" -version = "0.20.0-rc1" +version = "0.20.0-dev.0" dependencies = [ "env_logger", "itertools 0.12.1", @@ -988,9 +1000,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization-alignments" @@ -1003,15 +1015,15 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode_categories" diff --git a/pkgs/development/python-modules/tokenizers/default.nix b/pkgs/development/python-modules/tokenizers/default.nix index edf0c6f3784f..ce8e034b8ce0 100644 --- a/pkgs/development/python-modules/tokenizers/default.nix +++ b/pkgs/development/python-modules/tokenizers/default.nix @@ -52,7 +52,7 @@ let }; "big.txt" = fetchurl { url = "https://norvig.com/big.txt"; - sha256 = "sha256-+gZsfUDw8gGsQUTmUqpiQw5YprOAXscGUPZ42lgE6Hs="; + hash = "sha256-+gZsfUDw8gGsQUTmUqpiQw5YprOAXscGUPZ42lgE6Hs="; }; "bert-wiki.json" = fetchurl { url = "https://s3.amazonaws.com/models.huggingface.co/bert/anthony/doc-pipeline/tokenizer.json"; @@ -74,14 +74,14 @@ let in buildPythonPackage rec { pname = "tokenizers"; - version = "0.20.0"; + version = "0.20.1"; pyproject = true; src = fetchFromGitHub { owner = "huggingface"; repo = "tokenizers"; rev = "refs/tags/v${version}"; - hash = "sha256-uuSHsdyx77YQjf1aiz7EJ/X+6RaOgfmjGqHSlMaCWDI="; + hash = "sha256-QTe1QdmJHSoosNG9cCJS7uQNdoMwgL+CJHQQUX5VtSY="; }; cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; }; @@ -149,6 +149,7 @@ buildPythonPackage rec { meta = { description = "Fast State-of-the-Art Tokenizers optimized for Research and Production"; homepage = "https://github.com/huggingface/tokenizers"; + changelog = "https://github.com/huggingface/tokenizers/releases/tag/v${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ GaetanLepage ]; platforms = lib.platforms.unix; From 43984407b569e852b346fa5b441e60d9071add3b Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Thu, 10 Oct 2024 11:47:29 +0100 Subject: [PATCH 37/48] deno: 1.46.3 -> 2.0.0 Updates deno to v2. Slight refactor of fetcher code for grabbing librusty_v8. Updated the update scripts to use new Deno v2 interfaces and pull latest toml dependency from jsr rather than the deno.land registry. Added release note. --- .../manual/release-notes/rl-2411.section.md | 2 + pkgs/by-name/de/deno/fetchers.nix | 21 ++++++ pkgs/by-name/de/deno/librusty_v8.nix | 25 ++----- pkgs/by-name/de/deno/package.nix | 27 ++++--- pkgs/by-name/de/deno/tests/default.nix | 71 +++++++++++-------- .../de/deno/tests/import-json/index.ts | 2 +- pkgs/by-name/de/deno/update/common.ts | 14 ++-- pkgs/by-name/de/deno/update/librusty_v8.ts | 21 ++---- 8 files changed, 100 insertions(+), 83 deletions(-) create mode 100644 pkgs/by-name/de/deno/fetchers.nix diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 43ab8278329a..2b6573850b87 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -205,6 +205,8 @@ - `grafana` has been updated to version 11.1. This version doesn't support setting `http_addr` to a hostname anymore, an IP address is expected. +- `deno` has been updated to v2 which has breaking changes. + - `knot-dns` has been updated to version 3.4.x. Check the [migration guide](https://www.knot-dns.cz/docs/latest/html/migration.html#upgrade-3-3-x-to-3-4-x) for breaking changes. - `services.kubernetes.kubelet.clusterDns` now accepts a list of DNS resolvers rather than a single string, bringing the module more in line with the upstream Kubelet configuration schema. diff --git a/pkgs/by-name/de/deno/fetchers.nix b/pkgs/by-name/de/deno/fetchers.nix new file mode 100644 index 000000000000..b98b4aa6fa12 --- /dev/null +++ b/pkgs/by-name/de/deno/fetchers.nix @@ -0,0 +1,21 @@ +# not a stable interface, do not reference outside the deno package but make a +# copy if you need +{ + lib, + stdenv, + fetchurl, +}: + +{ + fetchLibrustyV8 = + args: + fetchurl { + name = "librusty_v8-${args.version}"; + url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; + sha256 = args.shas.${stdenv.hostPlatform.system}; + meta = { + inherit (args) version; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; + }; +} diff --git a/pkgs/by-name/de/deno/librusty_v8.nix b/pkgs/by-name/de/deno/librusty_v8.nix index bb9e09d2e2f8..9a9e756ac7e1 100644 --- a/pkgs/by-name/de/deno/librusty_v8.nix +++ b/pkgs/by-name/de/deno/librusty_v8.nix @@ -1,23 +1,12 @@ # auto-generated file -- DO NOT EDIT! -{ lib, stdenv, fetchurl }: +{ fetchLibrustyV8 }: -let - fetch_librusty_v8 = args: fetchurl { - name = "librusty_v8-${args.version}"; - url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; - sha256 = args.shas.${stdenv.hostPlatform.system}; - meta = { - inherit (args) version; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - }; - }; -in -fetch_librusty_v8 { - version = "0.105.0"; +fetchLibrustyV8 { + version = "0.106.0"; shas = { - x86_64-linux = "sha256-9yON4DNPxm4IUZSLZp9VZtzSRPPWX1tEuQLVJmN8cLs="; - aarch64-linux = "sha256-5vAjw2vimjCHKPxjIp5vcwMCWUUDYVlk4QyOeEI0DLY="; - x86_64-darwin = "sha256-o4WRkg4ptiJTNMkorn5K+P8xOJwpChM5PqkZCjP076g="; - aarch64-darwin = "sha256-ZuWBnvxu1PgDtjtguxtj3BhFO01AChlbjAS0kZUws3A="; + x86_64-linux = "sha256-jLYl/CJp2Z+Ut6qZlh6u+CtR8KN+ToNTB+72QnVbIKM="; + aarch64-linux = "sha256-uAkBMg6JXA+aILd8TzDtuaEdM3Axiw43Ad5tZzxNt5w="; + x86_64-darwin = "sha256-60aR0YvQT8KyacY8J3fWKZcf9vny51VUB19NVpurS/A="; + aarch64-darwin = "sha256-pd/I6Mclj2/r/uJTIywnolPKYzeLu1c28d/6D56vkzQ="; }; } diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index 687d837952a2..efb9cdcf7941 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -9,20 +9,26 @@ installShellFiles, libiconv, darwin, - librusty_v8 ? callPackage ./librusty_v8.nix { }, + librusty_v8 ? callPackage ./librusty_v8.nix { + inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8; + }, }: + +let + canExecute = stdenv.buildPlatform.canExecute stdenv.hostPlatform; +in rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.46.3"; + version = "2.0.0"; src = fetchFromGitHub { owner = "denoland"; repo = "deno"; rev = "refs/tags/v${version}"; - hash = "sha256-AM6SjcIHo6Koxcnznhkv3cXoKaMy2TEVpiWe/bczDuA="; + hash = "sha256-3PfAjn2zWgxJOYgKwR7lvXu+rIENIHBMPwMM6dWNgR4="; }; - cargoHash = "sha256-D+CZpb6OTzM5Il0k8GQB7qSONy4myE5yKlaSkLLqHT8="; + cargoHash = "sha256-3r5B9yWXKO/8ah+Etflws8RnlRTAdaaC5HZMlZduyHE="; postPatch = '' # upstream uses lld on aarch64-darwin for faster builds @@ -54,14 +60,13 @@ rustPlatform.buildRustPackage rec { ]) ); - # work around "error: unknown warning group '-Wunused-but-set-parameter'" - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; - buildAndTestSubdir = "cli"; + # work around "error: unknown warning group '-Wunused-but-set-parameter'" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE - RUSTY_V8_ARCHIVE = librusty_v8; + env.RUSTY_V8_ARCHIVE = librusty_v8; # Tests have some inconsistencies between runs with output integration tests # Skipping until resolved @@ -71,15 +76,15 @@ rustPlatform.buildRustPackage rec { find ./target -name libswc_common${stdenv.hostPlatform.extensions.sharedLibrary} -delete ''; - postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + postInstall = lib.optionalString (canExecute) '' installShellCompletion --cmd deno \ --bash <($out/bin/deno completions bash) \ --fish <($out/bin/deno completions fish) \ --zsh <($out/bin/deno completions zsh) ''; - doInstallCheck = true; - installCheckPhase = '' + doInstallCheck = canExecute; + installCheckPhase = lib.optionalString (canExecute) '' runHook preInstallCheck $out/bin/deno --help $out/bin/deno --version | grep "deno ${version}" diff --git a/pkgs/by-name/de/deno/tests/default.nix b/pkgs/by-name/de/deno/tests/default.nix index b6787c913b12..c28490ee0d00 100644 --- a/pkgs/by-name/de/deno/tests/default.nix +++ b/pkgs/by-name/de/deno/tests/default.nix @@ -1,43 +1,54 @@ -{ deno, runCommand, lib, testers }: +{ + deno, + runCommand, + lib, + testers, +}: let testDenoRun = name: - { args ? "" - , dir ? ./. + "/${name}" - , file ? "index.ts" - , expected ? "" - , expectFailure ? false + { + args ? "", + dir ? ./. + "/${name}", + file ? "index.ts", + expected ? "", + expectFailure ? false, }: let command = "deno run ${args} ${dir}/${file}"; in - runCommand "deno-test-${name}" { nativeBuildInputs = [ deno ]; meta.timeout = 60; } '' - HOME=$(mktemp -d) - if output=$(${command} 2>&1); then - if [[ $output =~ '${expected}' ]]; then - echo "Test '${name}' passed" - touch $out + runCommand "deno-test-${name}" + { + nativeBuildInputs = [ deno ]; + meta.timeout = 60; + } + '' + HOME=$(mktemp -d) + if output=$(${command} 2>&1); then + if [[ $output =~ '${expected}' ]]; then + echo "Test '${name}' passed" + touch $out + else + echo -n ${lib.escapeShellArg command} >&2 + echo " output did not match what was expected." >&2 + echo "The expected was:" >&2 + echo '${expected}' >&2 + echo "The output was:" >&2 + echo "$output" >&2 + exit 1 + fi else + if [[ "${toString expectFailure}" == "1" ]]; then + echo "Test '${name}' failed as expected" + touch $out + exit 0 + fi echo -n ${lib.escapeShellArg command} >&2 - echo " output did not match what was expected." >&2 - echo "The expected was:" >&2 - echo '${expected}' >&2 - echo "The output was:" >&2 + echo " returned a non-zero exit code." >&2 echo "$output" >&2 exit 1 fi - else - if [[ "${toString expectFailure}" == "1" ]]; then - echo "Test '${name}' failed as expected" - touch $out - exit 0 - fi - echo -n ${lib.escapeShellArg command} >&2 - echo " returned a non-zero exit code." >&2 - echo "$output" >&2 - exit 1 - fi - ''; + ''; in (lib.mapAttrs testDenoRun { basic = { @@ -59,8 +70,8 @@ in expectFailure = true; dir = ./read-file; }; -}) // -{ +}) +// { version = testers.testVersion { package = deno; command = "deno --version"; diff --git a/pkgs/by-name/de/deno/tests/import-json/index.ts b/pkgs/by-name/de/deno/tests/import-json/index.ts index 525f25f74da2..3768d0c2cb63 100644 --- a/pkgs/by-name/de/deno/tests/import-json/index.ts +++ b/pkgs/by-name/de/deno/tests/import-json/index.ts @@ -1,2 +1,2 @@ -import file from "./data.json" assert { type: "json" }; +import file from "./data.json" with { type: "json" }; console.log(file.msg); diff --git a/pkgs/by-name/de/deno/update/common.ts b/pkgs/by-name/de/deno/update/common.ts index a31805269cb2..ee0d2c0dd1ff 100644 --- a/pkgs/by-name/de/deno/update/common.ts +++ b/pkgs/by-name/de/deno/update/common.ts @@ -3,15 +3,11 @@ interface GHRelease { } const decode = (buffer: Uint8Array) => new TextDecoder("utf-8").decode(buffer); -const decodeTrim = (b: Uint8Array) => decode(b).trimEnd(); export const run = async (command: string, args: string[]) => { - const cmd = Deno.run({ - cmd: [command, ...args], - stdout: "piped", - stderr: "piped", - }); - if (!(await cmd.status()).success) { - const error = await cmd.stderrOutput().then(decodeTrim); + const cmd = new Deno.Command(command, { args }); + const { code, stdout, stderr } = await cmd.output(); + if (code !== 0) { + const error = decode(stderr).trimEnd(); // Known error we can ignore if (error.includes("'allow-unsafe-native-code-during-evaluation'")) { // Extract the target sha256 out of the error @@ -26,7 +22,7 @@ export const run = async (command: string, args: string[]) => { } throw new Error(error); } - return cmd.output().then(decodeTrim); + return decode(stdout).trimEnd(); }; // Exports diff --git a/pkgs/by-name/de/deno/update/librusty_v8.ts b/pkgs/by-name/de/deno/update/librusty_v8.ts index 301af63cb99b..ce739a8167dd 100644 --- a/pkgs/by-name/de/deno/update/librusty_v8.ts +++ b/pkgs/by-name/de/deno/update/librusty_v8.ts @@ -1,4 +1,4 @@ -import * as toml from "https://deno.land/std@0.202.0/toml/mod.ts"; +import * as toml from "jsr:@std/toml@1.0.1"; import { getExistingVersion, logger, run, write } from "./common.ts"; const log = logger("librusty_v8"); @@ -40,22 +40,15 @@ fetchurl { const templateDeps = (version: string, deps: PrefetchResult[]) => `# auto-generated file -- DO NOT EDIT! -{ lib, stdenv, fetchurl }: +{ fetchLibrustyV8 }: -let - fetch_librusty_v8 = args: fetchurl { - name = "librusty_v8-\${args.version}"; - url = "https://github.com/denoland/rusty_v8/releases/download/v\${args.version}/librusty_v8_release_\${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; - sha256 = args.shas.\${stdenv.hostPlatform.system}; - meta = { - inherit (args) version; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - }; - }; -in -fetch_librusty_v8 { +fetchLibrustyV8 { version = "${version}"; shas = { + x86_64-linux = "sha256-jLYl/CJp2Z+Ut6qZlh6u+CtR8KN+ToNTB+72QnVbIKM="; + aarch64-linux = "sha256-uAkBMg6JXA+aILd8TzDtuaEdM3Axiw43Ad5tZzxNt5w="; + x86_64-darwin = "sha256-60aR0YvQT8KyacY8J3fWKZcf9vny51VUB19NVpurS/A="; + aarch64-darwin = "sha256-pd/I6Mclj2/r/uJTIywnolPKYzeLu1c28d/6D56vkzQ="; ${deps.map(({ arch, sha256 }) => ` ${arch.nix} = "${sha256}";`).join("\n")} }; } From dfce2bc3a71cc1a26ea9c184b1827b85b46f464c Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Thu, 10 Oct 2024 11:49:36 +0100 Subject: [PATCH 38/48] deno_1: init at 1.46.3 Add a pre v2 copy of deno as deno_1 to provide some stability until our next release and until 1.46 is fully abandoned soon. deno_1 is expected to be removed prior to 24.11. Added a release note. --- .../manual/release-notes/rl-2411.section.md | 2 +- pkgs/by-name/de/deno/1/librusty_v8.nix | 12 ++ pkgs/by-name/de/deno/1/package.nix | 118 ++++++++++++++++++ pkgs/by-name/de/deno/1/tests/basic.ts | 1 + pkgs/by-name/de/deno/1/tests/default.nix | 79 ++++++++++++ .../de/deno/1/tests/import-json/data.json | 1 + .../de/deno/1/tests/import-json/index.ts | 2 + .../de/deno/1/tests/import-ts/index.ts | 3 + pkgs/by-name/de/deno/1/tests/import-ts/lib.ts | 3 + .../de/deno/1/tests/read-file/data.txt | 1 + .../de/deno/1/tests/read-file/index.ts | 5 + pkgs/top-level/all-packages.nix | 2 + 12 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/de/deno/1/librusty_v8.nix create mode 100644 pkgs/by-name/de/deno/1/package.nix create mode 100644 pkgs/by-name/de/deno/1/tests/basic.ts create mode 100644 pkgs/by-name/de/deno/1/tests/default.nix create mode 100644 pkgs/by-name/de/deno/1/tests/import-json/data.json create mode 100644 pkgs/by-name/de/deno/1/tests/import-json/index.ts create mode 100644 pkgs/by-name/de/deno/1/tests/import-ts/index.ts create mode 100644 pkgs/by-name/de/deno/1/tests/import-ts/lib.ts create mode 100644 pkgs/by-name/de/deno/1/tests/read-file/data.txt create mode 100644 pkgs/by-name/de/deno/1/tests/read-file/index.ts diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 2b6573850b87..b5bfc0955186 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -205,7 +205,7 @@ - `grafana` has been updated to version 11.1. This version doesn't support setting `http_addr` to a hostname anymore, an IP address is expected. -- `deno` has been updated to v2 which has breaking changes. +- `deno` has been updated to v2 which has breaking changes. Upstream will be abandoning v1 soon but for now you can use `deno_1` if you are yet to migrate (will be removed prior to cutting a final 24.11 release). - `knot-dns` has been updated to version 3.4.x. Check the [migration guide](https://www.knot-dns.cz/docs/latest/html/migration.html#upgrade-3-3-x-to-3-4-x) for breaking changes. diff --git a/pkgs/by-name/de/deno/1/librusty_v8.nix b/pkgs/by-name/de/deno/1/librusty_v8.nix new file mode 100644 index 000000000000..f36371830ebf --- /dev/null +++ b/pkgs/by-name/de/deno/1/librusty_v8.nix @@ -0,0 +1,12 @@ +# auto-generated file -- DO NOT EDIT! +{ fetchLibrustyV8 }: + +fetchLibrustyV8 { + version = "0.105.0"; + shas = { + x86_64-linux = "sha256-9yON4DNPxm4IUZSLZp9VZtzSRPPWX1tEuQLVJmN8cLs="; + aarch64-linux = "sha256-5vAjw2vimjCHKPxjIp5vcwMCWUUDYVlk4QyOeEI0DLY="; + x86_64-darwin = "sha256-o4WRkg4ptiJTNMkorn5K+P8xOJwpChM5PqkZCjP076g="; + aarch64-darwin = "sha256-ZuWBnvxu1PgDtjtguxtj3BhFO01AChlbjAS0kZUws3A="; + }; +} diff --git a/pkgs/by-name/de/deno/1/package.nix b/pkgs/by-name/de/deno/1/package.nix new file mode 100644 index 000000000000..3b2774153171 --- /dev/null +++ b/pkgs/by-name/de/deno/1/package.nix @@ -0,0 +1,118 @@ +{ + stdenv, + lib, + callPackage, + fetchFromGitHub, + rustPlatform, + cmake, + protobuf, + installShellFiles, + libiconv, + darwin, + librusty_v8 ? callPackage ./librusty_v8.nix { + inherit (callPackage ../fetchers.nix { }) fetchLibrustyV8; + }, +}: +rustPlatform.buildRustPackage rec { + pname = "deno"; + version = "1.46.3"; + + src = fetchFromGitHub { + owner = "denoland"; + repo = "deno"; + rev = "refs/tags/v${version}"; + hash = "sha256-AM6SjcIHo6Koxcnznhkv3cXoKaMy2TEVpiWe/bczDuA="; + }; + + cargoHash = "sha256-D+CZpb6OTzM5Il0k8GQB7qSONy4myE5yKlaSkLLqHT8="; + + postPatch = '' + # upstream uses lld on aarch64-darwin for faster builds + # within nix lld looks for CoreFoundation rather than CoreFoundation.tbd and fails + substituteInPlace .cargo/config.toml --replace "-fuse-ld=lld " "" + ''; + + # uses zlib-ng but can't dynamically link yet + # https://github.com/rust-lang/libz-sys/issues/158 + nativeBuildInputs = [ + # required by libz-ng-sys crate + cmake + # required by deno_kv crate + protobuf + installShellFiles + ]; + buildInputs = lib.optionals stdenv.isDarwin ( + [ + libiconv + darwin.libobjc + ] + ++ (with darwin.apple_sdk_11_0.frameworks; [ + Security + CoreServices + Metal + MetalPerformanceShaders + Foundation + QuartzCore + ]) + ); + + buildAndTestSubdir = "cli"; + + # work around "error: unknown warning group '-Wunused-but-set-parameter'" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; + # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem + # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE + env.RUSTY_V8_ARCHIVE = librusty_v8; + + # Tests have some inconsistencies between runs with output integration tests + # Skipping until resolved + doCheck = false; + + preInstall = '' + find ./target -name libswc_common${stdenv.hostPlatform.extensions.sharedLibrary} -delete + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd deno \ + --bash <($out/bin/deno completions bash) \ + --fish <($out/bin/deno completions fish) \ + --zsh <($out/bin/deno completions zsh) + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/deno --help + $out/bin/deno --version | grep "deno ${version}" + runHook postInstallCheck + ''; + + passthru.tests = callPackage ./tests { }; + + meta = with lib; { + homepage = "https://deno.land/"; + changelog = "https://github.com/denoland/deno/releases/tag/v${version}"; + description = "Secure runtime for JavaScript and TypeScript"; + longDescription = '' + Deno aims to be a productive and secure scripting environment for the modern programmer. + Deno will always be distributed as a single executable. + Given a URL to a Deno program, it is runnable with nothing more than the ~15 megabyte zipped executable. + Deno explicitly takes on the role of both runtime and package manager. + It uses a standard browser-compatible protocol for loading modules: URLs. + Among other things, Deno is a great replacement for utility scripts that may have been historically written with + bash or python. + ''; + license = licenses.mit; + mainProgram = "deno"; + maintainers = with maintainers; [ jk ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + # NOTE: `aligned_alloc` error on darwin SDK < 10.15. Can't do usual overrideSDK with rust toolchain in current implementation. + # Should be fixed with darwin SDK refactor and can be revisited. + badPlatforms = [ "x86_64-darwin" ]; + }; +} diff --git a/pkgs/by-name/de/deno/1/tests/basic.ts b/pkgs/by-name/de/deno/1/tests/basic.ts new file mode 100644 index 000000000000..5959aa217b3c --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/basic.ts @@ -0,0 +1 @@ +console.log(1 + 1) diff --git a/pkgs/by-name/de/deno/1/tests/default.nix b/pkgs/by-name/de/deno/1/tests/default.nix new file mode 100644 index 000000000000..c28490ee0d00 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/default.nix @@ -0,0 +1,79 @@ +{ + deno, + runCommand, + lib, + testers, +}: +let + testDenoRun = + name: + { + args ? "", + dir ? ./. + "/${name}", + file ? "index.ts", + expected ? "", + expectFailure ? false, + }: + let + command = "deno run ${args} ${dir}/${file}"; + in + runCommand "deno-test-${name}" + { + nativeBuildInputs = [ deno ]; + meta.timeout = 60; + } + '' + HOME=$(mktemp -d) + if output=$(${command} 2>&1); then + if [[ $output =~ '${expected}' ]]; then + echo "Test '${name}' passed" + touch $out + else + echo -n ${lib.escapeShellArg command} >&2 + echo " output did not match what was expected." >&2 + echo "The expected was:" >&2 + echo '${expected}' >&2 + echo "The output was:" >&2 + echo "$output" >&2 + exit 1 + fi + else + if [[ "${toString expectFailure}" == "1" ]]; then + echo "Test '${name}' failed as expected" + touch $out + exit 0 + fi + echo -n ${lib.escapeShellArg command} >&2 + echo " returned a non-zero exit code." >&2 + echo "$output" >&2 + exit 1 + fi + ''; +in +(lib.mapAttrs testDenoRun { + basic = { + dir = ./.; + file = "basic.ts"; + expected = "2"; + }; + import-json = { + expected = "hello from JSON"; + }; + import-ts = { + expected = "hello from ts"; + }; + read-file = { + args = "--allow-read"; + expected = "hello from a file"; + }; + fail-read-file = { + expectFailure = true; + dir = ./read-file; + }; +}) +// { + version = testers.testVersion { + package = deno; + command = "deno --version"; + }; +} diff --git a/pkgs/by-name/de/deno/1/tests/import-json/data.json b/pkgs/by-name/de/deno/1/tests/import-json/data.json new file mode 100644 index 000000000000..7f0de9ebe0b9 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-json/data.json @@ -0,0 +1 @@ +{ "msg": "hello from JSON" } diff --git a/pkgs/by-name/de/deno/1/tests/import-json/index.ts b/pkgs/by-name/de/deno/1/tests/import-json/index.ts new file mode 100644 index 000000000000..525f25f74da2 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-json/index.ts @@ -0,0 +1,2 @@ +import file from "./data.json" assert { type: "json" }; +console.log(file.msg); diff --git a/pkgs/by-name/de/deno/1/tests/import-ts/index.ts b/pkgs/by-name/de/deno/1/tests/import-ts/index.ts new file mode 100644 index 000000000000..34fec283a169 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-ts/index.ts @@ -0,0 +1,3 @@ +import { sayHello } from "./lib.ts" + +sayHello("ts") diff --git a/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts b/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts new file mode 100644 index 000000000000..3b5e05aaaaf3 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts @@ -0,0 +1,3 @@ +export function sayHello(thing: string) { + console.log(`hello from ${thing}`); +} diff --git a/pkgs/by-name/de/deno/1/tests/read-file/data.txt b/pkgs/by-name/de/deno/1/tests/read-file/data.txt new file mode 100644 index 000000000000..7eee1b0c107c --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/read-file/data.txt @@ -0,0 +1 @@ +hello from a file diff --git a/pkgs/by-name/de/deno/1/tests/read-file/index.ts b/pkgs/by-name/de/deno/1/tests/read-file/index.ts new file mode 100644 index 000000000000..be792a3d6628 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/read-file/index.ts @@ -0,0 +1,5 @@ +// trim 'file://' prefix +const thisDir = Deno.mainModule.substring(7, Deno.mainModule.length); +const getParent = (path: string) => path.substring(0, path.lastIndexOf("/")) +const text = await Deno.readTextFile(getParent(thisDir) + "/data.txt"); +console.log(text); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c58aaa8b0f2..1e4d9112e2a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6839,6 +6839,8 @@ with pkgs; deer = callPackage ../shells/zsh/zsh-deer { }; + deno_1 = callPackage ../by-name/de/deno/1/package.nix { }; + deqp-runner = callPackage ../tools/graphics/deqp-runner { }; detox = callPackage ../tools/misc/detox { }; From cb9384a430d23e5b3430e3172ab9672fd6f921ec Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:05:12 +0300 Subject: [PATCH 39/48] linux_testing: 6.12-rc1 -> 6.12-rc2 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index bc537d9c7b30..276306f15da4 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -1,7 +1,7 @@ { "testing": { - "version": "6.12-rc1", - "hash": "sha256:16zwvjcvgndvr0izx0qs2k7v85nvxwlx6j7y2yrdl3shalsdlmx2" + "version": "6.12-rc2", + "hash": "sha256:1cwivhfnfam79dvqj22vr63ng7330w6wihkx01l4l2q7f5kl896x" }, "6.1": { "version": "6.1.112", From 2859f7a0e0e918df6a96b32d62a2c68a51bfc277 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:05:16 +0300 Subject: [PATCH 40/48] linux_6_11: 6.11.2 -> 6.11.3 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 276306f15da4..962fc282c25d 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -28,7 +28,7 @@ "hash": "sha256:0smimvnivdswiggplz9x65d03vdysgr3v9iijbk4f5fva0iypz2z" }, "6.11": { - "version": "6.11.2", - "hash": "sha256:0hlwsfq6brdkdcwdq6d1aq2b210hkqgpmy0y1sa5bfyfp6hgg7pc" + "version": "6.11.3", + "hash": "sha256:0wwv8jaipx352rna6bxj6jklmnm4kcikvzaag59m4zf1mz866wh5" } } From 7c3d301c34dc6e1dd75a84973f535f64e925e4dc Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:05:19 +0300 Subject: [PATCH 41/48] linux_6_10: 6.10.13 -> 6.10.14 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 962fc282c25d..5d558428bd8f 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -24,8 +24,8 @@ "hash": "sha256:186ggr0yz7fgp05qav6k6j72aazvwdljdnf2zwb5q194dafqdbjz" }, "6.10": { - "version": "6.10.13", - "hash": "sha256:0smimvnivdswiggplz9x65d03vdysgr3v9iijbk4f5fva0iypz2z" + "version": "6.10.14", + "hash": "sha256:0gj2z9ax1qv59n2mld0pg2svwi28lbq92ql98vy7crynd2ybrram" }, "6.11": { "version": "6.11.3", From 3a2f84759e1a7af640f0df18c307ee96dc01e9ee Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:05:24 +0300 Subject: [PATCH 42/48] linux_6_6: 6.6.54 -> 6.6.55 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 5d558428bd8f..1db3ebd5b479 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -20,8 +20,8 @@ "hash": "sha256:0axkwfhvq3w2072xjqww476qa3rjglxyqmf72mlp9b5ymswil8kp" }, "6.6": { - "version": "6.6.54", - "hash": "sha256:186ggr0yz7fgp05qav6k6j72aazvwdljdnf2zwb5q194dafqdbjz" + "version": "6.6.55", + "hash": "sha256:17g0s47mqf7pgn93vapxlz99xwx3h4q3lhw6qmns02jxaw4nlqyb" }, "6.10": { "version": "6.10.14", From d46a9a88bde1df829a13788485c725585a888b5e Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:05:42 +0300 Subject: [PATCH 43/48] linux_latest-libre: 19631 -> 19643 --- pkgs/os-specific/linux/kernel/linux-libre.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 7f4f1aa29116..4cdb819a6224 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "19631"; - sha256 = "0hydmrdwqrrmrnk6r583m7c2hq1k68c9c8yqjc0bd6q4x7ys32ci"; + rev = "19643"; + sha256 = "1gnji0hglzh6kj9ssawlrix1vlbcyfjdjx5d9qwpnn2p0sgsq7nj"; } , ... } @ args: From f1e0e18868dbc36b830faffc0f079dffba2c5dfc Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Oct 2024 13:05:57 +0200 Subject: [PATCH 44/48] rtmpdump: fix cross with Clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "clang" is not the correct value for CC when cross compiling — it should be the prefixed, wrapped clang for the host platform. Let's force the use of our original CC in all cases. --- pkgs/tools/video/rtmpdump/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/video/rtmpdump/default.nix b/pkgs/tools/video/rtmpdump/default.nix index 8c5942d85210..4ecddd6b68af 100644 --- a/pkgs/tools/video/rtmpdump/default.nix +++ b/pkgs/tools/video/rtmpdump/default.nix @@ -31,14 +31,17 @@ stdenv.mkDerivation { }) ]; + preBuild = '' + makeFlagsArray+=(CC="$CC") + ''; + makeFlags = [ "prefix=$(out)" "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ] ++ lib.optional gnutlsSupport "CRYPTO=GNUTLS" ++ lib.optional opensslSupport "CRYPTO=OPENSSL" - ++ lib.optional stdenv.hostPlatform.isDarwin "SYS=darwin" - ++ lib.optional stdenv.cc.isClang "CC=clang"; + ++ lib.optional stdenv.hostPlatform.isDarwin "SYS=darwin"; propagatedBuildInputs = [ zlib ] ++ lib.optionals gnutlsSupport [ gnutls nettle ] From b72f50d54d0d0e7428cb39cd39f29e7ed2e7e5ea Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 10 Oct 2024 14:28:31 +0300 Subject: [PATCH 45/48] linux_6_6: 6.6.55 -> 6.6.56 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 1db3ebd5b479..0fcba67ef6d7 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -20,8 +20,8 @@ "hash": "sha256:0axkwfhvq3w2072xjqww476qa3rjglxyqmf72mlp9b5ymswil8kp" }, "6.6": { - "version": "6.6.55", - "hash": "sha256:17g0s47mqf7pgn93vapxlz99xwx3h4q3lhw6qmns02jxaw4nlqyb" + "version": "6.6.56", + "hash": "sha256:158snxmb2silss8bndpzp8fmafp175v11jrlci0jr6c8ivvi4j7p" }, "6.10": { "version": "6.10.14", From fad435d087b677063d2f5c4ae4b81edd015df0b3 Mon Sep 17 00:00:00 2001 From: Maxime Brunet Date: Thu, 10 Oct 2024 12:29:27 +0000 Subject: [PATCH 46/48] terraform-docs: install shell completions (#347637) --- pkgs/by-name/te/terraform-docs/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/te/terraform-docs/package.nix b/pkgs/by-name/te/terraform-docs/package.nix index df4457de8e54..6a395109426f 100644 --- a/pkgs/by-name/te/terraform-docs/package.nix +++ b/pkgs/by-name/te/terraform-docs/package.nix @@ -1,7 +1,9 @@ { + stdenv, lib, buildGoModule, fetchFromGitHub, + installShellFiles, }: buildGoModule rec { pname = "terraform-docs"; @@ -16,6 +18,17 @@ buildGoModule rec { vendorHash = "sha256-aweKTHQBYYqSp8CymwhnVv1WNQ7cZ1/bJNz7DSo7PKc="; + excludedPackages = [ "scripts" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + $out/bin/terraform-docs completion bash >terraform-docs.bash + $out/bin/terraform-docs completion fish >terraform-docs.fish + $out/bin/terraform-docs completion zsh >terraform-docs.zsh + installShellCompletion terraform-docs.{bash,fish,zsh} + ''; + meta = with lib; { description = "Utility to generate documentation from Terraform modules in various output formats"; mainProgram = "terraform-docs"; From d579d17ebc49e2a6f4ef56636aa4d5e2eedfbeaa Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 10 Oct 2024 13:34:03 +0200 Subject: [PATCH 47/48] zed-editor: 0.156.0 -> 0.156.1 Diff: https://github.com/zed-industries/zed/compare/refs/tags/v0.156.0...0.156.1 Changelog: https://github.com/zed-industries/zed/releases/tag/v0.156.1 --- pkgs/by-name/ze/zed-editor/Cargo.lock | 2 +- pkgs/by-name/ze/zed-editor/package.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ze/zed-editor/Cargo.lock b/pkgs/by-name/ze/zed-editor/Cargo.lock index 7c92ef0f5257..446a1b96b34f 100644 --- a/pkgs/by-name/ze/zed-editor/Cargo.lock +++ b/pkgs/by-name/ze/zed-editor/Cargo.lock @@ -14398,7 +14398,7 @@ dependencies = [ [[package]] name = "zed" -version = "0.156.0" +version = "0.156.1" dependencies = [ "activity_indicator", "anyhow", diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index 1fc895ae5ed4..186e1b0e40a0 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -86,13 +86,13 @@ let in rustPlatform.buildRustPackage rec { pname = "zed-editor"; - version = "0.156.0"; + version = "0.156.1"; src = fetchFromGitHub { owner = "zed-industries"; repo = "zed"; rev = "refs/tags/v${version}"; - hash = "sha256-HdiEVRssMJmn+ifa0oWhHzRXB9L4oyji0DZ3PopHSoY="; + hash = "sha256-cu+XcFJ6VAP+7fqVhptnjDNpRkq/lRmJBCNkiy5Mka8="; fetchSubmodules = true; }; From 7ba314ab3e0f792d86f175ce4efd335b0c634773 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 10 Oct 2024 09:56:43 -0700 Subject: [PATCH 48/48] libclc: move from aliases into all-packages --- pkgs/top-level/aliases.nix | 1 - pkgs/top-level/all-packages.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 0e76b963b08d..c3d7c1692386 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -831,7 +831,6 @@ mapAliases { libbpf_1 = libbpf; # Added 2022-12-06 libbson = mongoc; # Added 2024-03-11 libcap_pam = throw "'libcap_pam' has been replaced with 'libcap'"; # Converted to throw 2023-09-10 - libclc = llvmPackages_18.libclc; # Added 2023-10-28 libcxxabi = throw "'libcxxabi' was merged into 'libcxx'"; # Converted to throw 2024-03-08 libdwarf_20210528 = throw "'libdwarf_20210528' has been removed because it is not used in nixpkgs, move to libdwarf"; # Added 2024-03-23 libgme = game-music-emu; # Added 2022-07-20 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e225df92669c..8969bbbac0e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15272,6 +15272,7 @@ with pkgs; mlir_16 = llvmPackages_16.mlir; mlir_17 = llvmPackages_17.mlir; + libclc = llvmPackages.libclc; libllvm = llvmPackages.libllvm; llvm-manpages = llvmPackages.llvm-manpages;