From 42e7fd46e76d48d07874635d1873c72dee3ebd72 Mon Sep 17 00:00:00 2001 From: Jonathan Zielinski Date: Wed, 17 Jul 2024 13:03:57 +0000 Subject: [PATCH 01/64] nixos/nvidia-container-toolkit: add device-name-strategy option Containerd will fail to inject CDI devices if you've been using the uuid naming strategy rather than the default one. --- .../nvidia-container-toolkit/cdi-generate.nix | 2 ++ .../hardware/nvidia-container-toolkit/default.nix | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix b/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix index ca769cc44e5c..360a832e28cb 100644 --- a/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix +++ b/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix @@ -1,4 +1,5 @@ { + deviceNameStrategy, glibc, jq, lib, @@ -25,6 +26,7 @@ writeScriptBin "nvidia-cdi-generator" function cdiGenerate { ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \ --format json \ + --device-name-strategy ${deviceNameStrategy} \ --ldconfig-path ${lib.getExe' glibc "ldconfig"} \ --library-search-path ${lib.getLib nvidia-driver}/lib \ --nvidia-ctk-path ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix index bd12667a5647..fe4999bfbdbb 100644 --- a/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix +++ b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix @@ -52,6 +52,17 @@ ''; }; + device-name-strategy = lib.mkOption { + default = "index"; + type = lib.types.enum [ "index" "uuid" "type-index" ]; + description = '' + Specify the strategy for generating device names, + passed to `nvidia-ctk cdi generate`. This will affect how + you reference the device using `nvidia.com/gpu=` in + the container runtime. + ''; + }; + mount-nvidia-docker-1-directories = lib.mkOption { default = true; type = lib.types.bool; @@ -119,6 +130,7 @@ script = pkgs.callPackage ./cdi-generate.nix { inherit (config.hardware.nvidia-container-toolkit) mounts; nvidia-driver = config.hardware.nvidia.package; + deviceNameStrategy = config.hardware.nvidia-container-toolkit.device-name-strategy; }; in lib.getExe script; From 437d3e574d63aa7bf5ffcebe92ca8effdb2c7ef4 Mon Sep 17 00:00:00 2001 From: yzx9 Date: Tue, 6 Aug 2024 10:40:12 +0800 Subject: [PATCH 02/64] logseq: add darwin support --- pkgs/by-name/lo/logseq/package.nix | 51 ++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/lo/logseq/package.nix b/pkgs/by-name/lo/logseq/package.nix index 124c2d011716..2ede057a2fc7 100644 --- a/pkgs/by-name/lo/logseq/package.nix +++ b/pkgs/by-name/lo/logseq/package.nix @@ -2,6 +2,7 @@ , stdenv , fetchurl , appimageTools +, unzip , makeWrapper # Notice: graphs will not sync without matching upstream's major electron version # the specific electron version is set at top-level file to preserve override interface. @@ -13,32 +14,44 @@ }: stdenv.mkDerivation (finalAttrs: let - inherit (finalAttrs) pname version src appimageContents; - + inherit (finalAttrs) pname version src; + inherit (stdenv.hostPlatform) system; + selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}"); + suffix = selectSystem { + x86_64-linux = "linux-x64-${version}.AppImage"; + x86_64-darwin = "darwin-x64-${version}.zip"; + aarch64-darwin = "darwin-arm64-${version}.zip"; + }; + hash = selectSystem { + x86_64-linux = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc="; + x86_64-darwin = "sha256-0i9ozqBSeV/y8v+YEmQkbY0V6JHOv6tKub4O5Fdx2fQ="; + aarch64-darwin = "sha256-Uvv96XWxpFj14wPH0DwPT+mlf3Z2dy1g/z8iBt5Te7Q="; + }; in { pname = "logseq"; version = "0.10.9"; - src = fetchurl { - url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage"; - hash = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc="; - name = "${pname}-${version}.AppImage"; + inherit hash; + url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-${suffix}"; + name = lib.optionalString stdenv.isLinux "${pname}-${version}.AppImage"; }; - appimageContents = appimageTools.extract { - inherit pname src version; - }; + nativeBuildInputs = [ makeWrapper ] + ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ] + ++ lib.optionals stdenv.isDarwin [ unzip ]; + buildInputs = [ stdenv.cc.cc.lib ]; - dontUnpack = true; + dontUnpack = stdenv.isLinux; dontConfigure = true; dontBuild = true; - nativeBuildInputs = [ makeWrapper autoPatchelfHook ]; - buildInputs = [ stdenv.cc.cc.lib ]; - installPhase = '' runHook preInstall - + '' + lib.optionalString stdenv.isLinux ( + let + appimageContents = appimageTools.extract { inherit pname src version; }; + in + '' mkdir -p $out/bin $out/share/${pname} $out/share/applications cp -a ${appimageContents}/{locales,resources} $out/share/${pname} cp -a ${appimageContents}/Logseq.desktop $out/share/applications/${pname}.desktop @@ -55,11 +68,15 @@ in { substituteInPlace $out/share/applications/${pname}.desktop \ --replace Exec=Logseq Exec=${pname} \ --replace Icon=Logseq Icon=${pname} - + '') + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/{Applications/Logseq.app,bin} + cp -R . $out/Applications/Logseq.app + makeWrapper $out/Applications/Logseq.app/Contents/MacOS/Logseq $out/bin/${pname} + '' + '' runHook postInstall ''; - postFixup = '' + postFixup = lib.optionalString stdenv.isLinux '' # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs makeWrapper ${electron}/bin/electron $out/bin/${pname} \ --set "LOCAL_GIT_DIRECTORY" ${git} \ @@ -76,7 +93,7 @@ in { license = lib.licenses.agpl3Plus; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; maintainers = [ ]; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin; mainProgram = "logseq"; }; }) From c45e7dff861237f205eb5ef9ebf47fb107e2957e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 6 Aug 2024 10:02:04 +0000 Subject: [PATCH 03/64] infisical: 0.26.1 -> 0.27.0 --- pkgs/development/tools/infisical/default.nix | 2 +- pkgs/development/tools/infisical/hashes.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/infisical/default.nix b/pkgs/development/tools/infisical/default.nix index 0c548eb22060..2533824b93e5 100644 --- a/pkgs/development/tools/infisical/default.nix +++ b/pkgs/development/tools/infisical/default.nix @@ -15,7 +15,7 @@ let buildHashes = builtins.fromJSON (builtins.readFile ./hashes.json); # the version of infisical - version = "0.26.1"; + version = "0.27.0"; # the platform-specific, statically linked binary src = diff --git a/pkgs/development/tools/infisical/hashes.json b/pkgs/development/tools/infisical/hashes.json index d167f6c7bfb0..62f1fc5eb525 100644 --- a/pkgs/development/tools/infisical/hashes.json +++ b/pkgs/development/tools/infisical/hashes.json @@ -1,6 +1,6 @@ { "_comment": "@generated by pkgs/development/tools/infisical/update.sh" -, "x86_64-linux": "sha256-53Nk24THJ16elOTuPkXohxvLeSn1cXyI8PIogpg7b2g=" -, "x86_64-darwin": "sha256-iO/WPfLSmYQJRuuPSfXbrb1p75czP4FQkc3ryQ/PWF4=" -, "aarch64-linux": "sha256-7FCxF6M9J6NYTeXw98uu3GjWsXsTZ+eQdKgbutGKDtI=" -, "aarch64-darwin": "sha256-lV2jye63ZWlMIa41+xbfe39kBHKwnXtNsBlM+WZvWhQ=" +, "x86_64-linux": "sha256-M/LYq3W200U3YCjKDQOlRKaKZiflvL/2jM9G1brh720=" +, "x86_64-darwin": "sha256-Xrp05HeCRysPSo3MIFcCIl1U+0TVwB9JAfAb8q4dt5E=" +, "aarch64-linux": "sha256-hKR7CemWqqiPDp675k8ClQAzC6SI9BXADCiFge2LzmU=" +, "aarch64-darwin": "sha256-uXhA41bdCrgegOBB5YBjaTUbwbm1uKNF9oKfrQu8w94=" } From faf1e1700a55d0eb60de04bac4caddc0171de54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Wed, 7 Aug 2024 08:48:43 +0200 Subject: [PATCH 04/64] keepassxc-go: unbreak on darwin --- pkgs/by-name/ke/keepassxc-go/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ke/keepassxc-go/package.nix b/pkgs/by-name/ke/keepassxc-go/package.nix index 9544b4775eea..06a80b652abf 100644 --- a/pkgs/by-name/ke/keepassxc-go/package.nix +++ b/pkgs/by-name/ke/keepassxc-go/package.nix @@ -20,6 +20,11 @@ buildGoModule rec { vendorHash = "sha256-jscyNyVr+RDN1EaxIOc3aYCAVT+1eO/c+dxEsIorDIs="; + checkFlags = [ + # Test tries to monkey-patch the stdlib, fails with permission denied error. + "-skip=TestKeystore" + ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' local INSTALL="$out/bin/keepassxc-go" installShellCompletion --cmd keepassxc-go \ From 75a10ed3018c594e49b66d9821ec75f5329ca16c Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Wed, 7 Aug 2024 14:47:08 -0600 Subject: [PATCH 05/64] picocrypt: 1.38 -> 1.39 --- pkgs/by-name/pi/picocrypt/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pi/picocrypt/package.nix b/pkgs/by-name/pi/picocrypt/package.nix index c947c30d2c66..3fe19f448dcd 100644 --- a/pkgs/by-name/pi/picocrypt/package.nix +++ b/pkgs/by-name/pi/picocrypt/package.nix @@ -15,18 +15,18 @@ buildGoModule rec { pname = "picocrypt"; - version = "1.38"; + version = "1.39"; src = fetchFromGitHub { owner = "Picocrypt"; repo = "Picocrypt"; - rev = version; - hash = "sha256-rKYqzXdQrSLZhPXb4NeLSSrNJSfztsdPYbWWn+7ZYJo="; + rev = "refs/tags/${version}"; + hash = "sha256-Nt+oAdvNnK1TfCuS8MsAK7H1nC6tw115fzp8MjNP7qc="; }; sourceRoot = "${src.name}/src"; - vendorHash = "sha256-lc34GeO8y5XGRk0x6ghw/m/Ew7TDn6MOk4fc2u9UofQ="; + vendorHash = "sha256-2TeZdL13OP1sTuyAOGdCS8g2YY8+fsD50q6nfAptisQ="; ldflags = [ "-s" From 9438548689f6a5ece83607312b75e513683fe031 Mon Sep 17 00:00:00 2001 From: duli Date: Thu, 8 Aug 2024 21:56:10 +0800 Subject: [PATCH 06/64] emacs: fix missing ccache libary path If we only override stdenv with ccacheStdenv, we will miss libgcc. However, both stdenv and ccacheStdenv can find libgcc in cc.cc.lib. related issue: #303625 --- pkgs/applications/editors/emacs/make-emacs.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix index 868079e037f0..f995b073d377 100644 --- a/pkgs/applications/editors/emacs/make-emacs.nix +++ b/pkgs/applications/editors/emacs/make-emacs.nix @@ -136,8 +136,8 @@ let libGccJitLibraryPaths = [ "${lib.getLib libgccjit}/lib/gcc" "${lib.getLib stdenv.cc.libc}/lib" - ] ++ lib.optionals (stdenv.cc?cc.libgcc) [ - "${lib.getLib stdenv.cc.cc.libgcc}/lib" + ] ++ lib.optionals (stdenv.cc?cc.lib.libgcc) [ + "${lib.getLib stdenv.cc.cc.lib.libgcc}/lib" ]; inherit (if variant == "macport" From 274687bee12a0ec94c54a0289266239d1fe8f499 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 10 Aug 2024 00:35:41 +0000 Subject: [PATCH 07/64] egl-wayland: 1.1.14 -> 1.1.15 --- pkgs/development/libraries/egl-wayland/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/egl-wayland/default.nix b/pkgs/development/libraries/egl-wayland/default.nix index 3cb34f871e3a..ac9c0085dbf1 100644 --- a/pkgs/development/libraries/egl-wayland/default.nix +++ b/pkgs/development/libraries/egl-wayland/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { pname = "egl-wayland"; - version = "1.1.14"; + version = "1.1.15"; outputs = [ "out" "dev" ]; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { owner = "Nvidia"; repo = pname; rev = version; - hash = "sha256-MD+D/dRem3ONWGPoZ77j2UKcOCUuQ0nrahEQkNVEUnI="; + hash = "sha256-7spfmYwJ6U97x83219/kMwdJXS2vir+U0MUnYWJOLB4="; }; postPatch = '' From 0fbd43f25848a6fb5355e0872aee1736138203f2 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Sun, 11 Aug 2024 02:26:34 -0600 Subject: [PATCH 08/64] picocrypt: 1.39 -> 1.40 --- pkgs/by-name/pi/picocrypt/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pi/picocrypt/package.nix b/pkgs/by-name/pi/picocrypt/package.nix index 3fe19f448dcd..b0310ea54f66 100644 --- a/pkgs/by-name/pi/picocrypt/package.nix +++ b/pkgs/by-name/pi/picocrypt/package.nix @@ -15,18 +15,18 @@ buildGoModule rec { pname = "picocrypt"; - version = "1.39"; + version = "1.40"; src = fetchFromGitHub { owner = "Picocrypt"; repo = "Picocrypt"; rev = "refs/tags/${version}"; - hash = "sha256-Nt+oAdvNnK1TfCuS8MsAK7H1nC6tw115fzp8MjNP7qc="; + hash = "sha256-L3UkWUT6zsUj5C/RHVvaTbt6E8VERk3hZNBGSGbON3c="; }; sourceRoot = "${src.name}/src"; - vendorHash = "sha256-2TeZdL13OP1sTuyAOGdCS8g2YY8+fsD50q6nfAptisQ="; + vendorHash = "sha256-YYQMJXyVANDrYsd7B/q8L5dpvbzxqjLvm6v20PnpAkY="; ldflags = [ "-s" From 39572bf5dd71dbb8f550183ec43405e1248b5295 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 11 Aug 2024 18:46:24 +0000 Subject: [PATCH 09/64] python312Packages.auditwheel: 6.0.0 -> 6.1.0 --- pkgs/development/python-modules/auditwheel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/auditwheel/default.nix b/pkgs/development/python-modules/auditwheel/default.nix index 6864f6bece83..1f9325966292 100644 --- a/pkgs/development/python-modules/auditwheel/default.nix +++ b/pkgs/development/python-modules/auditwheel/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "auditwheel"; - version = "6.0.0"; + version = "6.1.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ZCLEq2Qh0j41XJHplGkmzVMrn99G8rX/2vGr/p7inmc="; + hash = "sha256-O9xobndM+eNV6SSw/lpWLVXKo4XXIjT/57gbN426Ng8="; }; nativeBuildInputs = [ setuptools-scm ]; From ac04e32b30b0974d566e2dd1542a6f098088d697 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 11 Aug 2024 18:49:59 +0000 Subject: [PATCH 10/64] python312Packages.json-repair: 0.27.0 -> 0.27.2 --- pkgs/development/python-modules/json-repair/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/json-repair/default.nix b/pkgs/development/python-modules/json-repair/default.nix index 72037ce322b3..dd535e4cbdd8 100644 --- a/pkgs/development/python-modules/json-repair/default.nix +++ b/pkgs/development/python-modules/json-repair/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "json-repair"; - version = "0.27.0"; + version = "0.27.2"; pyproject = true; src = fetchFromGitHub { owner = "mangiucugna"; repo = "json_repair"; rev = "refs/tags/${version}"; - hash = "sha256-kaTwdS2zRt94pJko9AKEvszLR4z62u3ZrKlfXkJr5TQ="; + hash = "sha256-NYY76sIp4XirVifOPOs6iEzP93ERzNIHAvpgU4+fi24="; }; build-system = [ setuptools ]; From 39209e04a17427974c228c602005dc2f1e832533 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 11 Aug 2024 18:50:52 +0000 Subject: [PATCH 11/64] python312Packages.commitizen: 3.28.0 -> 3.29.0 --- pkgs/development/python-modules/commitizen/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/commitizen/default.nix b/pkgs/development/python-modules/commitizen/default.nix index 7f2870ae493c..e48a95b98bcf 100644 --- a/pkgs/development/python-modules/commitizen/default.nix +++ b/pkgs/development/python-modules/commitizen/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { pname = "commitizen"; - version = "3.28.0"; + version = "3.29.0"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -39,7 +39,7 @@ buildPythonPackage rec { owner = "commitizen-tools"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Z/L8TvMoee3qB+P6HUJEQxqw3nDEbBQabQOUyx0iugw="; + hash = "sha256-7EQFip8r2Ey7Rbbwns1gvhsBOj7Hjm94NYhq8aANDIo="; }; pythonRelaxDeps = [ From 68a70f098a31332531d8195bd33650f6c2c811e6 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 12 Aug 2024 14:46:21 +1200 Subject: [PATCH 12/64] python3.pkgs.can: Rename to python-can This is correct name on PyPi: https://pypi.org/project/python-can --- pkgs/development/python-modules/canopen/default.nix | 4 ++-- pkgs/development/python-modules/cantools/default.nix | 4 ++-- pkgs/development/python-modules/pycyphal/default.nix | 4 ++-- .../python-modules/{can => python-can}/default.nix | 2 +- pkgs/development/python-modules/scapy/default.nix | 4 ++-- pkgs/servers/klipper/default.nix | 2 +- pkgs/tools/security/expliot/default.nix | 2 +- pkgs/tools/security/gallia/default.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 4 ++-- 10 files changed, 15 insertions(+), 14 deletions(-) rename pkgs/development/python-modules/{can => python-can}/default.nix (98%) diff --git a/pkgs/development/python-modules/canopen/default.nix b/pkgs/development/python-modules/canopen/default.nix index 90351fd00776..320dfd776b2d 100644 --- a/pkgs/development/python-modules/canopen/default.nix +++ b/pkgs/development/python-modules/canopen/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchPypi, setuptools-scm, - can, + python-can, canmatrix, pytestCheckHook, pythonOlder, @@ -24,7 +24,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ - can + python-can canmatrix ]; diff --git a/pkgs/development/python-modules/cantools/default.nix b/pkgs/development/python-modules/cantools/default.nix index 8aacef138db7..a2a65df02e91 100644 --- a/pkgs/development/python-modules/cantools/default.nix +++ b/pkgs/development/python-modules/cantools/default.nix @@ -3,7 +3,7 @@ argparse-addons, bitstruct, buildPythonPackage, - can, + python-can, crccheck, diskcache, fetchPypi, @@ -36,7 +36,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ argparse-addons bitstruct - can + python-can crccheck diskcache textparser diff --git a/pkgs/development/python-modules/pycyphal/default.nix b/pkgs/development/python-modules/pycyphal/default.nix index d1ccc9497678..698a9e20595a 100644 --- a/pkgs/development/python-modules/pycyphal/default.nix +++ b/pkgs/development/python-modules/pycyphal/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchFromGitHub, pythonOlder, - can, + python-can, cobs, libpcap, nunavut, @@ -34,7 +34,7 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - transport-can-pythoncan = [ can ] ++ can.optional-dependencies.serial; + transport-can-pythoncan = [ python-can ] ++ python-can.optional-dependencies.serial; transport-serial = [ cobs pyserial diff --git a/pkgs/development/python-modules/can/default.nix b/pkgs/development/python-modules/python-can/default.nix similarity index 98% rename from pkgs/development/python-modules/can/default.nix rename to pkgs/development/python-modules/python-can/default.nix index f4dbf575be2d..26bd3a27474e 100644 --- a/pkgs/development/python-modules/can/default.nix +++ b/pkgs/development/python-modules/python-can/default.nix @@ -19,7 +19,7 @@ }: buildPythonPackage rec { - pname = "can"; + pname = "python-can"; version = "4.4.2"; pyproject = true; diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix index 2b643a089512..6e1ab5aad6e3 100644 --- a/pkgs/development/python-modules/scapy/default.nix +++ b/pkgs/development/python-modules/scapy/default.nix @@ -7,7 +7,7 @@ pycrypto, ecdsa, # TODO mock, - can, + python-can, brotli, withOptionalDeps ? true, tcpdump, @@ -86,7 +86,7 @@ buildPythonPackage rec { doCheck = false; nativeCheckInputs = [ mock - can + python-can brotli ]; checkPhase = '' diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix index e749500019ac..65f018e0b0d4 100644 --- a/pkgs/servers/klipper/default.nix +++ b/pkgs/servers/klipper/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { makeWrapper ]; - buildInputs = [ (python3.withPackages (p: with p; [ can cffi pyserial greenlet jinja2 markupsafe numpy ])) ]; + buildInputs = [ (python3.withPackages (p: with p; [ python-can cffi pyserial greenlet jinja2 markupsafe numpy ])) ]; # we need to run this to prebuild the chelper. postBuild = '' diff --git a/pkgs/tools/security/expliot/default.nix b/pkgs/tools/security/expliot/default.nix index 028cacb6a0ba..b94356d97466 100644 --- a/pkgs/tools/security/expliot/default.nix +++ b/pkgs/tools/security/expliot/default.nix @@ -47,7 +47,7 @@ buildPythonApplication rec { aiocoap awsiotpythonsdk bluepy - can + python-can cmd2 cryptography paho-mqtt diff --git a/pkgs/tools/security/gallia/default.nix b/pkgs/tools/security/gallia/default.nix index 2f8c6da988c0..c671a891124f 100644 --- a/pkgs/tools/security/gallia/default.nix +++ b/pkgs/tools/security/gallia/default.nix @@ -27,7 +27,7 @@ python3.pkgs.buildPythonApplication rec { aiohttp aiosqlite argcomplete - can + python-can exitcode httpx platformdirs diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index cca1a0faa604..0158a964ae2a 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -87,6 +87,7 @@ mapAliases ({ BTrees = btrees; # added 2023-02-19 cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21 cadquery = throw "cadquery was removed, because it was disabled on all python version since 3.8 and marked as broken"; # added 2024-05-13 + can = python-can; # added 2024-08-12 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 case = throw "case has been removed, since it is an unused leaf package with a dependency on the nose test framework"; # added 2024-07-08 cchardet = faust-cchardet; # added 2023-03-02 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d28a3dcb4c18..aad4ff8cb59e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1961,8 +1961,6 @@ self: super: with self; { camel-converter = callPackage ../development/python-modules/camel-converter { }; - can = callPackage ../development/python-modules/can { }; - canals = callPackage ../development/python-modules/canals { }; canmatrix = callPackage ../development/python-modules/canmatrix { }; @@ -10428,6 +10426,8 @@ self: super: with self; { pywebcopy = callPackage ../development/python-modules/pywebcopy { }; + python-can = callPackage ../development/python-modules/python-can { }; + python-codon-tables = callPackage ../development/python-modules/python-codon-tables { }; python-creole = callPackage ../development/python-modules/python-creole { }; From 3cd7d5479684f7b95fced5a503f70dc5d4147209 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 12 Aug 2024 10:36:16 +0000 Subject: [PATCH 13/64] broot: 1.40.0 -> 1.41.1 --- pkgs/tools/misc/broot/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 76626d88d2b0..820cec6c0796 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -19,16 +19,16 @@ rustPlatform.buildRustPackage rec { pname = "broot"; - version = "1.40.0"; + version = "1.41.1"; src = fetchFromGitHub { owner = "Canop"; repo = pname; rev = "v${version}"; - hash = "sha256-3KStqeT/SZa7KGFEqwGEvchMB6MSME5jPfGSPQ+xZpw="; + hash = "sha256-MUwW9b5rXErjNBvF+O3zA/OlSl0Zy8pTRJLNMWSY8jo="; }; - cargoHash = "sha256-E1MNlmJnkV+VKHMbuTkuItIi7bG0TrmfD/8P47c+Qhc="; + cargoHash = "sha256-GaYQqFRUJZ4Mpe+DKD+KmhrgK5I/DkJTJaA/PDifXbo="; nativeBuildInputs = [ installShellFiles From 216a08c659b920fbed551a724a89ca3d73ec389e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 12 Aug 2024 16:51:09 +0000 Subject: [PATCH 14/64] python312Packages.aioweenect: 1.1.2 -> 1.1.5 --- pkgs/development/python-modules/aioweenect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioweenect/default.nix b/pkgs/development/python-modules/aioweenect/default.nix index f49533da9de2..12aa6afaf797 100644 --- a/pkgs/development/python-modules/aioweenect/default.nix +++ b/pkgs/development/python-modules/aioweenect/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "aioweenect"; - version = "1.1.2"; + version = "1.1.5"; pyproject = true; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "eifinger"; repo = "aioweenect"; rev = "refs/tags/v${version}"; - hash = "sha256-qVhF+gy5qcH/okuncDuzbAUPonkmQo1/QwOjC70IV4w="; + hash = "sha256-2qTjRXQdTExqY5/ckB6UrkmavzjZK/agfL9+o6fXS0M="; }; postPatch = '' From 9ec78f5bc16123130c696bee47dd6741b07ac0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 11:14:08 -0700 Subject: [PATCH 15/64] ledger-autosync: fix build with Python 3.12 --- .../office/ledger-autosync/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/office/ledger-autosync/default.nix b/pkgs/applications/office/ledger-autosync/default.nix index 55b89f195e69..6e8f62bbe44e 100644 --- a/pkgs/applications/office/ledger-autosync/default.nix +++ b/pkgs/applications/office/ledger-autosync/default.nix @@ -1,6 +1,7 @@ { lib , python3Packages , fetchFromGitHub +, fetchpatch2 , ledger , hledger , useLedger ? true @@ -20,6 +21,19 @@ python3Packages.buildPythonApplication rec { sha256 = "0n3y4qxsv1cyvyap95h3rj4bj1sinyfgsajygm7s8di3j5aabqr2"; }; + patches = [ + (fetchpatch2 { + name = "drop-distutils.patch"; + url = "https://github.com/egh/ledger-autosync/commit/b7a2a185b9c3b17764322dcc80153410d12e6a5f.patch"; + hash = "sha256-qKuTpsNFuS00yRAH4VGpMA249ml0BGZsGVb75WrBWEo="; + }) + (fetchpatch2 { + name = "drop-imp.patch"; + url = "https://github.com/egh/ledger-autosync/commit/453d92ad279e6c90fadf835d1c39189a1179eb17.patch"; + hash = "sha256-mncMvdWldAnVDy1+bJ+oyDOrUb14v9LrBRz/CYrtYbc="; + }) + ]; + nativeBuildInputs = with python3Packages; [ poetry-core ]; From d11932af64ccefb18e7810a0feedcc2db6a27141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 11:28:03 -0700 Subject: [PATCH 16/64] ledger-autosync: don't propagate ledger and hledger The one available in $PATH is automatically selected. Also remove other superfluous dependencies. --- .../office/ledger-autosync/default.nix | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/pkgs/applications/office/ledger-autosync/default.nix b/pkgs/applications/office/ledger-autosync/default.nix index 6e8f62bbe44e..aa1947036186 100644 --- a/pkgs/applications/office/ledger-autosync/default.nix +++ b/pkgs/applications/office/ledger-autosync/default.nix @@ -4,8 +4,6 @@ , fetchpatch2 , ledger , hledger -, useLedger ? true -, useHledger ? true }: python3Packages.buildPythonApplication rec { @@ -39,31 +37,16 @@ python3Packages.buildPythonApplication rec { ]; propagatedBuildInputs = with python3Packages; [ - asn1crypto - beautifulsoup4 - cffi - cryptography - entrypoints - fuzzywuzzy - idna - jeepney - keyring - lxml - mock - nose ofxclient - ofxhome ofxparse - pbr - pycparser - secretstorage - six - ] ++ lib.optional useLedger ledger - ++ lib.optional useHledger hledger; + ]; - # Checks require ledger as a python package, - # ledger does not support python3 while ledger-autosync requires it. - nativeCheckInputs = with python3Packages; [ ledger hledger nose mock pytestCheckHook ]; + nativeCheckInputs = [ + hledger + ledger + python3Packages.ledger + python3Packages.pytestCheckHook + ]; # Disable some non-passing tests: # https://github.com/egh/ledger-autosync/issues/127 From 9ec4473be5514bce8ba53a77995c899fcda77f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 11:30:27 -0700 Subject: [PATCH 17/64] ledger-autosync: modernize --- .../office/ledger-autosync/default.nix | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/office/ledger-autosync/default.nix b/pkgs/applications/office/ledger-autosync/default.nix index aa1947036186..d5aed4793daf 100644 --- a/pkgs/applications/office/ledger-autosync/default.nix +++ b/pkgs/applications/office/ledger-autosync/default.nix @@ -1,22 +1,23 @@ -{ lib -, python3Packages -, fetchFromGitHub -, fetchpatch2 -, ledger -, hledger +{ + lib, + python3Packages, + fetchFromGitHub, + fetchpatch2, + ledger, + hledger, }: python3Packages.buildPythonApplication rec { pname = "ledger-autosync"; version = "1.0.3"; - format = "pyproject"; + pyproject = true; # no tests included in PyPI tarball src = fetchFromGitHub { owner = "egh"; repo = "ledger-autosync"; rev = "v${version}"; - sha256 = "0n3y4qxsv1cyvyap95h3rj4bj1sinyfgsajygm7s8di3j5aabqr2"; + hash = "sha256-IuOlVJEjNqRPfV4q/Zy3UQe5iMwDlnSV356FrTsmflg="; }; patches = [ @@ -32,11 +33,9 @@ python3Packages.buildPythonApplication rec { }) ]; - nativeBuildInputs = with python3Packages; [ - poetry-core - ]; + build-system = with python3Packages; [ poetry-core ]; - propagatedBuildInputs = with python3Packages; [ + dependencies = with python3Packages; [ ofxclient ofxparse ]; @@ -57,8 +56,9 @@ python3Packages.buildPythonApplication rec { meta = with lib; { homepage = "https://github.com/egh/ledger-autosync"; + changelog = "https://github.com/egh/ledger-autosync/releases/tag/v${version}"; description = "OFX/CSV autosync for ledger and hledger"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = with maintainers; [ eamsden ]; }; } From 9faf61f9fbecc5d59969b50fe1ca63765691baeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 11:32:50 -0700 Subject: [PATCH 18/64] ledger-autosync: move to pkgs/by-name --- .../default.nix => by-name/le/ledger-autosync/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/office/ledger-autosync/default.nix => by-name/le/ledger-autosync/package.nix} (100%) diff --git a/pkgs/applications/office/ledger-autosync/default.nix b/pkgs/by-name/le/ledger-autosync/package.nix similarity index 100% rename from pkgs/applications/office/ledger-autosync/default.nix rename to pkgs/by-name/le/ledger-autosync/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a8e717d4047..b3f38d955dbf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31696,8 +31696,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Foundation; }; - ledger-autosync = callPackage ../applications/office/ledger-autosync { }; - ledger-web = callPackage ../applications/office/ledger-web { }; ledger2beancount = callPackage ../tools/text/ledger2beancount { }; From f2c233c961a5f8957901d0b6f399b8081509e873 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:02:43 +0200 Subject: [PATCH 19/64] gallia: 1.7.0 -> 1.8.0 Diff: https://github.com/Fraunhofer-AISEC/gallia/compare/refs/tags/v1.7.0...v1.8.0 Changelog: https://github.com/Fraunhofer-AISEC/gallia/releases/tag/v1.8.0 --- pkgs/tools/security/gallia/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/security/gallia/default.nix b/pkgs/tools/security/gallia/default.nix index 2f8c6da988c0..ec1febf8e3b9 100644 --- a/pkgs/tools/security/gallia/default.nix +++ b/pkgs/tools/security/gallia/default.nix @@ -7,21 +7,20 @@ python3.pkgs.buildPythonApplication rec { pname = "gallia"; - version = "1.7.0"; + version = "1.8.0"; pyproject = true; src = fetchFromGitHub { owner = "Fraunhofer-AISEC"; repo = "gallia"; rev = "refs/tags/v${version}"; - hash = "sha256-hLGaImYkv6/1Wv1a+0tKmW4qmV4akNoyd0RXopJjetI="; + hash = "sha256-x1sTvb+Z/AttYJVBEfXMx2/Ps34ZbqdLeGN8qHkFXsQ="; }; - pythonRelaxDeps = [ "httpx" ]; + pythonRelaxDeps = [ "aiofiles" ]; build-system = with python3.pkgs; [ poetry-core ]; - dependencies = with python3.pkgs; [ aiofiles aiohttp @@ -29,11 +28,12 @@ python3.pkgs.buildPythonApplication rec { argcomplete can exitcode + construct httpx + more-itertools + msgspec platformdirs psutil - construct - msgspec pydantic pygit2 tabulate From 92890e25a7712e1a3cfb83c49e2b812fa946d318 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:08:18 +0200 Subject: [PATCH 20/64] dvc: 3.53.1 -> 3.53.2 Diff: https://github.com/iterative/dvc/compare/refs/tags/3.53.1...3.53.2 Changelog: https://github.com/iterative/dvc/releases/tag/3.53.2 --- pkgs/development/python-modules/dvc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dvc/default.nix b/pkgs/development/python-modules/dvc/default.nix index 26ae7ec03de6..60fcaa39ca04 100644 --- a/pkgs/development/python-modules/dvc/default.nix +++ b/pkgs/development/python-modules/dvc/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { pname = "dvc"; - version = "3.53.1"; + version = "3.53.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -66,7 +66,7 @@ buildPythonPackage rec { owner = "iterative"; repo = "dvc"; rev = "refs/tags/${version}"; - hash = "sha256-YX65jAkM0LFFtKf+MX0w1BfhyR2Dzr5Vpwxl2jJ/GGw="; + hash = "sha256-tC1Uv0EQZc0G4Eub98c/0mOp+haQPiQFGErQiRK0Gcw="; }; pythonRelaxDeps = [ From bde24290eac4dfe5d803c96fa37a1a49437c378a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:08:49 +0200 Subject: [PATCH 21/64] python312Packages.dvc-data: 3.15.2 -> 3.16.0 Diff: https://github.com/iterative/dvc-data/compare/refs/tags/3.15.2...3.16.0 Changelog: https://github.com/iterative/dvc-data/releases/tag/3.16.0 --- pkgs/development/python-modules/dvc-data/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dvc-data/default.nix b/pkgs/development/python-modules/dvc-data/default.nix index 0b3c3b444e74..3bd52aa26e2c 100644 --- a/pkgs/development/python-modules/dvc-data/default.nix +++ b/pkgs/development/python-modules/dvc-data/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "dvc-data"; - version = "3.15.2"; + version = "3.16.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "iterative"; repo = "dvc-data"; rev = "refs/tags/${version}"; - hash = "sha256-8720nqWmi/1Be2ckuCvctfJbOSFCME27OOtA3qZMr7E="; + hash = "sha256-NBZbuOgM6m/8qhW+izXE4QRI3Ou28mF4nhESWF7Mmn0="; }; nativeBuildInputs = [ setuptools-scm ]; From 0011dad57227cd6199388f71db4b0e30a7fa7c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 13:08:03 -0700 Subject: [PATCH 22/64] python312Packages.aemet-opendata: 0.5.3 -> 0.5.4 Diff: https://github.com/Noltari/AEMET-OpenData/compare/refs/tags/0.5.3...0.5.4 Changelog: https://github.com/Noltari/AEMET-OpenData/releases/tag/0.5.4 --- .../python-modules/aemet-opendata/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/aemet-opendata/default.nix b/pkgs/development/python-modules/aemet-opendata/default.nix index e5c6a3853914..d356e78976a0 100644 --- a/pkgs/development/python-modules/aemet-opendata/default.nix +++ b/pkgs/development/python-modules/aemet-opendata/default.nix @@ -5,15 +5,12 @@ fetchFromGitHub, geopy, pythonOlder, - requests, setuptools, - urllib3, - wheel, }: buildPythonPackage rec { pname = "aemet-opendata"; - version = "0.5.3"; + version = "0.5.4"; pyproject = true; disabled = pythonOlder "3.11"; @@ -22,19 +19,14 @@ buildPythonPackage rec { owner = "Noltari"; repo = "AEMET-OpenData"; rev = "refs/tags/${version}"; - hash = "sha256-KsmH7QJGVf+bZ5XoT+NeScwvvyrXSTZcAwdc12nJLHI="; + hash = "sha256-iy1ptkxc4dh/fwWSi/GgPX5KRulyG0zwWTbCNBirsCo="; }; - build-system = [ - setuptools - wheel - ]; + build-system = [ setuptools ]; dependencies = [ aiohttp geopy - requests - urllib3 ]; # no tests implemented From 8bae07b73adce7675b1e09d51ca56d0b82e7e8f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:16:17 +0200 Subject: [PATCH 23/64] python312Packages.notifications-python-client: 9.1.0 -> 10.0.0 Diff: https://github.com/alphagov/notifications-python-client/compare/refs/tags/9.1.0...10.0.0 Changelog: https://github.com/alphagov/notifications-python-client/blob/10.0.0/CHANGELOG.md --- .../notifications-python-client/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/notifications-python-client/default.nix b/pkgs/development/python-modules/notifications-python-client/default.nix index 1915ccd3fee9..bbb5386fa105 100644 --- a/pkgs/development/python-modules/notifications-python-client/default.nix +++ b/pkgs/development/python-modules/notifications-python-client/default.nix @@ -16,8 +16,8 @@ buildPythonPackage rec { pname = "notifications-python-client"; - version = "9.1.0"; - format = "setuptools"; + version = "10.0.0"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -30,12 +30,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "pytest-runner" "" + --replace-fail "pytest-runner" "" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ docopt pyjwt requests @@ -55,7 +55,7 @@ buildPythonPackage rec { description = "Python client for the GOV.UK Notify API"; homepage = "https://github.com/alphagov/notifications-python-client"; changelog = "https://github.com/alphagov/notifications-python-client/blob/${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 1da9dd325cf4d22ae2cb0b956157027317afc52f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:21:42 +0200 Subject: [PATCH 24/64] python312Packages.aioweenect: remove httpx --- pkgs/development/python-modules/aioweenect/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/aioweenect/default.nix b/pkgs/development/python-modules/aioweenect/default.nix index 12aa6afaf797..73913cd7d4ba 100644 --- a/pkgs/development/python-modules/aioweenect/default.nix +++ b/pkgs/development/python-modules/aioweenect/default.nix @@ -5,7 +5,6 @@ buildPythonPackage, fetchFromGitHub, hatchling, - httpx, pytest-asyncio, pytestCheckHook, pythonOlder, @@ -34,10 +33,7 @@ buildPythonPackage rec { build-system = [ hatchling ]; - dependencies = [ - aiohttp - httpx - ]; + dependencies = [ aiohttp ]; nativeCheckInputs = [ aresponses From e6bc6fae73074168d4fb7fefa610731481b50098 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:23:10 +0200 Subject: [PATCH 25/64] checkov: 3.2.219 -> 3.2.221 Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/3.2.219...3.2.221 Changelog: https://github.com/bridgecrewio/checkov/releases/tag/3.2.221 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index a98cf542e9e3..c97bd1790c72 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication rec { pname = "checkov"; - version = "3.2.219"; + version = "3.2.221"; pyproject = true; src = fetchFromGitHub { owner = "bridgecrewio"; repo = "checkov"; rev = "refs/tags/${version}"; - hash = "sha256-PNWOT4vnlruRPoGSPcBy4GPxmuflVbF+UheIpBo14kE="; + hash = "sha256-reidEqm5qKNbYM5n3OsdtuBQ2HZfRdUKboU34nibvfU="; }; patches = [ ./flake8-compat-5.x.patch ]; From 5779f247c8d0e9e32b7dd3a702a6966355999417 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:24:39 +0200 Subject: [PATCH 26/64] python312Packages.json-repair: add changelog to meta - update description --- pkgs/development/python-modules/json-repair/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/json-repair/default.nix b/pkgs/development/python-modules/json-repair/default.nix index dd535e4cbdd8..1a7ef06797b9 100644 --- a/pkgs/development/python-modules/json-repair/default.nix +++ b/pkgs/development/python-modules/json-repair/default.nix @@ -27,8 +27,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "json_repair" ]; meta = with lib; { + description = "Module to repair invalid JSON, commonly used to parse the output of LLMs"; homepage = "https://github.com/mangiucugna/json_repair/"; - description = "repair invalid JSON, commonly used to parse the output of LLMs"; + changelog = "https://github.com/mangiucugna/json_repair/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ greg ]; }; From 87639649b40543fe134b221563c1d6410b55eef3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:26:04 +0200 Subject: [PATCH 27/64] python312Packages.auditwheel: refactor --- pkgs/development/python-modules/auditwheel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/auditwheel/default.nix b/pkgs/development/python-modules/auditwheel/default.nix index 1f9325966292..9ca12bdfde26 100644 --- a/pkgs/development/python-modules/auditwheel/default.nix +++ b/pkgs/development/python-modules/auditwheel/default.nix @@ -27,9 +27,9 @@ buildPythonPackage rec { hash = "sha256-O9xobndM+eNV6SSw/lpWLVXKo4XXIjT/57gbN426Ng8="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ pyelftools ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + dependencies = [ pyelftools ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; nativeCheckInputs = [ pretend From 75bde306d714a93415b626d6d18c26494200e296 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:39:35 +0200 Subject: [PATCH 28/64] python312Packages.commitizen: format with nixfmt --- .../python-modules/commitizen/default.nix | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/commitizen/default.nix b/pkgs/development/python-modules/commitizen/default.nix index e48a95b98bcf..636d6c7334b6 100644 --- a/pkgs/development/python-modules/commitizen/default.nix +++ b/pkgs/development/python-modules/commitizen/default.nix @@ -1,31 +1,32 @@ -{ lib -, commitizen -, fetchFromGitHub -, buildPythonPackage -, git -, pythonOlder -, stdenv -, installShellFiles -, poetry-core -, nix-update-script -, testers -, argcomplete -, charset-normalizer -, colorama -, decli -, importlib-metadata -, jinja2 -, packaging -, pyyaml -, questionary -, termcolor -, tomlkit -, py -, pytest-freezer -, pytest-mock -, pytest-regressions -, pytest7CheckHook -, deprecated +{ + lib, + commitizen, + fetchFromGitHub, + buildPythonPackage, + git, + pythonOlder, + stdenv, + installShellFiles, + poetry-core, + nix-update-script, + testers, + argcomplete, + charset-normalizer, + colorama, + decli, + importlib-metadata, + jinja2, + packaging, + pyyaml, + questionary, + termcolor, + tomlkit, + py, + pytest-freezer, + pytest-mock, + pytest-regressions, + pytest7CheckHook, + deprecated, }: buildPythonPackage rec { @@ -108,13 +109,12 @@ buildPythonPackage rec { let register-python-argcomplete = lib.getExe' argcomplete "register-python-argcomplete"; in - lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) - '' - installShellCompletion --cmd cz \ - --bash <(${register-python-argcomplete} --shell bash $out/bin/cz) \ - --zsh <(${register-python-argcomplete} --shell zsh $out/bin/cz) \ - --fish <(${register-python-argcomplete} --shell fish $out/bin/cz) - ''; + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd cz \ + --bash <(${register-python-argcomplete} --shell bash $out/bin/cz) \ + --zsh <(${register-python-argcomplete} --shell zsh $out/bin/cz) \ + --fish <(${register-python-argcomplete} --shell fish $out/bin/cz) + ''; passthru = { updateScript = nix-update-script { }; @@ -130,6 +130,9 @@ buildPythonPackage rec { changelog = "https://github.com/commitizen-tools/commitizen/blob/v${version}/CHANGELOG.md"; license = licenses.mit; mainProgram = "cz"; - maintainers = with maintainers; [ lovesegfault anthonyroussel ]; + maintainers = with maintainers; [ + lovesegfault + anthonyroussel + ]; }; } From 29d3f0789363282cd5600cc029c3cdbd468aa2eb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 22:40:44 +0200 Subject: [PATCH 29/64] python312Packages.commitizen: refactor --- .../python-modules/commitizen/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/commitizen/default.nix b/pkgs/development/python-modules/commitizen/default.nix index 636d6c7334b6..17e10e8c0f42 100644 --- a/pkgs/development/python-modules/commitizen/default.nix +++ b/pkgs/development/python-modules/commitizen/default.nix @@ -32,13 +32,13 @@ buildPythonPackage rec { pname = "commitizen"; version = "3.29.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "commitizen-tools"; - repo = pname; + repo = "commitizen"; rev = "refs/tags/v${version}"; hash = "sha256-7EQFip8r2Ey7Rbbwns1gvhsBOj7Hjm94NYhq8aANDIo="; }; @@ -48,12 +48,11 @@ buildPythonPackage rec { "decli" ]; - nativeBuildInputs = [ - poetry-core - installShellFiles - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ installShellFiles ]; + + dependencies = [ argcomplete charset-normalizer colorama From 46c26e56049a926d545b877bb8f3a9477ce702de Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 12 Aug 2024 22:56:06 +0200 Subject: [PATCH 30/64] python312Packages.tf-keras: 2.16.0 -> 2.17.0 --- pkgs/development/python-modules/tf-keras/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tf-keras/default.nix b/pkgs/development/python-modules/tf-keras/default.nix index da7d2d6d869c..c6d9e0c6fdb4 100644 --- a/pkgs/development/python-modules/tf-keras/default.nix +++ b/pkgs/development/python-modules/tf-keras/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "tf-keras"; - version = "2.16.0"; + version = "2.17.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "tf_keras"; inherit version; - hash = "sha256-21OJHxrJgZfCrM7ZjNyowGuoJVZVpst+uV7UlnYRgoA="; + hash = "sha256-/al8GNow2g9ypafoDz7uNDsJ9MIG2tbFfJRPss0YVg4="; }; nativeBuildInputs = [ From d779469fdd0a6f2a5a661341dd11f69336365ab0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 12 Aug 2024 22:52:50 +0200 Subject: [PATCH 31/64] python312Packages.keras: 3.4.1 -> 3.5.0 Diff: https://github.com/keras-team/keras/compare/refs/tags/v3.4.1...v3.5.0 Changelog: https://github.com/keras-team/keras/releases/tag/v3.5.0 --- pkgs/development/python-modules/keras/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index b7256ec3ccd9..ac5d47623a8a 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -19,11 +19,12 @@ packaging, rich, tensorflow, + tf-keras, }: buildPythonPackage rec { pname = "keras"; - version = "3.4.1"; + version = "3.5.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -32,7 +33,7 @@ buildPythonPackage rec { owner = "keras-team"; repo = "keras"; rev = "refs/tags/v${version}"; - hash = "sha256-Pp84wTvcrWnxuksYUrzs9amapwBC8yU1PA0PE5dRl6k="; + hash = "sha256-hp+kKsKI2Jmh30/KeUZ+uBW0MG49+QgsyR5yCS63p08="; }; build-system = [ @@ -51,6 +52,7 @@ buildPythonPackage rec { packaging rich tensorflow + tf-keras ]; pythonImportsCheck = [ From e6967ae9e9b5b2adf3782d0c33fb02cde21e31a4 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 7 Jul 2024 20:21:47 -0400 Subject: [PATCH 32/64] prusa-slicer: 2.7.4 -> 2.8.0 --- .../misc/prusa-slicer/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index a9d78e9884e1..159b0e0aebc5 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -2,6 +2,7 @@ , lib , binutils , fetchFromGitHub +, fetchpatch , cmake , pkg-config , wrapGAppsHook3 @@ -15,6 +16,7 @@ , expat , glew , glib +, glib-networking , gmp , gtk3 , hicolor-icon-theme @@ -64,15 +66,27 @@ let }); openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; }; wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override; + + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch"; + hash = "sha256-/R9jv9zSP1lDW6IltZ8V06xyLdxfaYrk3zD6JRFUxHg="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch"; + hash = "sha256-G1JNdVH+goBelag9aX0NctHFVqtoYFnqjwK/43FVgvM="; + }) + ]; in stdenv.mkDerivation (finalAttrs: { pname = "prusa-slicer"; - version = "2.7.4"; + version = "2.8.0"; + inherit patches; src = fetchFromGitHub { owner = "prusa3d"; repo = "PrusaSlicer"; - hash = "sha256-g2I2l6i/8p8werDs4mDI/lGeDQsma4WSB9vT6OB2LGg="; + hash = "sha256-A/uxNIEXCchLw3t5erWdhqFAeh6nudcMfASi+RoJkFg="; rev = "version_${finalAttrs.version}"; }; @@ -93,6 +107,7 @@ stdenv.mkDerivation (finalAttrs: { expat glew glib + glib-networking gmp gtk3 hicolor-icon-theme @@ -128,9 +143,6 @@ stdenv.mkDerivation (finalAttrs: { # prusa-slicer uses dlopen on `libudev.so` at runtime NIX_LDFLAGS = lib.optionalString withSystemd "-ludev"; - # FIXME: remove in 2.8.0 - NIX_CFLAGS_COMPILE = "-Wno-enum-constexpr-conversion"; - prePatch = '' # Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx # now seems to be integrated into the main lib. From 909bf7941353ee5bf95e24736a3db806369406c4 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sat, 10 Aug 2024 12:52:10 +0200 Subject: [PATCH 33/64] npiet: cleanup - Move to pkgs/by-name - Format - Use `finalAttrs` instead of `rec` for passing the `version` to `fetchurl` - Use `hash` instead of `sha256` for `fetchurl` - Use `--replace-fail` instead of `--replace` for `substituteInPlace` - Add `strictDeps = true` - Use `lib` directly in `meta` instead of using `with lib;` - Add `meta.changelog` - Add `meta.mainProgram` --- .../np/npiet/package.nix} | 47 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 - 2 files changed, 28 insertions(+), 21 deletions(-) rename pkgs/{development/interpreters/npiet/default.nix => by-name/np/npiet/package.nix} (51%) diff --git a/pkgs/development/interpreters/npiet/default.nix b/pkgs/by-name/np/npiet/package.nix similarity index 51% rename from pkgs/development/interpreters/npiet/default.nix rename to pkgs/by-name/np/npiet/package.nix index bcd546c514c0..c6fe0aa19403 100644 --- a/pkgs/development/interpreters/npiet/default.nix +++ b/pkgs/by-name/np/npiet/package.nix @@ -1,23 +1,28 @@ -{ lib -, stdenv -, fetchurl -, gd -, giflib -, groff -, libpng -, tk +{ + lib, + stdenv, + fetchurl, + gd, + giflib, + groff, + libpng, + tk, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "npiet"; version = "1.3f"; src = fetchurl { - url = "https://www.bertnase.de/npiet/npiet-${version}.tar.gz"; - sha256 = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo="; + url = "https://www.bertnase.de/npiet/npiet-${finalAttrs.version}.tar.gz"; + hash = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo="; }; - buildInputs = [ gd giflib libpng ]; + buildInputs = [ + gd + giflib + libpng + ]; nativeBuildInputs = [ groff ]; @@ -25,21 +30,25 @@ stdenv.mkDerivation rec { # malloc.h is not needed because stdlib.h is already included. # On macOS, malloc.h does not even exist, resulting in an error. substituteInPlace npiet-foogol.c \ - --replace '#include ' "" + --replace-fail '#include ' "" substituteInPlace npietedit \ - --replace 'exec wish' 'exec ${tk}/bin/wish' + --replace-fail 'exec wish' 'exec ${tk}/bin/wish' ''; - meta = with lib; { + strictDeps = true; + + meta = { description = "Interpreter for piet programs. Also includes npietedit and npiet-foogol"; longDescription = '' npiet is an interpreter for the piet programming language. Instead of text, piet programs are pictures. Commands are determined based on changes in color. ''; homepage = "https://www.bertnase.de/npiet/"; - license = licenses.gpl2Only; - platforms = platforms.unix; - maintainers = with maintainers; [ Luflosi ]; + changelog = "https://www.bertnase.de/npiet/ChangeLog"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.unix; + mainProgram = "npiet"; + maintainers = with lib.maintainers; [ Luflosi ]; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5abbc65131f9..52af67c91587 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10833,8 +10833,6 @@ with pkgs; npapi_sdk = callPackage ../development/libraries/npapi-sdk { }; - npiet = callPackage ../development/interpreters/npiet { }; - npth = callPackage ../development/libraries/npth { }; nmap-formatter = callPackage ../tools/security/nmap-formatter { }; From 15fe3c9320be5e596abc58cb91903b201dc85bda Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sat, 10 Aug 2024 13:01:36 +0200 Subject: [PATCH 34/64] npiet: add package tests --- pkgs/by-name/np/npiet/package.nix | 14 ++++++++ pkgs/by-name/np/npiet/tests/default.nix | 41 ++++++++++++++++++++++++ pkgs/by-name/np/npiet/tests/run-test.nix | 19 +++++++++++ 3 files changed, 74 insertions(+) create mode 100644 pkgs/by-name/np/npiet/tests/default.nix create mode 100644 pkgs/by-name/np/npiet/tests/run-test.nix diff --git a/pkgs/by-name/np/npiet/package.nix b/pkgs/by-name/np/npiet/package.nix index c6fe0aa19403..cbc1592129e4 100644 --- a/pkgs/by-name/np/npiet/package.nix +++ b/pkgs/by-name/np/npiet/package.nix @@ -7,6 +7,7 @@ groff, libpng, tk, + callPackage, }: stdenv.mkDerivation (finalAttrs: { @@ -38,6 +39,19 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + passthru.tests = + let + all-tests = callPackage ./tests { }; + in + { + inherit (all-tests) + hello + prime + no-prime + brainfuck + ; + }; + meta = { description = "Interpreter for piet programs. Also includes npietedit and npiet-foogol"; longDescription = '' diff --git a/pkgs/by-name/np/npiet/tests/default.nix b/pkgs/by-name/np/npiet/tests/default.nix new file mode 100644 index 000000000000..92e3780bac6d --- /dev/null +++ b/pkgs/by-name/np/npiet/tests/default.nix @@ -0,0 +1,41 @@ +{ fetchurl, callPackage }: +let + # More examples can be found at https://www.dangermouse.net/esoteric/piet/samples.html + hello-program = fetchurl { + url = "https://www.dangermouse.net/esoteric/piet/hw6.png"; + hash = "sha256-E8OMu0b/oU8lDF3X4o5WMnnD1IKNT2YF+qe4MXLuczI="; + }; + prime-tester-program = fetchurl { + url = "https://www.bertnase.de/npiet/nprime.gif"; + hash = "sha256-4eaJweV/n73byoWZWCXiMLkfSEhMPf5itVwz48AK/FA="; + }; + brainfuck-interpreter-program = fetchurl { + url = "https://www.dangermouse.net/esoteric/piet/piet_bfi.gif"; + hash = "sha256-LIfOG0KFpr4nxAtLLeIsPQl+8Ujyvfz/YnEm/HRoVjY="; + }; +in +{ + hello = callPackage ./run-test.nix { + testName = "hello"; + programPath = hello-program; + expectedOutput = "Hello, world!"; + }; + prime = callPackage ./run-test.nix { + testName = "prime"; + programPath = prime-tester-program; + programInput = "2069"; + expectedOutput = "Y"; + }; + no-prime = callPackage ./run-test.nix { + testName = "no-prime"; + programPath = prime-tester-program; + programInput = "2070"; + expectedOutput = "N"; + }; + brainfuck = callPackage ./run-test.nix { + testName = "brainfuck"; + programPath = brainfuck-interpreter-program; + programInput = ",+>,+>,+>,+.<.<.<.|sdhO"; + expectedOutput = "Piet"; + }; +} diff --git a/pkgs/by-name/np/npiet/tests/run-test.nix b/pkgs/by-name/np/npiet/tests/run-test.nix new file mode 100644 index 000000000000..19c625e1f7e9 --- /dev/null +++ b/pkgs/by-name/np/npiet/tests/run-test.nix @@ -0,0 +1,19 @@ +{ + runCommand, + lib, + npiet, + + testName, + programPath, + programInput ? "", + expectedOutput, +}: +runCommand "npiet-test-${testName}" { } '' + actual_output="$(echo '${programInput}' | '${lib.getExe npiet}' -q -w -e 100000 '${programPath}')" + if [ "$actual_output" != '${expectedOutput}' ]; then + echo "npiet failed to run the program correctly. The output should be ${expectedOutput} but is $actual_output." + exit 1 + fi + echo "The program successfully output $actual_output" + touch "$out" +'' From 81c0783c0e71d429c86f40476f7c1b91bd990bcd Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Sat, 3 Aug 2024 23:15:52 -0700 Subject: [PATCH 35/64] nixos/k3s: add containerdConfigTemplate option --- .../modules/services/cluster/k3s/default.nix | 26 ++++++++++ nixos/tests/k3s/containerd-config.nix | 52 +++++++++++++++++++ nixos/tests/k3s/default.nix | 3 ++ 3 files changed, 81 insertions(+) create mode 100644 nixos/tests/k3s/containerd-config.nix diff --git a/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix index 70ff44943971..83dfe2067147 100644 --- a/nixos/modules/services/cluster/k3s/default.nix +++ b/nixos/modules/services/cluster/k3s/default.nix @@ -21,6 +21,7 @@ let manifestDir = "/var/lib/rancher/k3s/server/manifests"; chartDir = "/var/lib/rancher/k3s/server/static/charts"; imageDir = "/var/lib/rancher/k3s/agent/images"; + containerdConfigTemplateFile = "/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl"; manifestModule = let @@ -119,6 +120,11 @@ let ${builtins.concatStringsSep "\n" (map linkManifestEntry enabledManifests)} ${builtins.concatStringsSep "\n" (lib.mapAttrsToList linkChartEntry cfg.charts)} ${builtins.concatStringsSep "\n" (map linkImageEntry cfg.images)} + + ${lib.optionalString (cfg.containerdConfigTemplate != null) '' + mkdir -p $(dirname ${containerdConfigTemplateFile}) + ${pkgs.coreutils-full}/bin/ln -sfn ${pkgs.writeText "config.toml.tmpl" cfg.containerdConfigTemplate} ${containerdConfigTemplateFile} + ''} ''; in { @@ -340,6 +346,26 @@ in ''; }; + containerdConfigTemplate = mkOption { + type = types.nullOr types.str; + default = null; + example = lib.literalExpression '' + # Base K3s config + {{ template "base" . }} + + # Add a custom runtime + [plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom"] + runtime_type = "io.containerd.runc.v2" + [plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom".options] + BinaryName = "/path/to/custom-container-runtime" + ''; + description = '' + Config template for containerd, to be placed at + `/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl`. + See the K3s docs on [configuring containerd](https://docs.k3s.io/advanced#configuring-containerd). + ''; + }; + images = mkOption { type = with types; listOf package; default = [ ]; diff --git a/nixos/tests/k3s/containerd-config.nix b/nixos/tests/k3s/containerd-config.nix new file mode 100644 index 000000000000..db4b3320411f --- /dev/null +++ b/nixos/tests/k3s/containerd-config.nix @@ -0,0 +1,52 @@ +# A test that containerdConfigTemplate settings get written to containerd/config.toml +import ../make-test-python.nix ( + { lib, k3s, ... }: + let + nodeName = "test"; + in + { + name = "${k3s.name}-containerd-config"; + nodes.machine = + { ... }: + { + # k3s uses enough resources the default vm fails. + virtualisation.memorySize = 1536; + virtualisation.diskSize = 4096; + + services.k3s = { + enable = true; + package = k3s; + # Slightly reduce resource usage + extraFlags = [ + "--disable coredns" + "--disable local-storage" + "--disable metrics-server" + "--disable servicelb" + "--disable traefik" + "--node-name ${nodeName}" + ]; + containerdConfigTemplate = '' + # Base K3s config + {{ template "base" . }} + + # MAGIC COMMENT + ''; + }; + }; + + testScript = '' + start_all() + machine.wait_for_unit("k3s") + # wait until the node is ready + machine.wait_until_succeeds(r"""kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' nodes/${nodeName}""") + # test whether the config template file contains the magic comment + out=machine.succeed("cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl") + assert "MAGIC COMMENT" in out, "the containerd config template does not contain the magic comment" + # test whether the config file contains the magic comment + out=machine.succeed("cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml") + assert "MAGIC COMMENT" in out, "the containerd config does not contain the magic comment" + ''; + + meta.maintainers = lib.teams.k3s.members; + } +) diff --git a/nixos/tests/k3s/default.nix b/nixos/tests/k3s/default.nix index 06f34c03d5a3..7edaf6f38ed2 100644 --- a/nixos/tests/k3s/default.nix +++ b/nixos/tests/k3s/default.nix @@ -11,6 +11,9 @@ in _: k3s: import ./airgap-images.nix { inherit system pkgs k3s; } ) allK3s; auto-deploy = lib.mapAttrs (_: k3s: import ./auto-deploy.nix { inherit system pkgs k3s; }) allK3s; + containerd-config = lib.mapAttrs ( + _: k3s: import ./containerd-config.nix { inherit system pkgs k3s; } + ) allK3s; etcd = lib.mapAttrs ( _: k3s: import ./etcd.nix { From 097287fee84451864499bcad0259d9567b46ba96 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 Aug 2024 00:27:09 +0200 Subject: [PATCH 36/64] python312Packages.leb128: fix build Closes: #334248 --- pkgs/development/python-modules/leb128/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/leb128/default.nix b/pkgs/development/python-modules/leb128/default.nix index 1606c54c340c..d889a361d9cf 100644 --- a/pkgs/development/python-modules/leb128/default.nix +++ b/pkgs/development/python-modules/leb128/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage, fetchFromGitHub, + setuptools, pytestCheckHook, lib, }: @@ -8,7 +9,7 @@ buildPythonPackage rec { pname = "leb128"; version = "1.0.7"; - format = "setuptools"; + pyproject = true; # fetchPypi doesn't include files required for tests src = fetchFromGitHub { @@ -18,7 +19,10 @@ buildPythonPackage rec { hash = "sha256-17C0Eic8T2PFkuIGExcrfb3b1HldaSBAPSh5TtRBUuU="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "leb128" ]; meta = with lib; { From 598633475587db702619669000589280c8ba96fc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 00:29:14 +0000 Subject: [PATCH 37/64] chamber: 2.14.1 -> 3.0.0 --- pkgs/tools/admin/chamber/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/chamber/default.nix b/pkgs/tools/admin/chamber/default.nix index b2cd363f8f88..b96f0b7a6e82 100644 --- a/pkgs/tools/admin/chamber/default.nix +++ b/pkgs/tools/admin/chamber/default.nix @@ -2,18 +2,18 @@ buildGoModule rec { pname = "chamber"; - version = "2.14.1"; + version = "3.0.0"; src = fetchFromGitHub { owner = "segmentio"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Vbz8rpNy6+iIr/WyegALSo4gRoDL2P1x/6lHg6Kvm/w="; + sha256 = "sha256-oeHnzKsOgR1R9oEUQJofYaXJR6X6WwRlGU72g4Yc1yg="; }; CGO_ENABLED = 0; - vendorHash = "sha256-ZRKs/5JtsTjWL62RuQRwroA6TvTpJqkf6pOecvO3134="; + vendorHash = "sha256-1glSjsuHN7urlktxJ/vR/jfDgbVBWsui0bZWMhmJ50c="; ldflags = [ "-s" "-w" "-X main.Version=v${version}" ]; From edd2b5e185a5eb5dbcf0faeca491a771b0f35bc8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 Aug 2024 00:27:41 +0200 Subject: [PATCH 38/64] python312Packages.leb128: 1.0.7 -> 1.0.8 https://github.com/mohanson/leb128/releases/tag/v1.0.8 --- pkgs/development/python-modules/leb128/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/leb128/default.nix b/pkgs/development/python-modules/leb128/default.nix index d889a361d9cf..4840c3cc678a 100644 --- a/pkgs/development/python-modules/leb128/default.nix +++ b/pkgs/development/python-modules/leb128/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "leb128"; - version = "1.0.7"; + version = "1.0.8"; pyproject = true; # fetchPypi doesn't include files required for tests @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "mohanson"; repo = "leb128"; rev = "refs/tags/v${version}"; - hash = "sha256-17C0Eic8T2PFkuIGExcrfb3b1HldaSBAPSh5TtRBUuU="; + hash = "sha256-7ZjDqxGUANk3FfB3HPTc5CB5YcIi2ee0igXWAYXaZ88="; }; build-system = [ setuptools ]; @@ -26,6 +26,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "leb128" ]; meta = with lib; { + changelog = "https://github.com/mohanson/leb128/releases/tag/v${version}"; description = "Utility to encode and decode Little Endian Base 128"; homepage = "https://github.com/mohanson/leb128"; license = licenses.mit; From d2a61472af104b5686cd0906456694a2c81ee6cf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 02:40:54 +0000 Subject: [PATCH 39/64] mympd: 17.0.0 -> 17.0.1 --- pkgs/applications/audio/mympd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/mympd/default.nix b/pkgs/applications/audio/mympd/default.nix index 93594c86052b..c28eb62d07a4 100644 --- a/pkgs/applications/audio/mympd/default.nix +++ b/pkgs/applications/audio/mympd/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "mympd"; - version = "17.0.0"; + version = "17.0.1"; src = fetchFromGitHub { owner = "jcorporation"; repo = "myMPD"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-/8IDwzgZzf63MvXTBP2CoC5IHi7Umr3exU1/oDdadgk="; + sha256 = "sha256-NkOTCvpU6MxGOvQwiTLMJ444HgNK5tpt3hUs2epFyLE="; }; nativeBuildInputs = [ From 3fa764e147c2d669aca9879f3915e0281ebfa857 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 03:44:11 +0000 Subject: [PATCH 40/64] python312Packages.pyschlage: 2024.6.0 -> 2024.8.0 --- pkgs/development/python-modules/pyschlage/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyschlage/default.nix b/pkgs/development/python-modules/pyschlage/default.nix index 649618409a63..775808c90693 100644 --- a/pkgs/development/python-modules/pyschlage/default.nix +++ b/pkgs/development/python-modules/pyschlage/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pyschlage"; - version = "2024.6.0"; + version = "2024.8.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "dknowles2"; repo = "pyschlage"; rev = "refs/tags/${version}"; - hash = "sha256-mfrESWXkGV6r+VNw1dHRpIEtfZsLdsCf3D74ydgcy58="; + hash = "sha256-40WNvpFNBhjg2+1H5PRBlziKrcSjl1fppUk4HOmDRDk="; }; nativeBuildInputs = [ From cd472f05a56b56bcd0a4fd5ea41e21e1ff8eb905 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 03:49:06 +0000 Subject: [PATCH 41/64] python312Packages.microsoft-kiota-http: 1.3.2 -> 1.3.3 --- .../python-modules/microsoft-kiota-http/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/microsoft-kiota-http/default.nix b/pkgs/development/python-modules/microsoft-kiota-http/default.nix index cfdb7161ea7b..09261b23023a 100644 --- a/pkgs/development/python-modules/microsoft-kiota-http/default.nix +++ b/pkgs/development/python-modules/microsoft-kiota-http/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "microsoft-kiota-http"; - version = "1.3.2"; + version = "1.3.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "microsoft"; repo = "kiota-http-python"; rev = "refs/tags/v${version}"; - hash = "sha256-9Xf/M9d+lScCTWXakJ+BMeBbbRGshtzRzhOg5FGbC5o="; + hash = "sha256-dtSTrsLVDNJ+s5B3wLvZ9qGerZ8fdYpEsqrBoPf7Lrk="; }; build-system = [ flit-core ]; From 08d27b031d91247f302f4111e66e2e9d6480fe59 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:36:15 +0000 Subject: [PATCH 42/64] python312Packages.py-nextbusnext: 2.0.3 -> 2.0.4 --- pkgs/development/python-modules/py-nextbusnext/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/py-nextbusnext/default.nix b/pkgs/development/python-modules/py-nextbusnext/default.nix index ab889f86ff2c..bbf9fabe4c54 100644 --- a/pkgs/development/python-modules/py-nextbusnext/default.nix +++ b/pkgs/development/python-modules/py-nextbusnext/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "py-nextbusnext"; - version = "2.0.3"; + version = "2.0.4"; pyproject = true; disabled = pythonOlder "3.9"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "ViViDboarder"; repo = "py_nextbus"; rev = "refs/tags/v${version}"; - hash = "sha256-dSBjOMqryEddWB54AddGDojRE8/STi3kxfjJsVFBuOw="; + hash = "sha256-mmuD5edgcesMFsdfbWJyzOuKLCgsqvUPG61j/dA6Crc="; }; build-system = [ setuptools ]; From 3fad928d00dd556bc434921a90677c46f3a8c993 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:45:36 +0000 Subject: [PATCH 43/64] python312Packages.google-cloud-firestore: 2.17.0 -> 2.17.1 --- .../python-modules/google-cloud-firestore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-firestore/default.nix b/pkgs/development/python-modules/google-cloud-firestore/default.nix index ce88d2895362..30b2aae7d639 100644 --- a/pkgs/development/python-modules/google-cloud-firestore/default.nix +++ b/pkgs/development/python-modules/google-cloud-firestore/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "google-cloud-firestore"; - version = "2.17.0"; + version = "2.17.1"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-PoG3HZY7fjvMh/uBMjbzhkvHsKPyB6xNh7xlle/iuKM="; + hash = "sha256-4gRp51JgDkEwBUjo9aFpBQjG1nXk0QpuwCE9L8qvwj4="; }; build-system = [ setuptools ]; From b80c4321dd84889be973dfd6c017728be318b904 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:52:47 +0000 Subject: [PATCH 44/64] wit-bindgen: 0.29.0 -> 0.30.0 --- pkgs/by-name/wi/wit-bindgen/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wi/wit-bindgen/package.nix b/pkgs/by-name/wi/wit-bindgen/package.nix index c324d192ccac..179b9e47e8b6 100644 --- a/pkgs/by-name/wi/wit-bindgen/package.nix +++ b/pkgs/by-name/wi/wit-bindgen/package.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage rec { pname = "wit-bindgen"; - version = "0.29.0"; + version = "0.30.0"; src = fetchFromGitHub { owner = "bytecodealliance"; repo = "wit-bindgen"; rev = "v${version}"; - hash = "sha256-mn51ussusBZGfgAj1JP1hjNsblXXGAt7W6D10yKTuZ8="; + hash = "sha256-MeozLpwtOFnYxK2H+9bd7nG6BL6jSVqfBCVg1t3lErQ="; }; - cargoHash = "sha256-JSsneDsbqs4DT0oMvucPVg/Jpf10xk3TWi0pDS1oOzQ="; + cargoHash = "sha256-d6oMUAGyIFDWtjgXfIe0k3hx7QTFTfVuKnQ3XRux1HU="; # Some tests fail because they need network access to install the `wasm32-unknown-unknown` target. # However, GitHub Actions ensures a proper build. From 6e638bbc5d2fc75f0d21344e1fedbbb9c882dc72 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:58:38 +0000 Subject: [PATCH 45/64] python312Packages.requirements-parser: 0.10.2 -> 0.11.0 --- .../python-modules/requirements-parser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/requirements-parser/default.nix b/pkgs/development/python-modules/requirements-parser/default.nix index 4ad604ea56f2..f8658fed6a0b 100644 --- a/pkgs/development/python-modules/requirements-parser/default.nix +++ b/pkgs/development/python-modules/requirements-parser/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "requirements-parser"; - version = "0.10.2"; + version = "0.11.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "madpah"; repo = "requirements-parser"; rev = "refs/tags/v${version}"; - hash = "sha256-/zV9PfG4mEE7VN0FIk3m4sUVhKIyuryI6znQNh+zjak="; + hash = "sha256-o9IriQXa2Pd7s16IENqcWgi73XZQoXsbXU471V1CFaI="; }; build-system = [ poetry-core ]; From 96f4df811c4291324d5131057e4f94506a376025 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 05:33:20 +0000 Subject: [PATCH 46/64] python312Packages.playwrightcapture: 1.25.10 -> 1.25.11 --- pkgs/development/python-modules/playwrightcapture/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/playwrightcapture/default.nix b/pkgs/development/python-modules/playwrightcapture/default.nix index d56554e46fb8..b58d17507f3f 100644 --- a/pkgs/development/python-modules/playwrightcapture/default.nix +++ b/pkgs/development/python-modules/playwrightcapture/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "playwrightcapture"; - version = "1.25.10"; + version = "1.25.11"; pyproject = true; disabled = pythonOlder "3.8"; @@ -31,7 +31,7 @@ buildPythonPackage rec { owner = "Lookyloo"; repo = "PlaywrightCapture"; rev = "refs/tags/v${version}"; - hash = "sha256-aBex+29NGPELQY+uaOXzGOWxt8injSk2hmOtVqzodmM="; + hash = "sha256-2nT6VRK0HQr1M8iUW/JUHEYhMwATZGWur4XL/KWZcRA="; }; pythonRelaxDeps = [ From 13dbfc5a9990bdd41c242771742397f5ad692869 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Aug 2024 08:26:23 +0200 Subject: [PATCH 47/64] python312Packages.pyschlage: refactor --- pkgs/development/python-modules/pyschlage/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyschlage/default.nix b/pkgs/development/python-modules/pyschlage/default.nix index 775808c90693..31cb06940c92 100644 --- a/pkgs/development/python-modules/pyschlage/default.nix +++ b/pkgs/development/python-modules/pyschlage/default.nix @@ -24,12 +24,12 @@ buildPythonPackage rec { hash = "sha256-40WNvpFNBhjg2+1H5PRBlziKrcSjl1fppUk4HOmDRDk="; }; - nativeBuildInputs = [ + build-system = [ setuptools setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ pycognito requests ]; From e71402f44b527fb3149532fffdbc742813c92f85 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:00:46 +0200 Subject: [PATCH 48/64] python3Packages.phply: init at 1.2.6 Co-authored-by: Jan Tojnar Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com> --- .../python-modules/phply/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/phply/default.nix diff --git a/pkgs/development/python-modules/phply/default.nix b/pkgs/development/python-modules/phply/default.nix new file mode 100644 index 000000000000..5844e92d2807 --- /dev/null +++ b/pkgs/development/python-modules/phply/default.nix @@ -0,0 +1,31 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + ply, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "phply"; + version = "1.2.6"; + + src = fetchPypi { + pname = "phply"; + inherit version; + sha256 = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc="; + }; + + dependencies = [ ply ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "phply" ]; + + meta = with lib; { + description = "Lexer and parser for PHP source implemented using PLY"; + homepage = "https://github.com/viraptor/phply"; + license = licenses.bsd3; + maintainers = with maintainers; [ erictapen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 814d2b1bf33d..17220c9ddd5f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10012,6 +10012,8 @@ self: super: with self; { phe = callPackage ../development/python-modules/phe { }; + phply = callPackage ../development/python-modules/phply { }; + phik = callPackage ../development/python-modules/phik { }; phone-modem = callPackage ../development/python-modules/phone-modem { }; From dd01b4dcbf8a7d752f18db493d314f7b05c19dcd Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:01:59 +0200 Subject: [PATCH 49/64] python3Packages.aeidon: init at 1.15 --- .../python-modules/aeidon/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/aeidon/default.nix diff --git a/pkgs/development/python-modules/aeidon/default.nix b/pkgs/development/python-modules/aeidon/default.nix new file mode 100644 index 000000000000..744ece58293f --- /dev/null +++ b/pkgs/development/python-modules/aeidon/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + gettext, + flake8, + isocodes, + pytestCheckHook, + charset-normalizer, +}: + +buildPythonPackage rec { + pname = "aeidon"; + version = "1.15"; + + src = fetchPypi { + pname = "aeidon"; + inherit version; + sha256 = "sha256-qGpGraRZFVaW1Jys24qvfPo5WDg7Q/fhvm44JH8ulVw="; + }; + + nativeBuildInputs = [ + gettext + flake8 + ]; + + dependencies = [ isocodes ]; + + installPhase = '' + runHook preInstall + python setup.py --without-gaupol install --prefix=$out + runHook postInstall + ''; + + nativeCheckInputs = [ + pytestCheckHook + charset-normalizer + ]; + + # Aeidon is looking in the wrong subdirectory for data + preCheck = '' + cp -r data aeidon/ + ''; + + pytestFlagsArray = [ "aeidon/test" ]; + + disabledTests = [ + # requires gspell to work with gobject introspection + "test_spell" + ]; + + pythonImportsCheck = [ "aeidon" ]; + + meta = with lib; { + description = "Reading, writing and manipulationg text-based subtitle files"; + homepage = "https://github.com/otsaloma/gaupol"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17220c9ddd5f..00c8d93abd2d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -93,6 +93,8 @@ self: super: with self; { advocate = callPackage ../development/python-modules/advocate { }; + aeidon = callPackage ../development/python-modules/aeidon { }; + aemet-opendata = callPackage ../development/python-modules/aemet-opendata { }; aenum = callPackage ../development/python-modules/aenum { }; From 4c6789467ef67353f454d8ebd5fddcdb28d12178 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:03:52 +0200 Subject: [PATCH 50/64] python3Packages.translate-toolkit: init at 3.13.2 Co-authored-by: Jan Tojnar Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com> --- .../translate-toolkit/default.nix | 72 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/python-modules/translate-toolkit/default.nix diff --git a/pkgs/development/python-modules/translate-toolkit/default.nix b/pkgs/development/python-modules/translate-toolkit/default.nix new file mode 100644 index 000000000000..0db2168149a6 --- /dev/null +++ b/pkgs/development/python-modules/translate-toolkit/default.nix @@ -0,0 +1,72 @@ +{ + lib, + fetchPypi, + buildPythonPackage, + setuptools-scm, + lxml, + wcwidth, + pytestCheckHook, + iniparse, + vobject, + mistletoe, + phply, + pyparsing, + ruamel-yaml, + cheroot, + fluent-syntax, + aeidon, + charset-normalizer, + syrupy, + gettext, +}: + +buildPythonPackage rec { + pname = "translate-toolkit"; + version = "3.13.2"; + + pyproject = true; + build-system = [ setuptools-scm ]; + + src = fetchPypi { + pname = "translate_toolkit"; + inherit version; + sha256 = "sha256-95zIAelFSNK5+f1GY8DUgHPDQBS5K+9ULjXaSaa0wWM="; + }; + + dependencies = [ + lxml + wcwidth + ]; + + nativeCheckInputs = [ + pytestCheckHook + iniparse + vobject + mistletoe + phply + pyparsing + ruamel-yaml + cheroot + fluent-syntax + aeidon + charset-normalizer + syrupy + gettext + ]; + + disabledTests = [ + # Probably breaks because of nix sandbox + "test_timezones" + # Requires network + "test_xliff_conformance" + ]; + + pythonImportsCheck = [ "translate" ]; + + meta = with lib; { + description = "Useful localization tools for building localization & translation systems"; + homepage = "https://toolkit.translatehouse.org/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ erictapen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 00c8d93abd2d..bd611f2cca19 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15803,6 +15803,8 @@ self: super: with self; { tracing = callPackage ../development/python-modules/tracing { }; + translate-toolkit = callPackage ../development/python-modules/translate-toolkit { }; + trackpy = callPackage ../development/python-modules/trackpy { }; trafilatura = callPackage ../development/python-modules/trafilatura { }; From a536abefaddd8705503c46f287575e30e4f9c5cd Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:04:35 +0200 Subject: [PATCH 51/64] python3Packages.ahocorasick-rs: init at 0.22.0 --- .../python-modules/ahocorasick-rs/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/ahocorasick-rs/default.nix diff --git a/pkgs/development/python-modules/ahocorasick-rs/default.nix b/pkgs/development/python-modules/ahocorasick-rs/default.nix new file mode 100644 index 000000000000..3ad7ebbc44bd --- /dev/null +++ b/pkgs/development/python-modules/ahocorasick-rs/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + rustPlatform, + typing-extensions, + pytestCheckHook, + pyahocorasick, + hypothesis, + pytest-benchmark, +}: + +buildPythonPackage rec { + pname = "ahocorasick-rs"; + version = "0.22.0"; + + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "ahocorasick_rs"; + sha256 = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-CIt/ChNcoqKln6PgeTGp9pfmIWlJj+c5SCPtBhsnT6U="; + }; + + nativeBuildInputs = with rustPlatform; [ + maturinBuildHook + cargoSetupHook + typing-extensions + ]; + + nativeCheckInputs = [ + pytest-benchmark + pytestCheckHook + pyahocorasick + hypothesis + ]; + + pythonImportsCheck = [ "ahocorasick_rs" ]; + + meta = with lib; { + description = "Fast Aho-Corasick algorithm for Python"; + homepage = "https://github.com/G-Research/ahocorasick_rs/"; + license = licenses.asl20; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd611f2cca19..b4abd54e9e7d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -127,6 +127,8 @@ self: super: with self; { aggdraw = callPackage ../development/python-modules/aggdraw { }; + ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { }; + aigpy = callPackage ../development/python-modules/aigpy { }; aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { }; From 05a34eb1765217528306c65863027ae428e027ac Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:05:01 +0200 Subject: [PATCH 52/64] python3Packages.celery: add redis as optional dependency --- pkgs/development/python-modules/celery/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index abdc5fb184e4..d5c372c5d498 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -14,6 +14,7 @@ msgpack, nixosTests, pymongo, + redis, pytest-celery, pytest-click, pytest-subtests, @@ -59,6 +60,7 @@ buildPythonPackage rec { mongodb = [ pymongo ]; msgpack = [ msgpack ]; yaml = [ pyyaml ]; + redis = [ redis ]; }; nativeCheckInputs = [ From 5ced09d094a11f0df16b46fd7735937b1077d6d3 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:05:43 +0200 Subject: [PATCH 53/64] python3Packages.django-crispy-bootstrap3: init at 2024.1 --- .../django-crispy-bootstrap3/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/django-crispy-bootstrap3/default.nix diff --git a/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix b/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix new file mode 100644 index 000000000000..caf2f6655bad --- /dev/null +++ b/pkgs/development/python-modules/django-crispy-bootstrap3/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + django, + setuptools, + pytestCheckHook, + pytest-django, + django-crispy-forms, +}: + +buildPythonPackage rec { + pname = "django-crispy-bootstrap3"; + version = "2024.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "django-crispy-forms"; + repo = "crispy-bootstrap3"; + rev = "refs/tags/${version}"; + hash = "sha256-w5CGWf14Wa8hndpk5r4hlz6gGykvRL+1AhA5Pz5Ejtk="; + }; + + dependencies = [ + django + setuptools + ]; + + nativeCheckInputs = [ + pytest-django + pytestCheckHook + django-crispy-forms + ]; + + pythonImportsCheck = [ "crispy_bootstrap3" ]; + + meta = with lib; { + description = "Bootstrap 3 template pack for django-crispy-forms"; + homepage = "https://github.com/django-crispy-forms/crispy-bootstrap3"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b4abd54e9e7d..e1916b66751a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3289,6 +3289,8 @@ self: super: with self; { django-countries = callPackage ../development/python-modules/django-countries { }; + django-crispy-bootstrap3 = callPackage ../development/python-modules/django-crispy-bootstrap3 { }; + django-crispy-bootstrap4 = callPackage ../development/python-modules/django-crispy-bootstrap4 { }; django-crispy-bootstrap5 = callPackage ../development/python-modules/django-crispy-bootstrap5 { }; From dc1bc652b05447777616260425f3c963cfb45abe Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:06:05 +0200 Subject: [PATCH 54/64] python3Packages.pyicumessageformat: init at 1.0.0 Co-authored-by: Taeer Bar-Yam --- .../pyicumessageformat/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/pyicumessageformat/default.nix diff --git a/pkgs/development/python-modules/pyicumessageformat/default.nix b/pkgs/development/python-modules/pyicumessageformat/default.nix new file mode 100644 index 000000000000..efa0969006b8 --- /dev/null +++ b/pkgs/development/python-modules/pyicumessageformat/default.nix @@ -0,0 +1,32 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pyicumessageformat"; + version = "1.0.0"; + pyproject = true; + build-system = [ setuptools ]; + + src = fetchPypi { + pname = "pyicumessageformat"; + inherit version; + hash = "sha256-s+l8DtEMKxA/DzpwGqZSlwDqCrZuDzsj3I5K7hgfyEA="; + }; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pyicumessageformat" ]; + + meta = with lib; { + description = "Unopinionated Python3 parser for ICU MessageFormat"; + homepage = "https://github.com/SirStendec/pyicumessageformat/"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e1916b66751a..1b652257b913 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11551,6 +11551,8 @@ self: super: with self; { pyicu = callPackage ../development/python-modules/pyicu { }; + pyicumessageformat = callPackage ../development/python-modules/pyicumessageformat { }; + pyimpfuzzy = callPackage ../development/python-modules/pyimpfuzzy { inherit (pkgs) ssdeep; }; From 4cb15fc024318caf175358259e1eabb0952db0d4 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:06:36 +0200 Subject: [PATCH 55/64] python3Packages.siphashc: init at 2.4.1 Co-authored-by: Jan Tojnar Co-authored-by: Taeer Bar-Yam --- .../python-modules/siphashc/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/siphashc/default.nix diff --git a/pkgs/development/python-modules/siphashc/default.nix b/pkgs/development/python-modules/siphashc/default.nix new file mode 100644 index 000000000000..76c9ea7ad5c0 --- /dev/null +++ b/pkgs/development/python-modules/siphashc/default.nix @@ -0,0 +1,31 @@ +{ + lib, + fetchPypi, + buildPythonPackage, + setuptools, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "siphashc"; + version = "2.4.1"; + pyproject = true; + build-system = [ setuptools ]; + + src = fetchPypi { + pname = "siphashc"; + inherit version; + sha256 = "sha256-ptNpy7VkUXHbjvdir6v+eYOmtQ/j8XPXq4lj7ceS/5s="; + }; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "siphashc" ]; + + meta = with lib; { + description = "Python c-module for siphash"; + homepage = "https://github.com/WeblateOrg/siphashc"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1b652257b913..24d054a554e0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14417,6 +14417,8 @@ self: super: with self; { sip = callPackage ../development/python-modules/sip { }; + siphashc = callPackage ../development/python-modules/siphashc { }; + sip4 = callPackage ../development/python-modules/sip/4.x.nix { }; sipyco = callPackage ../development/python-modules/sipyco { }; From 31ffc98804d96f70207b89109917f48c9466f9af Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:07:29 +0200 Subject: [PATCH 56/64] python3Packages.weblate-language-data: init at 2024.5 --- .../weblate-language-data/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/weblate-language-data/default.nix diff --git a/pkgs/development/python-modules/weblate-language-data/default.nix b/pkgs/development/python-modules/weblate-language-data/default.nix new file mode 100644 index 000000000000..1566f83019dc --- /dev/null +++ b/pkgs/development/python-modules/weblate-language-data/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + translate-toolkit, +}: + +buildPythonPackage rec { + pname = "weblate-language-data"; + version = "2024.5"; + pyproject = true; + build-system = [ setuptools ]; + + src = fetchPypi { + pname = "weblate_language_data"; + inherit version; + hash = "sha256-kDt5ZF8cFH6HoQVlGX+jbchbwVCUIvmxHsCY3hjtjDM="; + }; + + dependencies = [ translate-toolkit ]; + + # No tests + doCheck = false; + + pythonImportsCheck = [ "weblate_language_data" ]; + + meta = with lib; { + description = "Language definitions used by Weblate"; + homepage = "https://github.com/WeblateOrg/language-data"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 24d054a554e0..59528b789409 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17379,6 +17379,8 @@ self: super: with self; { webexteamssdk = callPackage ../development/python-modules/webexteamssdk { }; + weblate-language-data = callPackage ../development/python-modules/weblate-language-data { }; + webob = callPackage ../development/python-modules/webob { }; webrtc-noise-gain = callPackage ../development/python-modules/webrtc-noise-gain { }; From 5941b2d3622192800bb29f281028938936a9f8d7 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:08:22 +0200 Subject: [PATCH 57/64] python3Packages.weblate-schemas: init at 2024.1 --- .../weblate-schemas/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/weblate-schemas/default.nix diff --git a/pkgs/development/python-modules/weblate-schemas/default.nix b/pkgs/development/python-modules/weblate-schemas/default.nix new file mode 100644 index 000000000000..728612b8a103 --- /dev/null +++ b/pkgs/development/python-modules/weblate-schemas/default.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + fqdn, + jsonschema, + rfc3987, + strict-rfc3339, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "weblate-schemas"; + version = "2024.1"; + + src = fetchPypi { + pname = "weblate_schemas"; + inherit version; + hash = "sha256-nYPLD3VDO1Z97HI79J6Yjj3bWp1xKB79FWPCW146iz4="; + }; + + dependencies = [ + fqdn + jsonschema + rfc3987 + strict-rfc3339 + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "weblate_schemas" ]; + + meta = with lib; { + description = "Schemas used by Weblate"; + homepage = "https://github.com/WeblateOrg/weblate_schemas"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 59528b789409..eb361c65b45a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17381,6 +17381,8 @@ self: super: with self; { weblate-language-data = callPackage ../development/python-modules/weblate-language-data { }; + weblate-schemas = callPackage ../development/python-modules/weblate-schemas { }; + webob = callPackage ../development/python-modules/webob { }; webrtc-noise-gain = callPackage ../development/python-modules/webrtc-noise-gain { }; From 601d2933764f33a689679a583a08393c35b641e5 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:09:40 +0200 Subject: [PATCH 58/64] python3Packages.translation-finder: init at 2.16 --- .../translation-finder/default.nix | 40 +++++++++++++++++++ .../translation-finder/fix_tests.patch | 25 ++++++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/translation-finder/default.nix create mode 100644 pkgs/development/python-modules/translation-finder/fix_tests.patch diff --git a/pkgs/development/python-modules/translation-finder/default.nix b/pkgs/development/python-modules/translation-finder/default.nix new file mode 100644 index 000000000000..c31c76413646 --- /dev/null +++ b/pkgs/development/python-modules/translation-finder/default.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + charset-normalizer, + ruamel-yaml, + weblate-language-data, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "translation-finder"; + version = "2.16"; + + src = fetchPypi { + pname = "translation-finder"; + inherit version; + hash = "sha256-a1C+j4Zo0DJ9BWDn5Zsu4zAftcUixfPktAWdqiFJpiU="; + }; + + patches = [ ./fix_tests.patch ]; + + dependencies = [ + charset-normalizer + ruamel-yaml + weblate-language-data + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "translation_finder" ]; + + meta = with lib; { + description = "Translation file finder for Weblate"; + homepage = "https://github.com/WeblateOrg/translation-finder"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ erictapen ]; + }; + +} diff --git a/pkgs/development/python-modules/translation-finder/fix_tests.patch b/pkgs/development/python-modules/translation-finder/fix_tests.patch new file mode 100644 index 000000000000..caf748a77130 --- /dev/null +++ b/pkgs/development/python-modules/translation-finder/fix_tests.patch @@ -0,0 +1,25 @@ +diff --git a/translation_finder/test_api.py b/translation_finder/test_api.py +index c3b020c..9be070d 100644 +--- a/translation_finder/test_api.py ++++ b/translation_finder/test_api.py +@@ -173,6 +173,7 @@ class APITest(DiscoveryTestCase): + "filemask": "json/gotext-*.json", + "template": "json/gotext-en.json", + }, ++ {'filemask': 'linked/*.po', 'new_base': 'linked/messages.pot', 'file_format': 'po'}, + ], + ) + +diff --git a/translation_finder/test_discovery.py b/translation_finder/test_discovery.py +index 1a0ca40..14caa4f 100644 +--- a/translation_finder/test_discovery.py ++++ b/translation_finder/test_discovery.py +@@ -945,6 +945,9 @@ class JSONDiscoveryTest(DiscoveryTestCase): + "file_format": "json-nested", + "template": "src/app/[locale]/_translations/en.json", + }, ++ {'filemask': '*/app/[locale]/_translations/cs.json', 'file_format': 'json-nested'}, ++ {'filemask': '*/app/[locale]/_translations/de.json', 'file_format': 'json-nested'}, ++ {'filemask': '*/app/[locale]/_translations/en.json', 'file_format': 'json-nested'} + ], + ) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb361c65b45a..4b610e7c7013 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15813,6 +15813,8 @@ self: super: with self; { translate-toolkit = callPackage ../development/python-modules/translate-toolkit { }; + translation-finder = callPackage ../development/python-modules/translation-finder { }; + trackpy = callPackage ../development/python-modules/trackpy { }; trafilatura = callPackage ../development/python-modules/trafilatura { }; From a5730c658fa0883e33bca98e7a6180ad26e09a40 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:10:33 +0200 Subject: [PATCH 59/64] weblate: init at 5.6.2 --- pkgs/by-name/we/weblate/cache.lock.patch | 22 +++ pkgs/by-name/we/weblate/package.nix | 180 +++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 pkgs/by-name/we/weblate/cache.lock.patch create mode 100644 pkgs/by-name/we/weblate/package.nix diff --git a/pkgs/by-name/we/weblate/cache.lock.patch b/pkgs/by-name/we/weblate/cache.lock.patch new file mode 100644 index 000000000000..dc5c50cdf77e --- /dev/null +++ b/pkgs/by-name/we/weblate/cache.lock.patch @@ -0,0 +1,22 @@ +diff --git a/weblate/utils/lock.py b/weblate/utils/lock.py +index 53c1486bc9..a0a5fc5a74 100644 +--- a/weblate/utils/lock.py ++++ b/weblate/utils/lock.py +@@ -43,8 +43,6 @@ class WeblateLock: + self._name = self._format_template(cache_template) + self._lock = cache.lock( + key=self._name, +- expire=3600, +- auto_renewal=True, + ) + self._enter_implementation = self._enter_redis + else: +@@ -62,7 +60,7 @@ class WeblateLock: + + def _enter_redis(self): + try: +- lock_result = self._lock.acquire(timeout=self._timeout) ++ lock_result = self._lock.acquire() + except AlreadyAcquired: + return + diff --git a/pkgs/by-name/we/weblate/package.nix b/pkgs/by-name/we/weblate/package.nix new file mode 100644 index 000000000000..3b499ce31ada --- /dev/null +++ b/pkgs/by-name/we/weblate/package.nix @@ -0,0 +1,180 @@ +{ + lib, + python3, + fetchFromGitHub, + pango, + harfbuzz, + librsvg, + gdk-pixbuf, + glib, + borgbackup, + writeText, + nixosTests, +}: + +let + python = python3.override { + packageOverrides = final: prev: { + django = prev.django_5.overridePythonAttrs (old: { + dependencies = old.dependencies ++ prev.django_5.optional-dependencies.argon2; + }); + sentry-sdk = prev.sentry-sdk_2; + djangorestframework = prev.djangorestframework.overridePythonAttrs (old: { + # https://github.com/encode/django-rest-framework/discussions/9342 + disabledTests = (old.disabledTests or [ ]) ++ [ "test_invalid_inputs" ]; + }); + celery = prev.celery.overridePythonAttrs (old: { + dependencies = old.dependencies ++ prev.celery.optional-dependencies.redis; + }); + python-redis-lock = prev.python-redis-lock.overridePythonAttrs (old: { + dependencies = old.dependencies ++ prev.python-redis-lock.optional-dependencies.django; + }); + }; + }; +in +python.pkgs.buildPythonApplication rec { + pname = "weblate"; + version = "5.6.2"; + + pyproject = true; + + outputs = [ + "out" + "static" + ]; + + src = fetchFromGitHub { + owner = "WeblateOrg"; + repo = "weblate"; + rev = "weblate-${version}"; + sha256 = "sha256-t/hnigsKjdWCkUd8acNWhYVFmZ7oGn74+12347MkFgM="; + }; + + patches = [ + # FIXME This shouldn't be necessary and probably has to do with some dependency mismatch. + ./cache.lock.patch + ]; + + # Relax dependency constraints + # mistletoe: https://github.com/WeblateOrg/weblate/commit/50df46a25dda2b7b39de86d4c65ecd7a685f62e6 + # borgbackup: https://github.com/WeblateOrg/weblate/commit/355c81c977c59948535a98a35a5c05d7e6909703 + # django-crispy-forms: https://github.com/WeblateOrg/weblate/commit/7b341c523ed9b3b41ecfbc5c92dd6156992e4f32 + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"mistletoe>=1.3.0,<1.4"' '"mistletoe>=1.3.0,<1.5"' \ + --replace '"borgbackup>=1.2.5,<1.3"' '"borgbackup>=1.2.5,<1.5"' \ + --replace '"django-crispy-forms>=2.1,<2.3"' '"django-crispy-forms>=2.1,<2.4"' + ''; + + build-system = with python.pkgs; [ setuptools ]; + + # Build static files into a separate output + postBuild = + let + staticSettings = writeText "static_settings.py" '' + STATIC_ROOT = os.environ["static"] + "/static" + COMPRESS_ENABLED = True + COMPRESS_OFFLINE = True + COMPRESS_ROOT = os.environ["static"] + "/compressor-cache" + # So we don't need postgres dependencies + DATABASES = {} + ''; + in + '' + mkdir $static + cat weblate/settings_example.py ${staticSettings} > weblate/settings_static.py + export DJANGO_SETTINGS_MODULE="weblate.settings_static" + ${python.pythonOnBuildForHost.interpreter} manage.py collectstatic --no-input + ${python.pythonOnBuildForHost.interpreter} manage.py compress + ''; + + dependencies = with python.pkgs; [ + aeidon + ahocorasick-rs + borgbackup + celery + certifi + charset-normalizer + django-crispy-bootstrap3 + cryptography + cssselect + cython + diff-match-patch + django-appconf + django-celery-beat + django-compressor + django-cors-headers + django-crispy-forms + django-filter + django-redis + django + djangorestframework + filelock + fluent-syntax + gitpython + hiredis + html2text + iniparse + jsonschema + lxml + misaka + mistletoe + nh3 + openpyxl + packaging + phply + pillow + pycairo + pygments + pygobject3 + pyicumessageformat + pyparsing + python-dateutil + python-redis-lock + rapidfuzz + redis + requests + ruamel-yaml + sentry-sdk + siphashc + social-auth-app-django + social-auth-core + tesserocr + translate-toolkit + translation-finder + user-agents + weblate-language-data + weblate-schemas + ]; + + optional-dependencies = { + postgres = with python.pkgs; [ psycopg ]; + }; + + # We don't just use wrapGAppsNoGuiHook because we need to expose GI_TYPELIB_PATH + GI_TYPELIB_PATH = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [ + pango + harfbuzz + librsvg + gdk-pixbuf + glib + ]; + makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" ]; + + passthru = { + inherit python; + # We need to expose this so weblate can work outside of calling its bin output + inherit GI_TYPELIB_PATH; + tests = { + inherit (nixosTests) weblate; + }; + }; + + meta = with lib; { + description = "Web based translation tool with tight version control integration"; + homepage = "https://weblate.org/"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ erictapen ]; + }; +} From 13c96978c3da9f8a4a4ee56a462662e7c7b728c3 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Mon, 22 Jul 2024 17:11:49 +0200 Subject: [PATCH 60/64] nixos/weblate: init module and test Co-authored-by: Taeer Bar-Yam --- nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/weblate.nix | 388 ++++++++++++++++++++ nixos/tests/all-tests.nix | 1 + nixos/tests/web-apps/weblate.nix | 104 ++++++ 4 files changed, 494 insertions(+) create mode 100644 nixos/modules/services/web-apps/weblate.nix create mode 100644 nixos/tests/web-apps/weblate.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 6b83c0bab406..ad7f075788be 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1484,6 +1484,7 @@ ./services/web-apps/trilium.nix ./services/web-apps/tt-rss.nix ./services/web-apps/vikunja.nix + ./services/web-apps/weblate.nix ./services/web-apps/whitebophir.nix ./services/web-apps/wiki-js.nix ./services/web-apps/windmill.nix diff --git a/nixos/modules/services/web-apps/weblate.nix b/nixos/modules/services/web-apps/weblate.nix new file mode 100644 index 000000000000..398d634a2b92 --- /dev/null +++ b/nixos/modules/services/web-apps/weblate.nix @@ -0,0 +1,388 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.services.weblate; + + dataDir = "/var/lib/weblate"; + settingsDir = "${dataDir}/settings"; + + finalPackage = cfg.package.overridePythonAttrs (old: { + # We only support the PostgreSQL backend in this module + dependencies = old.dependencies ++ cfg.package.optional-dependencies.postgres; + # Use a settings module in dataDir, to avoid having to rebuild the package + # when user changes settings. + makeWrapperArgs = (old.makeWrapperArgs or [ ]) ++ [ + "--set PYTHONPATH \"${settingsDir}\"" + "--set DJANGO_SETTINGS_MODULE \"settings\"" + ]; + }); + inherit (finalPackage) python; + + pythonEnv = python.buildEnv.override { + extraLibs = with python.pkgs; [ + (toPythonModule finalPackage) + celery + ]; + }; + + # This extends and overrides the weblate/settings_example.py code found in upstream. + weblateConfig = + '' + # This was autogenerated by the NixOS module. + + SITE_TITLE = "Weblate" + SITE_DOMAIN = "${cfg.localDomain}" + # TLS terminates at the reverse proxy, but this setting controls how links to weblate are generated. + ENABLE_HTTPS = True + SESSION_COOKIE_SECURE = ENABLE_HTTPS + DATA_DIR = "${dataDir}" + CACHE_DIR = f"{DATA_DIR}/cache" + STATIC_ROOT = "${finalPackage.static}/static" + MEDIA_ROOT = "/var/lib/weblate/media" + COMPRESS_ROOT = "${finalPackage.static}/compressor-cache" + DEBUG = False + + DATABASES = { + "default": { + "ENGINE": "django.db.backends.postgresql", + "HOST": "/run/postgresql", + "NAME": "weblate", + "USER": "weblate", + } + } + + with open("${cfg.djangoSecretKeyFile}") as f: + SECRET_KEY = f.read().rstrip("\n") + + CACHES = { + "default": { + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": "unix://${config.services.redis.servers.weblate.unixSocket}", + "OPTIONS": { + "CLIENT_CLASS": "django_redis.client.DefaultClient", + "PASSWORD": None, + "CONNECTION_POOL_KWARGS": {}, + }, + "KEY_PREFIX": "weblate", + "TIMEOUT": 3600, + }, + "avatar": { + "BACKEND": "django.core.cache.backends.filebased.FileBasedCache", + "LOCATION": "/var/lib/weblate/avatar-cache", + "TIMEOUT": 86400, + "OPTIONS": {"MAX_ENTRIES": 1000}, + } + } + + + CELERY_TASK_ALWAYS_EAGER = False + CELERY_BROKER_URL = "redis+socket://${config.services.redis.servers.weblate.unixSocket}" + CELERY_RESULT_BACKEND = CELERY_BROKER_URL + + VCS_BACKENDS = ("weblate.vcs.git.GitRepository",) + + '' + + lib.optionalString cfg.smtp.enable '' + ADMINS = (("Weblate Admin", "${cfg.smtp.user}"),) + + EMAIL_HOST = "${cfg.smtp.host}" + EMAIL_USE_TLS = True + EMAIL_HOST_USER = "${cfg.smtp.user}" + SERVER_EMAIL = "${cfg.smtp.user}" + DEFAULT_FROM_EMAIL = "${cfg.smtp.user}" + EMAIL_PORT = 587 + with open("${cfg.smtp.passwordFile}") as f: + EMAIL_HOST_PASSWORD = f.read().rstrip("\n") + + '' + + cfg.extraConfig; + settings_py = + pkgs.runCommand "weblate_settings.py" + { + inherit weblateConfig; + passAsFile = [ "weblateConfig" ]; + } + '' + mkdir -p $out + cat \ + ${finalPackage}/${python.sitePackages}/weblate/settings_example.py \ + $weblateConfigPath \ + > $out/settings.py + ''; + + environment = { + PYTHONPATH = "${settingsDir}:${pythonEnv}/${python.sitePackages}/"; + DJANGO_SETTINGS_MODULE = "settings"; + # We run Weblate through gunicorn, so we can't utilise the env var set in the wrapper. + inherit (finalPackage) GI_TYPELIB_PATH; + }; + + weblatePath = with pkgs; [ + gitSVN + + #optional + git-review + tesseract + licensee + mercurial + ]; +in +{ + + options = { + services.weblate = { + enable = lib.mkEnableOption "Weblate service"; + + package = lib.mkPackageOption pkgs "weblate" { }; + + localDomain = lib.mkOption { + description = "The domain name serving your Weblate instance."; + example = "weblate.example.org"; + type = lib.types.str; + }; + + djangoSecretKeyFile = lib.mkOption { + description = '' + Location of the Django secret key. + + This should be a path pointing to a file with secure permissions (not /nix/store). + + Can be generated with `weblate-generate-secret-key` which is available as the `weblate` user. + ''; + type = lib.types.path; + }; + + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = '' + Text to append to `settings.py` Weblate configuration file. + ''; + }; + + smtp = { + enable = lib.mkEnableOption "Weblate SMTP support"; + user = lib.mkOption { + description = "SMTP login name."; + example = "weblate@example.org"; + type = lib.types.str; + }; + + host = lib.mkOption { + description = "SMTP host used when sending emails to users."; + type = lib.types.str; + example = "127.0.0.1"; + }; + + passwordFile = lib.mkOption { + description = '' + Location of a file containing the SMTP password. + + This should be a path pointing to a file with secure permissions (not /nix/store). + ''; + type = lib.types.path; + }; + }; + + }; + }; + + config = lib.mkIf cfg.enable { + + systemd.tmpfiles.rules = [ "L+ ${settingsDir} - - - - ${settings_py}" ]; + + services.nginx = { + enable = true; + virtualHosts."${cfg.localDomain}" = { + + forceSSL = true; + enableACME = true; + + locations = { + "= /favicon.ico".alias = "${finalPackage}/${python.sitePackages}/weblate/static/favicon.ico"; + "/static/".alias = "${finalPackage.static}/static/"; + "/static/CACHE/".alias = "${finalPackage.static}/compressor-cache/CACHE/"; + "/media/".alias = "/var/lib/weblate/media/"; + "/".proxyPass = "http://unix:///run/weblate.socket"; + }; + + }; + }; + + systemd.services.weblate-postgresql-setup = { + description = "Weblate PostgreSQL setup"; + after = [ "postgresql.service" ]; + serviceConfig = { + Type = "oneshot"; + User = "postgres"; + Group = "postgres"; + ExecStart = '' + ${config.services.postgresql.package}/bin/psql weblate -c "CREATE EXTENSION IF NOT EXISTS pg_trgm" + ''; + }; + }; + + systemd.services.weblate-migrate = { + description = "Weblate migration"; + after = [ "weblate-postgresql-setup.service" ]; + requires = [ "weblate-postgresql-setup.service" ]; + # We want this to be active on boot, not just on socket activation + wantedBy = [ "multi-user.target" ]; + inherit environment; + path = weblatePath; + serviceConfig = { + Type = "oneshot"; + StateDirectory = "weblate"; + User = "weblate"; + Group = "weblate"; + ExecStart = "${finalPackage}/bin/weblate migrate --noinput"; + }; + }; + + systemd.services.weblate-celery = { + description = "Weblate Celery"; + after = [ + "network.target" + "redis.service" + "postgresql.service" + ]; + # We want this to be active on boot, not just on socket activation + wantedBy = [ "multi-user.target" ]; + environment = environment // { + CELERY_WORKER_RUNNING = "1"; + }; + path = weblatePath; + # Recommendations from: + # https://github.com/WeblateOrg/weblate/blob/main/weblate/examples/celery-weblate.service + serviceConfig = + let + # We have to push %n through systemd's replacement, therefore %%n. + pidFile = "/run/celery/weblate-%%n.pid"; + nodes = "celery notify memory backup translate"; + cmd = verb: '' + ${pythonEnv}/bin/celery multi ${verb} \ + ${nodes} \ + -A "weblate.utils" \ + --pidfile=${pidFile} \ + --logfile=/var/log/celery/weblate-%%n%%I.log \ + --loglevel=DEBUG \ + --beat:celery \ + --queues:celery=celery \ + --prefetch-multiplier:celery=4 \ + --queues:notify=notify \ + --prefetch-multiplier:notify=10 \ + --queues:memory=memory \ + --prefetch-multiplier:memory=10 \ + --queues:translate=translate \ + --prefetch-multiplier:translate=4 \ + --concurrency:backup=1 \ + --queues:backup=backup \ + --prefetch-multiplier:backup=2 + ''; + in + { + Type = "forking"; + User = "weblate"; + Group = "weblate"; + WorkingDirectory = "${finalPackage}/${python.sitePackages}/weblate/"; + RuntimeDirectory = "celery"; + RuntimeDirectoryPreserve = "restart"; + LogsDirectory = "celery"; + ExecStart = cmd "start"; + ExecReload = cmd "restart"; + ExecStop = '' + ${pythonEnv}/bin/celery multi stopwait \ + ${nodes} \ + --pidfile=${pidFile} + ''; + Restart = "always"; + }; + }; + + systemd.services.weblate = { + description = "Weblate Gunicorn app"; + after = [ + "network.target" + "weblate-migrate.service" + "weblate-celery.service" + ]; + requires = [ + "weblate-migrate.service" + "weblate-celery.service" + "weblate.socket" + ]; + inherit environment; + path = weblatePath; + serviceConfig = { + Type = "notify"; + NotifyAccess = "all"; + ExecStart = + let + gunicorn = python.pkgs.gunicorn.overridePythonAttrs (old: { + # Allows Gunicorn to set a meaningful process name + dependencies = (old.dependencies or [ ]) ++ old.optional-dependencies.setproctitle; + }); + in + '' + ${gunicorn}/bin/gunicorn \ + --name=weblate \ + --bind='unix:///run/weblate.socket' \ + weblate.wsgi + ''; + ExecReload = "kill -s HUP $MAINPID"; + KillMode = "mixed"; + PrivateTmp = true; + WorkingDirectory = dataDir; + StateDirectory = "weblate"; + RuntimeDirectory = "weblate"; + User = "weblate"; + Group = "weblate"; + }; + }; + + systemd.sockets.weblate = { + before = [ "nginx.service" ]; + wantedBy = [ "sockets.target" ]; + socketConfig = { + ListenStream = "/run/weblate.socket"; + SocketUser = "weblate"; + SocketGroup = "weblate"; + SocketMode = "770"; + }; + }; + + services.redis.servers.weblate = { + enable = true; + user = "weblate"; + unixSocket = "/run/redis-weblate/redis.sock"; + unixSocketPerm = 770; + }; + + services.postgresql = { + enable = true; + ensureUsers = [ + { + name = "weblate"; + ensureDBOwnership = true; + } + ]; + ensureDatabases = [ "weblate" ]; + }; + + users.users.weblate = { + isSystemUser = true; + group = "weblate"; + packages = [ finalPackage ] ++ weblatePath; + }; + + users.groups.weblate.members = [ config.services.nginx.user ]; + }; + + meta.maintainers = with lib.maintainers; [ erictapen ]; + +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 41e0e07da82a..424ccf4d9a44 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1073,6 +1073,7 @@ in { wastebin = handleTest ./wastebin.nix {}; watchdogd = handleTest ./watchdogd.nix {}; webhook = runTest ./webhook.nix; + weblate = handleTest ./web-apps/weblate.nix {}; wiki-js = handleTest ./wiki-js.nix {}; wine = handleTest ./wine.nix {}; wireguard = handleTest ./wireguard {}; diff --git a/nixos/tests/web-apps/weblate.nix b/nixos/tests/web-apps/weblate.nix new file mode 100644 index 000000000000..40d60f7e5f99 --- /dev/null +++ b/nixos/tests/web-apps/weblate.nix @@ -0,0 +1,104 @@ +import ../make-test-python.nix ( + { pkgs, ... }: + + let + certs = import ../common/acme/server/snakeoil-certs.nix; + + serverDomain = certs.domain; + + admin = { + username = "admin"; + password = "snakeoilpass"; + }; + # An API token that we manually insert into the db as a valid one. + apiToken = "OVJh65sXaAfQMZ4NTcIGbFZIyBZbEZqWTi7azdDf"; + in + { + name = "weblate"; + meta.maintainers = with pkgs.lib.maintainers; [ erictapen ]; + + nodes.server = + { pkgs, lib, ... }: + { + virtualisation.memorySize = 2048; + + services.weblate = { + enable = true; + localDomain = "${serverDomain}"; + djangoSecretKeyFile = pkgs.writeText "weblate-django-secret" "thisissnakeoilsecretwithmorethan50characterscorrecthorsebatterystaple"; + extraConfig = '' + # Weblate tries to fetch Avatars from the network + ENABLE_AVATARS = False + ''; + }; + + services.nginx.virtualHosts."${serverDomain}" = { + enableACME = lib.mkForce false; + sslCertificate = certs."${serverDomain}".cert; + sslCertificateKey = certs."${serverDomain}".key; + }; + + security.pki.certificateFiles = [ certs.ca.cert ]; + + networking.hosts."::1" = [ "${serverDomain}" ]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; + + users.users.weblate.shell = pkgs.bashInteractive; + }; + + nodes.client = + { pkgs, nodes, ... }: + { + environment.systemPackages = [ pkgs.wlc ]; + + environment.etc."xdg/weblate".text = '' + [weblate] + url = https://${serverDomain}/api/ + key = ${apiToken} + ''; + + networking.hosts."${nodes.server.networking.primaryIPAddress}" = [ "${serverDomain}" ]; + + security.pki.certificateFiles = [ certs.ca.cert ]; + }; + + testScript = '' + import json + + start_all() + server.wait_for_unit("weblate.socket") + server.wait_until_succeeds("curl -f https://${serverDomain}/") + server.succeed("sudo -iu weblate -- weblate createadmin --username ${admin.username} --password ${admin.password} --email weblate@example.org") + + # It's easier to replace the generated API token with a predefined one than + # to extract it at runtime. + server.succeed("sudo -iu weblate -- psql -d weblate -c \"UPDATE authtoken_token SET key = '${apiToken}' WHERE user_id = (SELECT id FROM weblate_auth_user WHERE username = 'admin');\"") + + client.wait_for_unit("multi-user.target") + + # Test the official Weblate client wlc. + client.wait_until_succeeds("REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt wlc --debug list-projects") + + def call_wl_api(arg): + (rv, result) = client.execute("curl -H \"Content-Type: application/json\" -H \"Authorization: Token ${apiToken}\" https://${serverDomain}/api/{}".format(arg)) + assert rv == 0 + print(result) + + call_wl_api("users/ --data '{}'".format( + json.dumps( + {"username": "test1", + "full_name": "test1", + "email": "test1@example.org" + }))) + + # TODO: Check sending and receiving email. + # server.wait_for_unit("postfix.service") + + # TODO: The goal is for this to succeed, but there are still some checks failing. + # server.succeed("sudo -iu weblate -- weblate check --deploy") + ''; + } +) From 02a8f81ccbc8fee8f0be9daf1b1e56830e78382c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:48:20 +0000 Subject: [PATCH 61/64] telegraf: 1.31.2 -> 1.31.3 --- pkgs/servers/monitoring/telegraf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/telegraf/default.nix b/pkgs/servers/monitoring/telegraf/default.nix index 8a8768c2a373..d2291890d8b6 100644 --- a/pkgs/servers/monitoring/telegraf/default.nix +++ b/pkgs/servers/monitoring/telegraf/default.nix @@ -9,7 +9,7 @@ buildGoModule rec { pname = "telegraf"; - version = "1.31.2"; + version = "1.31.3"; subPackages = [ "cmd/telegraf" ]; @@ -17,10 +17,10 @@ buildGoModule rec { owner = "influxdata"; repo = "telegraf"; rev = "v${version}"; - hash = "sha256-LTo9wWCqjLoA9wjCXhZ6EjvRR/Xp8ByHvq/ytgS8sCo="; + hash = "sha256-J5jIyrxG2cLEu909/fcPQCo+xUlW6VAoge5atCrW4HY="; }; - vendorHash = "sha256-spXS1vNRgXBO2xZIyVgsfO5V+SYK8dC6YDA/dGOYt6g="; + vendorHash = "sha256-lxLFUKOFg7HAjgZIVACW6VlWLgCeZX38SNRsjxc9D7g="; proxyVendor = true; ldflags = [ From fba2c3b6a7bb696d424be8cbb95ad10a11f2e236 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 07:35:49 +0000 Subject: [PATCH 62/64] php81Extensions.blackfire: 1.92.21 -> 1.92.22 --- .../tools/misc/blackfire/php-probe.nix | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/tools/misc/blackfire/php-probe.nix b/pkgs/development/tools/misc/blackfire/php-probe.nix index e31984a2c28f..b5079490a07d 100644 --- a/pkgs/development/tools/misc/blackfire/php-probe.nix +++ b/pkgs/development/tools/misc/blackfire/php-probe.nix @@ -14,47 +14,47 @@ assert lib.assertMsg (!php.ztsSupport) "blackfire only supports non zts versions let phpMajor = lib.versions.majorMinor php.version; - version = "1.92.21"; + version = "1.92.22"; hashes = { "x86_64-linux" = { system = "amd64"; hash = { - "8.1" = "sha256-sEpoykSzgGGubXMUFrmxmYp1dNMfG6PfBb/tiMl/Tgs="; - "8.2" = "sha256-ivF1SlzhnxpJEdTcia1GFsXd0etF5ItK13WzRIrf9n0="; - "8.3" = "sha256-wonpCcbrvwo5xqKObZsr6eFNumv7E8vxvujXh7gSjtM="; + "8.1" = "sha256-MWAKoshKC+hW8ldRLfYQIcMwpSHvW+hV9dRMvZ4rqcU="; + "8.2" = "sha256-xAdECbxuaV5PxG+X7+o2p5pOEG9lgRLuOTp46k5I4RM="; + "8.3" = "sha256-4vCLpSy4kJ4qwOSonSFvlevCfNMxjIU6AUswm0uG59o="; }; }; "i686-linux" = { system = "i386"; hash = { - "8.1" = "sha256-a6jkXJFHtsV0f8NC3ljeyQOjIASFBMuJA2hscX7j+QI="; - "8.2" = "sha256-ASgWrfd0My4B3O0InOuMRaLPfVw4dgoqV4EJM1aEr2I="; - "8.3" = "sha256-VRPEODt94DEwvrem7vNhpPt9i82HxB1UHup93GYcD5U="; + "8.1" = "sha256-fvXv3Yn3FXBO4EIgb/5LI3jJxV5HA2Q2JCNy14bA8eU="; + "8.2" = "sha256-0m2ze1e09IUGjTpxbyTOchQBBMa86cpiMrAImiXrAZ0="; + "8.3" = "sha256-nhVP4/Ls71MxPN6Ko1bDG8PSHkHQt+vC08EbP0WAL8g="; }; }; "aarch64-linux" = { system = "arm64"; hash = { - "8.1" = "sha256-tSK+fhDQwSCTcrKQuvAe+JfHdCZIuneShvkz0rGunwM="; - "8.2" = "sha256-38oZCy2BrcQ6Hg/q40iw+PdQ2p2QKyb08A3ZT9L6Ots="; - "8.3" = "sha256-xEOV3dXu9AcDvm0qiUYVUySBTx7rTE0XFQdiSpDLY74="; + "8.1" = "sha256-pvzKVvtpBh+nwppqSqxSsR989mWzwyAHtwIdDjWx08o="; + "8.2" = "sha256-O6RhO/PY2C4GubYl/jcTzpWeiUKSGy8Np4/KrlMsE1Y="; + "8.3" = "sha256-3sfjwXq980oRV8u+IAamyYKDp2UMREFaynigz/dpyXE="; }; }; "aarch64-darwin" = { system = "arm64"; hash = { - "8.1" = "sha256-gRdtxGv3C30ZtYv7s8wspd/z21HWtMS+gw7MRt/77DA="; - "8.2" = "sha256-jxEs6kGHHgswOHPmUM4UlYfJmH9f58zj6G19o00xQiQ="; - "8.3" = "sha256-IFS/quwCWJkTogAK+GUzFNZYBkFupp06vskkueJA+Us="; + "8.1" = "sha256-peZmwxzQ2NCKkq5qSraIb4pnnJDwcRkCyGW8qeBSGRk="; + "8.2" = "sha256-MvF7S+VITEnsJSLz3xEy927zIR6TN+p3nRGQFjKqtu8="; + "8.3" = "sha256-sUlD8cPk7emJPtz4en6AcFxs/7NUjxUMkqf/Qs3INIA="; }; }; "x86_64-darwin" = { system = "amd64"; hash = { - "8.1" = "sha256-5Mbu0ppvpzC64zJ7MWFrOJeG33z4/f8SobLMywYiIOg="; - "8.2" = "sha256-PDvGidy+Qjo+woeaWkTCJmEVymR9vTKCSoSb1YgSqCE="; - "8.3" = "sha256-iwg+CMly70k8RWTPnJ7KPkIRKumxPlDjDZDzzElcruA="; + "8.1" = "sha256-kMftb/fC9uyMZyjP4jmtYLM+xEhFqP7umQ5FLvR9vAo="; + "8.2" = "sha256-W8LXYz8KzWlzdpyqmo7XQmkzuyfXO0BZSkiBIlfi18g="; + "8.3" = "sha256-a/Q7avEJr/we5GF2NxTZywpsal5AkAGxEABMPCgy2LM="; }; }; }; From 3ed5055f0f5b147a73e38d0ddc35f5fa267aa63b Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 12 Aug 2024 15:35:09 +0200 Subject: [PATCH 63/64] importNpmLock: init fetcherOps per package --- .../node/import-npm-lock/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/node/import-npm-lock/default.nix b/pkgs/build-support/node/import-npm-lock/default.nix index d530b8ee30ff..b63e5237dc3e 100644 --- a/pkgs/build-support/node/import-npm-lock/default.nix +++ b/pkgs/build-support/node/import-npm-lock/default.nix @@ -17,6 +17,7 @@ let fetchModule = { module , npmRoot ? null + , fetcherOpts }: ( if module ? "resolved" then ( @@ -34,16 +35,16 @@ let ) else if (scheme == "http" || scheme == "https") then ( - fetchurl { + fetchurl ({ url = module.resolved; hash = module.integrity; - } + } // fetcherOpts ) ) else if lib.hasPrefix "git" module.resolved then ( - builtins.fetchGit { + builtins.fetchGit ({ url = module.resolved; - } + } // fetcherOpts ) ) else throw "Unsupported URL scheme: ${scheme}" ) @@ -62,6 +63,10 @@ in , packageLock ? importJSON (npmRoot + "/package-lock.json") , pname ? getName package , version ? getVersion package + # A map of additional fetcher options forwarded to the fetcher used to download the package. + # Example: { "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; } + # This will download the axios package with curl's verbose option. + , fetcherOpts ? {} }: let mapLockDependencies = @@ -82,10 +87,11 @@ in packageLock' = packageLock // { packages = mapAttrs - (_: module: + (modulePath: module: let src = fetchModule { inherit module npmRoot; + fetcherOpts = fetcherOpts.${modulePath} or {}; }; in (removeAttrs module [ From b1cfcd3d01180bec6060a5b0b444eb631575f2ec Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Aug 2024 04:28:50 +0000 Subject: [PATCH 64/64] yggdrasil: 0.5.7 -> 0.5.8 --- pkgs/by-name/yg/yggdrasil/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/yg/yggdrasil/package.nix b/pkgs/by-name/yg/yggdrasil/package.nix index 009e9e6af911..a5a144a28287 100644 --- a/pkgs/by-name/yg/yggdrasil/package.nix +++ b/pkgs/by-name/yg/yggdrasil/package.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "yggdrasil"; - version = "0.5.7"; + version = "0.5.8"; src = fetchFromGitHub { owner = "yggdrasil-network"; repo = "yggdrasil-go"; rev = "v${version}"; - sha256 = "sha256-hKgZejK7q0rySVBz3amC1wPhZsxCDexVECJWBMRQTDc="; + sha256 = "sha256-3sX1xNfblmIXI1hiXL9bhA4+CobUZ5xhpJFKugzwlGE="; }; vendorHash = "sha256-HBl30BnSERivIHb3dbfhDwwBvs3MUkltDf+R790vSGE=";