From d9fd4ba73348f702d38c477fa0fd7eaf88015cbe Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Sat, 8 Jul 2023 12:52:38 +0200 Subject: [PATCH 01/17] hid-nintendo: remove --- nixos/modules/services/hardware/joycond.nix | 3 -- .../linux/hid-nintendo/default.nix | 42 ------------------- pkgs/top-level/linux-kernels.nix | 2 +- 3 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 pkgs/os-specific/linux/hid-nintendo/default.nix diff --git a/nixos/modules/services/hardware/joycond.nix b/nixos/modules/services/hardware/joycond.nix index 1af18b3b63d3..df3239cb2a7d 100644 --- a/nixos/modules/services/hardware/joycond.nix +++ b/nixos/modules/services/hardware/joycond.nix @@ -2,7 +2,6 @@ let cfg = config.services.joycond; - kernelPackages = config.boot.kernelPackages; in with lib; @@ -24,8 +23,6 @@ with lib; config = mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - boot.extraModulePackages = optional (versionOlder kernelPackages.kernel.version "5.16") kernelPackages.hid-nintendo; - services.udev.packages = [ cfg.package ]; systemd.packages = [ cfg.package ]; diff --git a/pkgs/os-specific/linux/hid-nintendo/default.nix b/pkgs/os-specific/linux/hid-nintendo/default.nix deleted file mode 100644 index 7b8c73fc0ccd..000000000000 --- a/pkgs/os-specific/linux/hid-nintendo/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, kernel -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "hid-nintendo"; - version = "3.2"; - - src = fetchFromGitHub { - owner = "nicman23"; - repo = "dkms-hid-nintendo"; - rev = finalAttrs.version; - hash = "sha256-2a+95zwyhJsF/KSo/Pm/JZ7ktDG02UZjsixSnVUXRrA="; - }; - - setSourceRoot = '' - export sourceRoot=$(pwd)/source/src - ''; - - nativeBuildInputs = kernel.moduleBuildDependencies; - - makeFlags = kernel.makeFlags ++ [ - "-C" - "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - "M=$(sourceRoot)" - ]; - - buildFlags = [ "modules" ]; - installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; - installTargets = [ "modules_install" ]; - - meta = { - homepage = "https://github.com/nicman23/dkms-hid-nintendo"; - description = "A Nintendo HID kernel module"; - license = lib.licenses.gpl2Plus; - maintainers = [ ]; - platforms = lib.platforms.linux; - broken = lib.versionOlder kernel.version "4.14"; - }; -}) diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 8a87f9554808..bc6a5a7e35d3 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -354,7 +354,6 @@ in { fwts-efi-runtime = callPackage ../os-specific/linux/fwts/module.nix { }; gcadapter-oc-kmod = callPackage ../os-specific/linux/gcadapter-oc-kmod { }; - hid-nintendo = callPackage ../os-specific/linux/hid-nintendo { }; hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { }; @@ -563,6 +562,7 @@ in { } // lib.optionalAttrs config.allowAliases { ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18; + hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30 sch_cake = throw "sch_cake was added in mainline kernel version 4.19"; # Added 2023-06-14 rtl8723bs = throw "rtl8723bs was added in mainline kernel version 4.12"; # Added 2023-06-14 xmm7360-pci = throw "Support for the XMM7360 WWAN card was added to the iosm kmod in mainline kernel version 5.18"; From 96672039104b1fe06b6cd0573b32e531d62bd2ef Mon Sep 17 00:00:00 2001 From: XYenon Date: Sun, 30 Jul 2023 23:39:31 +0800 Subject: [PATCH 02/17] globalping-cli: init at 1.1.0 --- .../networking/globalping-cli/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/tools/networking/globalping-cli/default.nix diff --git a/pkgs/tools/networking/globalping-cli/default.nix b/pkgs/tools/networking/globalping-cli/default.nix new file mode 100644 index 000000000000..bc07f20a5b11 --- /dev/null +++ b/pkgs/tools/networking/globalping-cli/default.nix @@ -0,0 +1,38 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nix-update-script }: + +buildGoModule rec { + pname = "globalping-cli"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "jsdelivr"; + repo = pname; + rev = "v${version}"; + hash = "sha256-UY+SAmkE8h/K92Em5iikcMiNixkqnDVkhlrKVq1ZkVM="; + }; + + vendorHash = "sha256-fUB7WIEAPBot8A2f7WQ5wUDtCrOydZd4nd4qDuy1vzg="; + + nativeBuildInputs = [ installShellFiles ]; + + CGO_ENABLED = 0; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; + + postInstall = '' + mv $out/bin/${pname} $out/bin/globalping + installShellCompletion --cmd globalping \ + --bash <($out/bin/globalping completion bash) \ + --fish <($out/bin/globalping completion fish) \ + --zsh <($out/bin/globalping completion zsh) + ''; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers"; + homepage = "https://www.jsdelivr.com/globalping/cli"; + license = licenses.mpl20; + maintainers = with maintainers; [ xyenon ]; + mainProgram = "globalping"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afdd88e13b17..246808de4913 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2331,6 +2331,8 @@ with pkgs; glitter = callPackage ../applications/version-management/glitter { }; + globalping-cli = callPackage ../tools/networking/globalping-cli { }; + gst = callPackage ../applications/version-management/gst { }; gut = callPackage ../applications/version-management/gut { }; From 82109414b666e9c64e3ea82347053579fb933d23 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 30 Jul 2023 19:27:08 +0200 Subject: [PATCH 03/17] mediaelch: 2.10.2 -> 2.10.4 --- pkgs/applications/misc/mediaelch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/mediaelch/default.nix b/pkgs/applications/misc/mediaelch/default.nix index 5fe369a394dc..2745dca8a02c 100644 --- a/pkgs/applications/misc/mediaelch/default.nix +++ b/pkgs/applications/misc/mediaelch/default.nix @@ -24,13 +24,13 @@ let in stdenv.mkDerivation rec { pname = "mediaelch"; - version = "2.10.2"; + version = "2.10.4"; src = fetchFromGitHub { owner = "Komet"; repo = "MediaElch"; rev = "v${version}"; - sha256 = "sha256-y8NXBPShmhp0QiuSbVA2JvZrv70Z76Kmdw+RuBnMtPY="; + hash = "sha256-gNpnmyUKDXf40+1JmJzNyEPIv/DO8b3CdJAphheEvTU="; fetchSubmodules = true; }; From 176f7e778f1ec77aabfde36bd2585415d936e8f0 Mon Sep 17 00:00:00 2001 From: linsui Date: Mon, 31 Jul 2023 21:50:25 +0800 Subject: [PATCH 04/17] yutto: 2.0.0b24 -> 2.0.0b28 --- pkgs/tools/misc/yutto/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/yutto/default.nix b/pkgs/tools/misc/yutto/default.nix index 38f9d794abfb..890f3b41c276 100644 --- a/pkgs/tools/misc/yutto/default.nix +++ b/pkgs/tools/misc/yutto/default.nix @@ -9,14 +9,14 @@ with python3.pkgs; buildPythonApplication rec { pname = "yutto"; - version = "2.0.0b24"; + version = "2.0.0b28"; format = "pyproject"; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-ZnRDGgJu78KoSHvznYhBNEDJihUm9rUdlb5tXmcpuTc="; + hash = "sha256-jN9KDQjEaTf7BUDtGd07W3TtijRKzD+StMReLmX4QI0="; }; nativeBuildInputs = [ @@ -27,7 +27,7 @@ buildPythonApplication rec { aiohttp aiofiles biliass - dicttoxml + dict2xml colorama ]; From bd0411d80a138c6c422702b6def65c485c893a3e Mon Sep 17 00:00:00 2001 From: WilliButz Date: Tue, 1 Aug 2023 18:45:27 +0200 Subject: [PATCH 05/17] highlight: 4.6 -> 4.7 --- pkgs/tools/text/highlight/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/highlight/default.nix b/pkgs/tools/text/highlight/default.nix index baba663a93cb..4287b7964801 100644 --- a/pkgs/tools/text/highlight/default.nix +++ b/pkgs/tools/text/highlight/default.nix @@ -3,13 +3,13 @@ let self = stdenv.mkDerivation rec { pname = "highlight"; - version = "4.6"; + version = "4.7"; src = fetchFromGitLab { owner = "saalen"; repo = "highlight"; rev = "v${version}"; - sha256 = "sha256-wMNmc7UIpvYPREpPK/2aKaqUDc6uifuxsXTNFH5SHyI="; + sha256 = "sha256-WblpRrvfFp4PlyH4RS2VNKXYD911H+OcnSL5rctyxiM="; }; enableParallelBuilding = true; From 461d89eedee0ecc4c24a6ce4ce13a5052c90e2a3 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 5 Aug 2023 04:20:00 +0000 Subject: [PATCH 06/17] python310Packages.scrapy: 2.9.0 -> 2.10.0 Changelog: https://github.com/scrapy/scrapy/releases/tag/2.10.0 --- pkgs/development/python-modules/scrapy/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 20fddbe8a226..61b3ed1e1e2d 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "scrapy"; - version = "2.9.0"; + version = "2.10.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -39,7 +39,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "Scrapy"; - hash = "sha256-VkyXK1blS4MUHzlc4/aiW/4gk9YdE/m4HQU4ThnbmNo="; + hash = "sha256-ThajP8jAOli99OjUvcofhnNU6sacz1c2WMf/NPoMrjk="; }; nativeBuildInputs = [ @@ -98,6 +98,7 @@ buildPythonPackage rec { "test_custom_loop_asyncio" "test_custom_loop_asyncio_deferred_signal" "FileFeedStoragePreFeedOptionsTest" # https://github.com/scrapy/scrapy/issues/5157 + "test_persist" "test_timeout_download_from_spider_nodata_rcvd" "test_timeout_download_from_spider_server_hangs" # Depends on uvloop From c956c8fcbec2924a61d7f6e62bcaa12349a13243 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 5 Aug 2023 04:20:00 +0000 Subject: [PATCH 07/17] nixd: 1.2.0 -> 1.2.1 Diff: https://github.com/nix-community/nixd/compare/1.2.0...1.2.1 --- pkgs/development/tools/language-servers/nixd/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/language-servers/nixd/default.nix b/pkgs/development/tools/language-servers/nixd/default.nix index 06d1479d56e7..1f2b45fa16f4 100644 --- a/pkgs/development/tools/language-servers/nixd/default.nix +++ b/pkgs/development/tools/language-servers/nixd/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "nixd"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { owner = "nix-community"; repo = "nixd"; rev = version; - hash = "sha256-3PI/Bzs5WPIKevbRPz6TQ5yo7QpY4HeALrqbUY/zUgY="; + hash = "sha256-NqRYFaxa6Y4j7IMAxxVKo7o15Xmx0CiyeG71Uf1SLCI="; }; mesonBuildType = "release"; @@ -52,7 +52,8 @@ stdenv.mkDerivation rec { env.CXXFLAGS = "-include ${nix.dev}/include/nix/config.h"; - doCheck = true; + # https://github.com/nix-community/nixd/issues/215 + doCheck = !stdenv.isDarwin; checkPhase = '' runHook preCheck From f6063283e12213db9bad23c0d7ff31e6d4539434 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Aug 2023 09:58:15 +0200 Subject: [PATCH 08/17] python311Packages.millheater: 0.10.0 -> 0.11.0 Diff: https://github.com/Danielhiversen/pymill/compare/0.10.0...0.11.0 Changelog: https://github.com/Danielhiversen/pymill/releases/tag/0.11.0 --- .../development/python-modules/millheater/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/millheater/default.nix b/pkgs/development/python-modules/millheater/default.nix index 369947d7dde5..fb4f054cd212 100644 --- a/pkgs/development/python-modules/millheater/default.nix +++ b/pkgs/development/python-modules/millheater/default.nix @@ -2,29 +2,27 @@ , aiohttp , async-timeout , buildPythonPackage -, cryptography , fetchFromGitHub , pythonOlder }: buildPythonPackage rec { pname = "millheater"; - version = "0.10.0"; + version = "0.11.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "Danielhiversen"; repo = "pymill"; - rev = version; - hash = "sha256-ImEg+VEiASQPnMeZzbYMMb+ZgcsxagQcN9IDFGO05Vw="; + rev = "refs/tags/${version}"; + hash = "sha256-NECGUosjrhRCVGHOFV+YjY8o3heoA7qi9kKsgXpeHh0="; }; propagatedBuildInputs = [ aiohttp async-timeout - cryptography ]; # Project has no tests @@ -37,6 +35,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for Mill heater devices"; homepage = "https://github.com/Danielhiversen/pymill"; + changelog = "https://github.com/Danielhiversen/pymill/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From 8758657bf138c176243282ae112965a7dd054e32 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 5 Aug 2023 18:45:39 +0000 Subject: [PATCH 09/17] esphome: 2023.7.0 -> 2023.7.1 --- pkgs/tools/misc/esphome/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix index c08d03ef16b7..42cf93978d36 100644 --- a/pkgs/tools/misc/esphome/default.nix +++ b/pkgs/tools/misc/esphome/default.nix @@ -16,14 +16,14 @@ let in python.pkgs.buildPythonApplication rec { pname = "esphome"; - version = "2023.7.0"; + version = "2023.7.1"; format = "setuptools"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-zJ00Ypb//b+SndzMC/QGzxtu9GZefaJvr5tKYp68hhc="; + hash = "sha256-warrNm07YXD0TEb91JQPr9ouDh7lC+YCQYOM3fed3Es="; }; postPatch = '' From 59080851541a11bd013432060a64525692f3da88 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Aug 2023 23:41:58 +0200 Subject: [PATCH 10/17] python311Packages.aiohomekit: 2.6.12 -> 2.6.13 Diff: https://github.com/Jc2k/aiohomekit/compare/refs/tags/2.6.12...2.6.13 Changelog: https://github.com/Jc2k/aiohomekit/releases/tag/2.6.13 --- pkgs/development/python-modules/aiohomekit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohomekit/default.nix b/pkgs/development/python-modules/aiohomekit/default.nix index c0d8da783758..72edc78c1d44 100644 --- a/pkgs/development/python-modules/aiohomekit/default.nix +++ b/pkgs/development/python-modules/aiohomekit/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "aiohomekit"; - version = "2.6.12"; + version = "2.6.13"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "Jc2k"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-a1qxj/6VCnTqfcCfvjjnfM53JjJXP672wumGCvXwxUY="; + hash = "sha256-33B9BBqvKQugGz4+9EuMPhLRyWd/Sbxwh4d5aMmDt4M="; }; nativeBuildInputs = [ From 2c55562deb1082335a14eaf5c563f4a1defd692c Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 5 Aug 2023 18:16:27 -0400 Subject: [PATCH 11/17] bottom: 0.9.3 -> 0.9.4 Diff: https://github.com/ClementTsang/bottom/compare/0.9.3...0.9.4 Changelog: https://github.com/ClementTsang/bottom/blob/0.9.4/CHANGELOG.md --- pkgs/tools/system/bottom/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/bottom/default.nix b/pkgs/tools/system/bottom/default.nix index b8a2e59931a8..7fa64aae7d25 100644 --- a/pkgs/tools/system/bottom/default.nix +++ b/pkgs/tools/system/bottom/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "bottom"; - version = "0.9.3"; + version = "0.9.4"; src = fetchFromGitHub { owner = "ClementTsang"; repo = pname; rev = version; - hash = "sha256-hKgk2wIfFvYOKYo90rzGlntvRRWId4UUgSevY1KLhik="; + hash = "sha256-9WQdudO2tIvxDHfJ87zvJeMfpuFSr4D5zGteL7Od2fQ="; }; - cargoHash = "sha256-2iMjxjObh3V+HM79y8hQF+i7eQ+sjNl3kDopCbCsSZg="; + cargoHash = "sha256-aRN6V6r+JYi6yUcXei2f7l7oZ+8IkUmw1sgOwZJOtIE="; nativeBuildInputs = [ installShellFiles ]; From e61a7b753a1890b31366a6c9920a6f0c98327eb7 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 5 Aug 2023 16:06:05 -0700 Subject: [PATCH 12/17] maigret: support pytest >= 7.3.0 --- pkgs/tools/security/maigret/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/tools/security/maigret/default.nix b/pkgs/tools/security/maigret/default.nix index a8d7f4c6b532..f2d706bfe510 100644 --- a/pkgs/tools/security/maigret/default.nix +++ b/pkgs/tools/security/maigret/default.nix @@ -1,12 +1,14 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , python3 }: python3.pkgs.buildPythonApplication rec { pname = "maigret"; version = "0.4.4"; + format = "setuptools"; src = fetchFromGitHub { owner = "soxoj"; @@ -15,7 +17,17 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-Z8SnA7Z5+oKW0AOaNf+c/zR30lrPFmXaxxKkbnDXNNs="; }; + patches = [ + # https://github.com/soxoj/maigret/pull/1117 + (fetchpatch { + name = "pytest-7.3-compatibility.patch"; + url = "https://github.com/soxoj/maigret/commit/ecb33de9e6eec12b6b45a1152199177f32c85be2.patch"; + hash = "sha256-nFx3j1Q37YLtYhb0QS34UgZFgAc5Z/RVgbO9o1n1ONE="; + }) + ]; + nativeBuildInputs = [ python3.pkgs.pythonRelaxDepsHook ]; + propagatedBuildInputs = with python3.pkgs; [ aiodns aiohttp @@ -57,6 +69,8 @@ python3.pkgs.buildPythonApplication rec { yarl ]; + __darwinAllowLocalNetworking = true; + nativeCheckInputs = with python3.pkgs; [ pytest-httpserver pytest-asyncio From a2a0e825abc187b4b278889e309846c91a05446b Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 5 Aug 2023 16:39:55 -0700 Subject: [PATCH 13/17] notus-scanner: update packaging dependency --- .../development/python-modules/notus-scanner/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/notus-scanner/default.nix b/pkgs/development/python-modules/notus-scanner/default.nix index ff64840fee7c..ce438528bc28 100644 --- a/pkgs/development/python-modules/notus-scanner/default.nix +++ b/pkgs/development/python-modules/notus-scanner/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , paho-mqtt , poetry-core , psutil @@ -26,6 +27,14 @@ buildPythonPackage rec { hash = "sha256-h+jZWjDvTfW9XjoGhWYX08hgJ/Qp64MEaqHHwnahnC4="; }; + patches = [ + (fetchpatch { + name = "update-packaging-dependency.patch"; + url = "https://github.com/greenbone/notus-scanner/commit/bfa7d3d2e63e250ff25a66c60b782eb9da0e89e7.patch"; + hash = "sha256-hzS8TYBXDEq+cgWlp6fSOtSbyeX9EX2rURmnFMF5jN0="; + }) + ]; + pythonRelaxDeps = [ "python-gnupg" ]; From 36ca4639d76c02156464f87cf0778105d560b81d Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 5 Aug 2023 10:07:23 -0400 Subject: [PATCH 14/17] zig: introduce generic.nix to remove duplicate code - zig_0_9: move tests to installCheck - zig_0_9: set ZIG_GLOBAL_CACHE_DIR instead of HOME --- pkgs/development/compilers/zig/0.10.nix | 65 ++---------------- pkgs/development/compilers/zig/0.9.1.nix | 79 ++++++---------------- pkgs/development/compilers/zig/generic.nix | 67 ++++++++++++++++++ 3 files changed, 92 insertions(+), 119 deletions(-) create mode 100644 pkgs/development/compilers/zig/generic.nix diff --git a/pkgs/development/compilers/zig/0.10.nix b/pkgs/development/compilers/zig/0.10.nix index 784cae916e34..7b5b65722b51 100644 --- a/pkgs/development/compilers/zig/0.10.nix +++ b/pkgs/development/compilers/zig/0.10.nix @@ -2,53 +2,23 @@ , stdenv , fetchFromGitHub , cmake -, coreutils , llvmPackages , libxml2 , zlib -}: +, coreutils +}@args: -stdenv.mkDerivation (finalAttrs: { - pname = "zig"; +import ./generic.nix args "sha256-69QIkkKzApOGfrBdgtmxFMDytRkSh+0YiaJQPbXsBeo=" { version = "0.10.1"; - src = fetchFromGitHub { - owner = "ziglang"; - repo = "zig"; - rev = finalAttrs.version; - hash = "sha256-69QIkkKzApOGfrBdgtmxFMDytRkSh+0YiaJQPbXsBeo="; - }; - outputs = [ "out" "doc" ]; - nativeBuildInputs = [ - cmake - llvmPackages.llvm.dev - ]; - - buildInputs = [ - coreutils - libxml2 - zlib - ] ++ (with llvmPackages; [ - libclang - lld - llvm - ]); - patches = [ # Backport alignment related panics from zig-master to 0.10. # Upstream issue: https://github.com/ziglang/zig/issues/14559 ./zig_14559.patch ]; - # Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't - # work in Nix's sandbox. Use env from our coreutils instead. - postPatch = '' - substituteInPlace lib/std/zig/system/NativeTargetInfo.zig \ - --replace "/usr/bin/env" "${coreutils}/bin/env" - ''; - cmakeFlags = [ # file RPATH_CHANGE could not write new RPATH "-DCMAKE_SKIP_BUILD_RPATH=ON" @@ -60,34 +30,11 @@ stdenv.mkDerivation (finalAttrs: { "-DZIG_TARGET_MCPU=baseline" ]; - env.ZIG_GLOBAL_CACHE_DIR = "$TMPDIR/zig-cache"; - postBuild = '' - ./zig2 build-exe ../doc/docgen.zig - ./docgen ./zig2 ../doc/langref.html.in ./langref.html + ./zig2 run ../doc/docgen.zig -- ./zig2 ../doc/langref.html.in langref.html ''; postInstall = '' - install -Dm644 -t $doc/share/doc/zig-${finalAttrs.version}/html ./langref.html + install -Dm644 -t $doc/share/doc/zig-$version/html ./langref.html ''; - - doInstallCheck = true; - - installCheckPhase = '' - runHook preInstallCheck - - $out/bin/zig test --cache-dir "$TMPDIR/cache-dir" -I $src/test $src/test/behavior.zig - - runHook postInstallCheck - ''; - - meta = { - homepage = "https://ziglang.org/"; - description = - "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"; - changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ aiotter andrewrk AndersonTorres ]; - platforms = lib.platforms.unix; - }; -}) +} diff --git a/pkgs/development/compilers/zig/0.9.1.nix b/pkgs/development/compilers/zig/0.9.1.nix index 908d9a49cd6c..1580508ca610 100644 --- a/pkgs/development/compilers/zig/0.9.1.nix +++ b/pkgs/development/compilers/zig/0.9.1.nix @@ -5,19 +5,12 @@ , llvmPackages , libxml2 , zlib -}: +, coreutils +}@args: -stdenv.mkDerivation (finalAttrs: { - pname = "zig"; +import ./generic.nix args "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k=" { version = "0.9.1"; - src = fetchFromGitHub { - owner = "ziglang"; - repo = "zig"; - rev = finalAttrs.version; - hash = "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k="; - }; - patches = [ # Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev) ./rpath.patch @@ -26,37 +19,21 @@ stdenv.mkDerivation (finalAttrs: { ]; # TODO: remove on next upgrade - prePatch = let - zig_0_10_0 = fetchFromGitHub { - owner = "ziglang"; - repo = "zig"; - rev = "0.10.0"; - hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw="; - }; - in '' - cp -R ${zig_0_10_0}/lib/libc/include/any-macos.13-any lib/libc/include/any-macos.13-any - cp -R ${zig_0_10_0}/lib/libc/include/aarch64-macos.13-none lib/libc/include/aarch64-macos.13-gnu - cp -R ${zig_0_10_0}/lib/libc/include/x86_64-macos.13-none lib/libc/include/x86_64-macos.13-gnu - cp ${zig_0_10_0}/lib/libc/darwin/libSystem.13.tbd lib/libc/darwin/ - ''; - - nativeBuildInputs = [ - cmake - llvmPackages.llvm.dev - ]; - - buildInputs = [ - libxml2 - zlib - ] ++ (with llvmPackages; [ - libclang - lld - llvm - ]); - - preBuild = '' - export HOME=$TMPDIR; - ''; + prePatch = + let + zig_0_10_0 = fetchFromGitHub { + owner = "ziglang"; + repo = "zig"; + rev = "0.10.0"; + hash = "sha256-DNs937N7PLQimuM2anya4npYXcj6cyH+dRS7AiOX7tw="; + }; + in + '' + cp -R ${zig_0_10_0}/lib/libc/include/any-macos.13-any lib/libc/include/any-macos.13-any + cp -R ${zig_0_10_0}/lib/libc/include/aarch64-macos.13-none lib/libc/include/aarch64-macos.13-gnu + cp -R ${zig_0_10_0}/lib/libc/include/x86_64-macos.13-none lib/libc/include/x86_64-macos.13-gnu + cp ${zig_0_10_0}/lib/libc/darwin/libSystem.13.tbd lib/libc/darwin/ + ''; cmakeFlags = [ # file RPATH_CHANGE could not write new RPATH @@ -65,22 +42,4 @@ stdenv.mkDerivation (finalAttrs: { # ensure determinism in the compiler build "-DZIG_TARGET_MCPU=baseline" ]; - - doCheck = true; - - checkPhase = '' - runHook preCheck - ./zig test --cache-dir "$TMPDIR" -I $src/test $src/test/behavior.zig - runHook postCheck - ''; - - meta = { - homepage = "https://ziglang.org/"; - description = - "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"; - license = lib.licenses.mit; - changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html"; - maintainers = with lib.maintainers; [ aiotter andrewrk AndersonTorres ]; - platforms = lib.platforms.unix; - }; -}) +} diff --git a/pkgs/development/compilers/zig/generic.nix b/pkgs/development/compilers/zig/generic.nix new file mode 100644 index 000000000000..b57942092a6c --- /dev/null +++ b/pkgs/development/compilers/zig/generic.nix @@ -0,0 +1,67 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, llvmPackages +, libxml2 +, zlib +, coreutils +, ... +}: + +hash: args: + +stdenv.mkDerivation (finalAttrs: { + pname = "zig"; + + src = fetchFromGitHub { + owner = "ziglang"; + repo = "zig"; + rev = finalAttrs.version; + inherit hash; + }; + + nativeBuildInputs = [ + cmake + llvmPackages.llvm.dev + ]; + + buildInputs = [ + libxml2 + zlib + ] ++ (with llvmPackages; [ + libclang + lld + llvm + ]); + + doInstallCheck = true; + + # Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't + # work in Nix's sandbox. Use env from our coreutils instead. + postPatch = '' + substituteInPlace lib/std/zig/system/NativeTargetInfo.zig \ + --replace "/usr/bin/env" "${coreutils}/bin/env" + ''; + + preBuild = '' + export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d) + ''; + + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/zig test --cache-dir "$TMPDIR/zig-test-cache" -I $src/test $src/test/behavior.zig + + runHook postInstallCheck + ''; + + meta = { + description = "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software"; + homepage = "https://ziglang.org/"; + changelog = "https://ziglang.org/download/${finalAttrs.version}/release-notes.html"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ aiotter andrewrk AndersonTorres figsoda ]; + platforms = lib.platforms.unix; + }; +} // args) From 3b74f1205cf227872bbe7fd130ab752b1770d8b6 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 5 Aug 2023 10:07:49 -0400 Subject: [PATCH 15/17] zig_0_11: init https://ziglang.org/download/0.11.0/release-notes.html --- pkgs/development/compilers/zig/0.10.nix | 4 ++- pkgs/development/compilers/zig/0.11.nix | 36 ++++++++++++++++++++++ pkgs/development/compilers/zig/0.9.1.nix | 4 ++- pkgs/development/compilers/zig/generic.nix | 13 +++----- pkgs/top-level/all-packages.nix | 4 +++ 5 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 pkgs/development/compilers/zig/0.11.nix diff --git a/pkgs/development/compilers/zig/0.10.nix b/pkgs/development/compilers/zig/0.10.nix index 7b5b65722b51..c21a51afa5b3 100644 --- a/pkgs/development/compilers/zig/0.10.nix +++ b/pkgs/development/compilers/zig/0.10.nix @@ -8,9 +8,11 @@ , coreutils }@args: -import ./generic.nix args "sha256-69QIkkKzApOGfrBdgtmxFMDytRkSh+0YiaJQPbXsBeo=" { +import ./generic.nix args { version = "0.10.1"; + hash = "sha256-69QIkkKzApOGfrBdgtmxFMDytRkSh+0YiaJQPbXsBeo="; + outputs = [ "out" "doc" ]; patches = [ diff --git a/pkgs/development/compilers/zig/0.11.nix b/pkgs/development/compilers/zig/0.11.nix new file mode 100644 index 000000000000..7c4fcedc0538 --- /dev/null +++ b/pkgs/development/compilers/zig/0.11.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, llvmPackages +, libxml2 +, zlib +, coreutils +}@args: + +import ./generic.nix args { + version = "0.11.0"; + + hash = "sha256-iuU1fzkbJxI+0N1PiLQM013Pd1bzrgqkbIyTxo5gB2I="; + + outputs = [ "out" "doc" ]; + + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH + "-DCMAKE_SKIP_BUILD_RPATH=ON" + + # always link against static build of LLVM + "-DZIG_STATIC_LLVM=ON" + + # ensure determinism in the compiler build + "-DZIG_TARGET_MCPU=baseline" + ]; + + postBuild = '' + stage3/bin/zig run ../tools/docgen.zig -- ../doc/langref.html.in langref.html --zig $PWD/stage3/bin/zig + ''; + + postInstall = '' + install -Dm444 -t $doc/share/doc/zig-$version/html langref.html + ''; +} diff --git a/pkgs/development/compilers/zig/0.9.1.nix b/pkgs/development/compilers/zig/0.9.1.nix index 1580508ca610..a05d5ae893cf 100644 --- a/pkgs/development/compilers/zig/0.9.1.nix +++ b/pkgs/development/compilers/zig/0.9.1.nix @@ -8,9 +8,11 @@ , coreutils }@args: -import ./generic.nix args "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k=" { +import ./generic.nix args { version = "0.9.1"; + hash = "sha256-x2c4c9RSrNWGqEngio4ArW7dJjW0gg+8nqBwPcR721k="; + patches = [ # Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev) ./rpath.patch diff --git a/pkgs/development/compilers/zig/generic.nix b/pkgs/development/compilers/zig/generic.nix index b57942092a6c..5cc75cbbf6eb 100644 --- a/pkgs/development/compilers/zig/generic.nix +++ b/pkgs/development/compilers/zig/generic.nix @@ -9,7 +9,7 @@ , ... }: -hash: args: +args: stdenv.mkDerivation (finalAttrs: { pname = "zig"; @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ziglang"; repo = "zig"; rev = finalAttrs.version; - inherit hash; + inherit (args) hash; }; nativeBuildInputs = [ @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { llvm ]); - doInstallCheck = true; + env.ZIG_GLOBAL_CACHE_DIR = "$TMPDIR/zig-cache"; # Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't # work in Nix's sandbox. Use env from our coreutils instead. @@ -44,10 +44,7 @@ stdenv.mkDerivation (finalAttrs: { --replace "/usr/bin/env" "${coreutils}/bin/env" ''; - preBuild = '' - export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d) - ''; - + doInstallCheck = true; installCheckPhase = '' runHook preInstallCheck @@ -64,4 +61,4 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with lib.maintainers; [ aiotter andrewrk AndersonTorres figsoda ]; platforms = lib.platforms.unix; }; -} // args) +} // removeAttrs args [ "hash" ]) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a16d298a8615..72d67f1bad72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25477,6 +25477,10 @@ with pkgs; zig_0_10 = darwin.apple_sdk_11_0.callPackage ../development/compilers/zig/0.10.nix { llvmPackages = llvmPackages_15; }; + # requires a newer Apple SDK + zig_0_11 = darwin.apple_sdk_11_0.callPackage ../development/compilers/zig/0.11.nix { + llvmPackages = llvmPackages_16; + }; zig = zig_0_10; zigHook = callPackage ../development/compilers/zig/hook.nix { }; From 33602569e20d7d3ac217ee8618a8a0a37fa599a3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 03:04:09 +0000 Subject: [PATCH 16/17] python310Packages.trimesh: 3.22.5 -> 3.23.0 --- pkgs/development/python-modules/trimesh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/trimesh/default.nix b/pkgs/development/python-modules/trimesh/default.nix index 6a60b75cc194..4167a92e7ec3 100644 --- a/pkgs/development/python-modules/trimesh/default.nix +++ b/pkgs/development/python-modules/trimesh/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "trimesh"; - version = "3.22.5"; + version = "3.23.0"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Lk30HShbVSBeiclfxJUkd7W2HfvLsZiUdYqebLI7otw="; + hash = "sha256-TjnN5gqzhsN2S/Acqio5pH33RW/Zp3acolI+B+sSaRA="; }; nativeBuildInputs = [ setuptools ]; From 541c5d8de0013ba0fa8695e62800cf6ae1d02886 Mon Sep 17 00:00:00 2001 From: happysalada Date: Wed, 2 Aug 2023 19:16:44 +0800 Subject: [PATCH 17/17] python310Packages.txtai: init at 5.5.1 --- .../python-modules/txtai/default.nix | 156 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 158 insertions(+) create mode 100644 pkgs/development/python-modules/txtai/default.nix diff --git a/pkgs/development/python-modules/txtai/default.nix b/pkgs/development/python-modules/txtai/default.nix new file mode 100644 index 000000000000..acf1db58d2a6 --- /dev/null +++ b/pkgs/development/python-modules/txtai/default.nix @@ -0,0 +1,156 @@ +{ + lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pythonRelaxDepsHook +# propagated build input +, faiss +, torch +, transformers +, huggingface-hub +, numpy +, pyyaml +, regex +# optional-dependencies +, aiohttp +, fastapi +, uvicorn +# TODO add apache-libcloud +# , apache-libcloud +, rich +, duckdb +, pillow +, networkx +, python-louvain +, onnx +, onnxruntime +, soundfile +, scipy +, ttstokenizer +, beautifulsoup4 +, nltk +, pandas +, tika +, imagehash +, timm +, fasttext +, sentencepiece +, accelerate +, onnxmltools +, annoy +, hnswlib +# TODO add pymagnitude-lite +#, pymagnitude-lite +, scikit-learn +, sentence-transformers +, croniter +, openpyxl +, requests +, xmltodict +# native check inputs +, unittestCheckHook +}: +let + version = "5.5.1"; + api = [ aiohttp fastapi uvicorn ]; + # cloud = [ apache-libcloud ]; + console = [ rich ]; + + database = [ duckdb pillow ]; + + graph = [ networkx python-louvain ]; + + model = [ onnx onnxruntime ]; + + pipeline-audio = [ onnx onnxruntime soundfile scipy ttstokenizer ]; + pipeline-data = [ beautifulsoup4 nltk pandas tika ]; + pipeline-image = [ imagehash pillow timm ]; + pipeline-text = [ fasttext sentencepiece ]; + pipeline-train = [ accelerate onnx onnxmltools onnxruntime ]; + pipeline = pipeline-audio ++ pipeline-data ++ pipeline-image ++ pipeline-text ++ pipeline-train; + + similarity = [ + annoy + fasttext + hnswlib + # pymagnitude-lite + scikit-learn + sentence-transformers + ]; + workflow = [ + # apache-libcloud + croniter + openpyxl + pandas + pillow + requests + xmltodict + ]; + all = api ++ console ++ database ++ graph ++ model ++ pipeline ++ similarity ++ workflow; + + optional-dependencies = { + inherit api console database graph model pipeline-audio pipeline-image + pipeline-text pipeline-train pipeline similarity workflow all; + }; +in +buildPythonPackage { + pname = "txtai"; + inherit version; + format = "setuptools"; + + disable = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "neuml"; + repo = "txtai"; + rev = "v${version}"; + hash = "sha256-h6TwWzLYfFg5x2QMIstAZ5pkxfHobBU+b4gb0HiayzY="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRemoveDeps = [ + # We call it faiss, not faiss-cpu. + "faiss-cpu" + ]; + + propagatedBuildInputs = [ + faiss + torch + transformers + huggingface-hub + numpy + pyyaml + regex + ]; + + passthru.optional-dependencies = optional-dependencies; + + pythonImportsCheck = [ "txtai" ]; + + # some tests hang forever + doCheck = false; + + preCheck = '' + export TRANSFORMERS_CACHE=$(mktemp -d) + ''; + + nativeCheckInputs = [ + unittestCheckHook + ] ++ optional-dependencies.api ++ optional-dependencies.similarity; + + unittestFlagsArray = [ + "-s" "test/python" "-v" + ]; + + meta = with lib; { + description = "Semantic search and workflows powered by language models"; + changelog = "https://github.com/neuml/txtai/releases/tag/v${version}"; + homepage = "https://github.com/neuml/txtai"; + license = licenses.asl20; + maintainers = with maintainers; [ happysalada ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1324c28692a0..0c8b32b1e8b7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12936,6 +12936,8 @@ self: super: with self; { txrequests = callPackage ../development/python-modules/txrequests { }; + txtai = callPackage ../development/python-modules/txtai { }; + txtorcon = callPackage ../development/python-modules/txtorcon { }; txzmq = callPackage ../development/python-modules/txzmq { };